本文整理汇总了C++中AABox::Min方法的典型用法代码示例。如果您正苦于以下问题:C++ AABox::Min方法的具体用法?C++ AABox::Min怎么用?C++ AABox::Min使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AABox
的用法示例。
在下文中一共展示了AABox::Min方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: RenderAnimatedModelImmediateMode
void ModelDisplayState::RenderAnimatedModelImmediateMode(RenderOptions& options) const
{
AnimatedModel3d& model = *m_spModel->GetAnimated();
const Data& data = model.GetData();
AABox boundingBox;
// now render all groups, using vertex and normals from joint render data
for (const Group& group : data.m_vecGroups)
{
BindMaterial(group);
glBegin(GL_TRIANGLES);
for (size_t uiTriangleIndex : group.m_vecTriangleIndices)
{
ATLASSERT(uiTriangleIndex < data.m_vecTriangles.size());
const Triangle& t = data.m_vecTriangles[uiTriangleIndex];
for (unsigned int v=0; v<3; v++)
{
glTexCoord2fv(t.aTex[v].Data());
size_t vertexIndex = t.auiVertexIndices[v];
const Vertex& vert = data.m_vecVertices[vertexIndex];
Vector3d vNormal = t.aNormals[v];
model.TransformNormal(vert, m_vecJointRenderData, vNormal);
glNormal3dv(vNormal.Data());
Vector3d vVertex = vert.m_vPos;
model.TransformVertex(vert, m_vecJointRenderData, vVertex);
glVertex3dv(vVertex.Data());
if (options.Get(RenderOptions::optionModelBoundingBox))
boundingBox.UpdateBound(vVertex);
}
}
glEnd();
OpenGL::CountPolygons(group.m_vecTriangleIndices.size());
if (options.Get(RenderOptions::optionModelNormals))
RenderModelNormals(group);
}
if (options.Get(RenderOptions::optionModelBoundingBox))
OpenGL::RenderBoundingBox(boundingBox.Min(), boundingBox.Max());
}