本文整理汇总了C++中NormsIndexesTableType::link方法的典型用法代码示例。如果您正苦于以下问题:C++ NormsIndexesTableType::link方法的具体用法?C++ NormsIndexesTableType::link怎么用?C++ NormsIndexesTableType::link使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NormsIndexesTableType
的用法示例。
在下文中一共展示了NormsIndexesTableType::link方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: loadFile
//.........这里部分代码省略.........
//malformed line?
if (tokens.size() < 4)
{
objWarnings[INVALID_LINE] = true;
error = true;
break;
}
CCVector3d Pd( tokens[1].toDouble(), tokens[2].toDouble(), tokens[3].toDouble() );
//first point: check for 'big' coordinates
if (pointsRead == 0)
{
if (HandleGlobalShift(Pd,Pshift,parameters))
{
vertices->setGlobalShift(Pshift);
ccLog::Warning("[OBJ] Cloud has been recentered! Translation: (%.2f,%.2f,%.2f)",Pshift.x,Pshift.y,Pshift.z);
}
}
//shifted point
CCVector3 P = CCVector3::fromArray((Pd + Pshift).u);
vertices->addPoint(P);
++pointsRead;
}
/*** new vertex texture coordinates ***/
else if (tokens.front() == "vt")
{
//create and reserve memory for tex. coords container if necessary
if (!texCoords)
{
texCoords = new TextureCoordsContainer();
texCoords->link();
}
if (texCoords->currentSize() == texCoords->capacity())
{
if (!texCoords->reserve(texCoords->capacity() + MAX_NUMBER_OF_ELEMENTS_PER_CHUNK))
{
objWarnings[NOT_ENOUGH_MEMORY] = true;
error = true;
break;
}
}
//malformed line?
if (tokens.size() < 2)
{
objWarnings[INVALID_LINE] = true;
error = true;
break;
}
float T[2] = { T[0] = tokens[1].toFloat(), 0 };
if (tokens.size() > 2) //OBJ specification allows for only one value!!!
{
T[1] = tokens[2].toFloat();
}
texCoords->addElement(T);
++texCoordsRead;
}
/*** new vertex normal ***/
else if (tokens.front() == "vn") //--> in fact it can also be a facet normal!!!
{