28 for (
unsigned int i=0; i < indexVec.size(); ++i)
29 indexVec[i] += increment;
33 GLenum VART::Mesh::GetOglType(MeshType type) {
46 return GL_TRIANGLE_STRIP;
48 return GL_TRIANGLE_FAN;
62 bool result = material.DrawOGL();
63 if (material.HasTexture())
64 glEnableClientState(GL_TEXTURE_COORD_ARRAY);
66 glDisableClientState(GL_TEXTURE_COORD_ARRAY);
67 glDrawElements(GetOglType(type), indexVec.size(), GL_UNSIGNED_INT, &indexVec[0]);
99 output <<
"LINE_STRIP";
102 output <<
"LINE_LOOP";
105 output <<
"TRIANGLES";
108 output <<
"TRIANGLE_STRIP";
111 output <<
"TRIANGLE_FAN";
117 output <<
"QUAD_STRIP";
123 output <<
"NO MESH TYPE";
129 output << mesh.
type <<
" indexVec: ";
131 output << index <<
" ";
std::vector< unsigned int > normIndVec
indexes of the normals (for unoptimized meshes)
Header file for V-ART class "Mesh".
std::ostream & operator<<(std::ostream &output, const Joint::DofID &dofId)
Mesh()
Creates an uninitialized mesh.
A mesh is part of an graphical object, in which faces are made of vertices according to some rule of ...
void IncrementIndices(unsigned int increment)
Returns the mesh type as OpenGL enum.
std::vector< unsigned int > indexVec
indexes of the vertices (start at 0) defining faces
Mesh & operator=(const Mesh &mesh)
bool DrawInstanceOGL() const
Draws the mesh assuming that its MeshObject is optimized.