本文整理汇总了C++中tvector::push_back方法的典型用法代码示例。如果您正苦于以下问题:C++ tvector::push_back方法的具体用法?C++ tvector::push_back怎么用?C++ tvector::push_back使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tvector
的用法示例。
在下文中一共展示了tvector::push_back方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddRenderedVertex
void AddRenderedVertex(tvector<float>& aflVerts, const Vector& v, const Vector2D& vt)
{
aflVerts.push_back(v.x);
aflVerts.push_back(v.y);
aflVerts.push_back(v.z);
aflVerts.push_back(vt.x);
aflVerts.push_back(vt.y);
}
示例2: AddShadowMapVertex
void AddShadowMapVertex(tvector<float>& aflVerts, const Vector& v, const Vector& vn, const Vector2D& vt)
{
aflVerts.push_back(v.x);
aflVerts.push_back(v.y);
aflVerts.push_back(v.z);
aflVerts.push_back(vn.x);
aflVerts.push_back(vn.y);
aflVerts.push_back(vn.z);
aflVerts.push_back(vt.x);
aflVerts.push_back(vt.y);
}
示例3: LoadMeshInstanceIntoToy
void LoadMeshInstanceIntoToy(CConversionScene* pScene, CConversionMeshInstance* pMeshInstance, const Matrix4x4& mParentTransformations)
{
if (!pMeshInstance->IsVisible())
return;
CConversionMesh* pMesh = pMeshInstance->GetMesh();
for (size_t m = 0; m < pScene->GetNumMaterials(); m++)
{
for (size_t j = 0; j < pMesh->GetNumFaces(); j++)
{
size_t k;
CConversionFace* pFace = pMesh->GetFace(j);
if (pFace->m == ~0)
continue;
CConversionMaterial* pMaterial = NULL;
CConversionMaterialMap* pConversionMaterialMap = pMeshInstance->GetMappedMaterial(pFace->m);
if (!pConversionMaterialMap)
continue;
if (!pConversionMaterialMap->IsVisible())
continue;
if (pConversionMaterialMap->m_iMaterial != m)
continue;
while (g_asTextures.size() <= pConversionMaterialMap->m_iMaterial)
{
g_asTextures.push_back(pScene->GetMaterial(pConversionMaterialMap->m_iMaterial)->GetDiffuseTexture());
g_aaflData.push_back();
}
size_t iMaterial = pConversionMaterialMap->m_iMaterial;
CConversionVertex* pVertex0 = pFace->GetVertex(0);
for (k = 2; k < pFace->GetNumVertices(); k++)
{
CConversionVertex* pVertex1 = pFace->GetVertex(k-1);
CConversionVertex* pVertex2 = pFace->GetVertex(k);
AddVertex(iMaterial, mParentTransformations * pMesh->GetVertex(pVertex0->v), pMesh->GetUV(pVertex0->vu));
AddVertex(iMaterial, mParentTransformations * pMesh->GetVertex(pVertex1->v), pMesh->GetUV(pVertex1->vu));
AddVertex(iMaterial, mParentTransformations * pMesh->GetVertex(pVertex2->v), pMesh->GetUV(pVertex2->vu));
}
}
}
}
示例4: RenderSetupSceneNode
void CAOGenerator::RenderSetupSceneNode(CConversionSceneNode* pNode, tvector<tvector<float>>& aaflVerts)
{
if (!pNode)
return;
for (size_t c = 0; c < pNode->GetNumChildren(); c++)
RenderSetupSceneNode(pNode->GetChild(c), aaflVerts);
for (size_t m = 0; m < pNode->GetNumMeshInstances(); m++)
{
CConversionMeshInstance* pMeshInstance = pNode->GetMeshInstance(m);
CConversionMesh* pMesh = pMeshInstance->GetMesh();
for (size_t f = 0; f < pMesh->GetNumFaces(); f++)
{
CConversionFace* pFace = pMesh->GetFace(f);
size_t iMaterial = pMeshInstance->GetMappedMaterial(pFace->m)->m_iMaterial;
while (aaflVerts.size() <= iMaterial)
aaflVerts.push_back();
CConversionVertex* pVertex0 = pFace->GetVertex(0);
for (size_t k = 2; k < pFace->GetNumVertices(); k++)
{
CConversionVertex* pVertex1 = pFace->GetVertex(k-1);
CConversionVertex* pVertex2 = pFace->GetVertex(k);
AddRenderedVertex(aaflVerts[iMaterial], pMeshInstance->GetVertex(pVertex0->v), pMesh->GetUV(pVertex0->vu));
AddRenderedVertex(aaflVerts[iMaterial], pMeshInstance->GetVertex(pVertex1->v), pMesh->GetUV(pVertex1->vu));
AddRenderedVertex(aaflVerts[iMaterial], pMeshInstance->GetVertex(pVertex2->v), pMesh->GetUV(pVertex2->vu));
}
}
}
}