本文整理汇总了C++中VertexList::pop方法的典型用法代码示例。如果您正苦于以下问题:C++ VertexList::pop方法的具体用法?C++ VertexList::pop怎么用?C++ VertexList::pop使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VertexList
的用法示例。
在下文中一共展示了VertexList::pop方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: streamSubmesh
//.........这里部分代码省略.........
of << "\t\t\t\t<vertexbuffer positions=\"true\" normals=\"" << exportNormals << "\" colours_diffuse=\"" << m_config.getExportVertexColours() << "\" texture_coords=\"" << texMaps.Count() << "\"";
for (int i=0; i<texMaps.Count(); i++)
of << " texture_coords_dimensions_" << i << "=\"2\"";
of << ">" << std::endl;
int numVerts = vertexList.size();
for (int i=0; i < numVerts; i++)
{
const Vertex& v = vertexList.front();
of << "\t\t\t\t\t<vertex>" << std::endl;
of << std::showpoint;
const Ogre::Vector3& p = v.getPosition();
float x = p.x;
float y = p.y;
float z = p.z;
of << "\t\t\t\t\t\t<position x=\"" << x << "\" y=\"" << y << "\" z=\"" << z << "\" />" << std::endl;
if (m_config.getExportVertexColours())
{
float r = v.getColour().r;
float g = v.getColour().g;
float b = v.getColour().b;
of << "\t\t\t\t\t\t<colour_diffuse value=\"\t" << r << "\t" << g << "\t" << b << "\" />" << std::endl;
}
if (exportNormals) {
const Ogre::Vector3& n = v.getNormal();
float x = n.x;
float y = n.y;
float z = n.z;
of << "\t\t\t\t\t\t<normal x=\"" << x << "\" y=\"" << y << "\" z=\"" << z << "\" />" << std::endl;
}
// output the tex coords for each map used
for (int ti=0; ti<texMaps.Count(); ti++) {
int texMap = texMaps[ti];
const Ogre::Vector3& uvw = v.getUVW(texMap);
switch (m_config.getTexCoord2D()) {
case OgreMax::UV:
of << "\t\t\t\t\t\t<texcoord u=\"" << uvw.x << "\" v=\"" << (1.0 - uvw.y) << "\" />" << std::endl;
break;
case OgreMax::VW:
of << "\t\t\t\t\t\t<texcoord v=\"" << uvw.y << "\" w=\"" << (1.0 - uvw.z) << "\" />" << std::endl;
break;
case OgreMax::WU:
of << "\t\t\t\t\t\t<texcoord w=\"" << uvw.z << "\" u=\"" << (1.0 - uvw.x) << "\" />" << std::endl;
break;
}
}
of << std::noshowpoint;
of << "\t\t\t\t\t</vertex>" << std::endl;
vertexList.pop();
}
of << "\t\t\t\t</vertexbuffer>" << std::endl;
// *************** End Export Vertex Buffer ***************
of << "\t\t\t</geometry>" << std::endl;
// *************** End Export Geometry ***********
of << "\t\t</submesh>" << std::endl;
// this skin extraction code based on an article found here:
// http://www.cfxweb.net/modules.php?name=News&file=article&sid=1029
/* Object *oRef = node->GetObjectRef();
if (oRef->SuperClassID() == GEN_DERIVOB_CLASS_ID) {
IDerivedObject *dObj = (IDerivedObject *)oRef;
Modifier *oMod = dObj->GetModifier(0);
if (oMod->ClassID() == SKIN_CLASSID) {
// flag the export of a skeleton link element
m_createSkeletonLink = true;
// stream the boneassignments element
streamBoneAssignments(of, oMod, node);
}
}
of << "\t\t</submesh>" << std::endl;
if (obj != tri)
delete tri;
*/
// node->ReleaseIGameObject();
return true;
}