GLC_Mesh : OpenGL 3D Mesh. More...
#include <glc_mesh.h>
Public Types | |
| typedef QHash< GLC_uint, GLC_PrimitiveGroup * > | LodPrimitiveGroups |
| typedef QHash< const int, LodPrimitiveGroups * > | PrimitiveGroupsHash |
Public Member Functions | |
Constructor / Destructor | |
| GLC_Mesh () | |
| Default constructor. | |
| GLC_Mesh (const GLC_Mesh &) | |
| Copy constructor. | |
| GLC_Mesh & | operator= (const GLC_Mesh &) |
| Overload "=" operator. | |
| virtual | ~GLC_Mesh () |
| Destructor. | |
Set Functions | |
| virtual void | clear () |
| Clear the content of the mesh and super class and makes them empty. | |
| void | clearMeshWireAndBoundingBox () |
| Clear only the content off the mesh and makes it empty. | |
| void | addVertice (const GLfloatVector &vertices) |
| Add vertices coordinate. | |
| void | addNormals (const GLfloatVector &normals) |
| Add Normals. | |
| void | addTexels (const GLfloatVector &texels) |
| Add texel. | |
| void | addColors (const GLfloatVector &colors) |
| Add Colors. | |
| GLC_uint | addTriangles (GLC_Material *, const IndexList &, const int lod=0, double accuracy=0.0) |
| Add triangles. | |
| GLC_uint | addTrianglesStrip (GLC_Material *, const IndexList &, const int lod=0, double accuracy=0.0) |
| Add triangles Strip and return his id. | |
| GLC_uint | addTrianglesFan (GLC_Material *, const IndexList &, const int lod=0, double accuracy=0.0) |
| Add triangles Fan and return his id. | |
| void | reverseNormals () |
| Reverse mesh normal. | |
| void | setColorPearVertex (bool flag) |
| Set color per vertex flag to use indexed color. | |
| void | finish () |
| Copy vertex list in a vector list for Vertex Array Use. | |
| virtual void | setCurrentLod (const int) |
| Set the lod Index. | |
| virtual void | replaceMasterMaterial (GLC_Material *) |
| Replace the Master material. | |
| void | replaceMaterial (const GLC_uint, GLC_Material *) |
| Replace the material specified by id with another one. | |
| void | setNextPrimitiveLocalId (GLC_uint id) |
| Set the mesh next primitive local id. | |
| void | setWireColor (const QColor &color) |
| Set the mesh wire color. | |
Binary serialisation Functions | |
| void | loadFromDataStream (QDataStream &, const MaterialHash &, const QHash< GLC_uint, GLC_uint > &) |
| Load the mesh from binary data stream. | |
| void | saveToDataStream (QDataStream &) const |
| Save the mesh to binary data stream. | |
Protected Member Functions | |
OpenGL Functions | |
| virtual void | glDraw (const GLC_RenderProperties &) |
| Virtual interface for OpenGL Geometry set up. | |
Private Member Functions | |
Private services Functions | |
| GLC_uint | setCurrentMaterial (GLC_Material *, const int, double) |
| Set the current material. | |
| void | fillVbosAndIbos () |
| Fill VBOs and IBOs. | |
| void | finishSerialized () |
| Set primitive group offset after loading mesh from binary. | |
| void | finishVbo () |
| Move Indexs from the primitive groups to the mesh Data LOD and Set IBOs offsets. | |
| void | finishNonVbo () |
| Move Indexs from the primitive groups to the mesh Data LOD and Set Index offsets. | |
| void | vboDrawPrimitivesOf (GLC_PrimitiveGroup *) |
| Use VBO to Draw primitives from the specified GLC_PrimitiveGroup. | |
| void | vertexArrayDrawPrimitivesOf (GLC_PrimitiveGroup *) |
| Use Vertex Array to Draw primitives from the specified GLC_PrimitiveGroup. | |
| void | vboDrawInSelectionModePrimitivesOf (GLC_PrimitiveGroup *) |
| Use VBO to Draw primitives in selection mode from the specified GLC_PrimitiveGroup. | |
| void | vertexArrayDrawInSelectionModePrimitivesOf (GLC_PrimitiveGroup *) |
| Use Vertex Array to Draw primitives in selection mode from the specified GLC_PrimitiveGroup. | |
| void | vboDrawPrimitivesGroupOf (GLC_PrimitiveGroup *, GLC_Material *, bool, bool, QHash< GLC_uint, GLC_Material * > *) |
| Use VBO to Draw primitives with specific materials from the specified GLC_PrimitiveGroup. | |
| void | vertexArrayDrawPrimitivesGroupOf (GLC_PrimitiveGroup *, GLC_Material *, bool, bool, QHash< GLC_uint, GLC_Material * > *) |
| Use Vertex Array to Draw primitives with specific materials from the specified GLC_PrimitiveGroup. | |
| void | vboDrawSelectedPrimitivesGroupOf (GLC_PrimitiveGroup *, GLC_Material *, bool, bool, const GLC_RenderProperties &) |
| Use VBO to Draw primitives with selection materials from the specified GLC_PrimitiveGroup. | |
| void | vertexArrayDrawSelectedPrimitivesGroupOf (GLC_PrimitiveGroup *, GLC_Material *, bool, bool, const GLC_RenderProperties &) |
| Use Vertex Array to Draw primitives with selection materials from the specified GLC_PrimitiveGroup. | |
| void | activateVboAndIbo () |
| Activate mesh VBOs and IBO of the current LOD. | |
| void | activateVertexArray () |
| Activate vertex Array. | |
| void | normalRenderLoop (const GLC_RenderProperties &, bool) |
| The normal display loop. | |
| void | OverwriteMaterialRenderLoop (const GLC_RenderProperties &, bool) |
| The overwrite material render loop. | |
| void | OverwriteTransparencyRenderLoop (const GLC_RenderProperties &, bool) |
| The overwrite transparency render loop. | |
| void | bodySelectionRenderLoop (bool) |
| The body selection render loop. | |
| void | primitiveSelectionRenderLoop (bool) |
| The primitive selection render loop. | |
| void | primitiveRenderLoop (const GLC_RenderProperties &, bool) |
| The primitive render loop. | |
| void | primitiveSelectedRenderLoop (const GLC_RenderProperties &, bool) |
| The primitive Selected render loop. | |
Private Attributes | |
| GLC_uint | m_NextPrimitiveLocalId |
| The next primitive local id. | |
| PrimitiveGroupsHash | m_PrimitiveGroups |
| The hash table of Hash table of primitive group. | |
| GLC_uint | m_DefaultMaterialId |
| The default material Id. | |
| unsigned int | m_NumberOfFaces |
| Mesh number of faces. | |
| unsigned int | m_NumberOfVertice |
| Mesh number of vertice. | |
| unsigned int | m_NumberOfNormals |
| Mesh number of normals. | |
| bool | m_ColorPearVertex |
| Color pear vertex. | |
| GLC_MeshData | m_MeshData |
| Data of the mesh (Bulk Data + LOD with indexs). | |
| int | m_CurrentLod |
| The current LOD index. | |
Static Private Attributes | |
| static quint32 | m_ChunkId = 0xA701 |
| Class chunk id. | |
Friends | |
| QDataStream & | operator<< (QDataStream &, const GLC_Mesh &) |
| QDataStream & | operator>> (QDataStream &, GLC_Mesh &) |
Get Functions | |
|
| |
| virtual unsigned int | faceCount () const |
| Get number of faces. | |
| virtual unsigned int | VertexCount () const |
| Get number of vertex. | |
| unsigned int | numberOfNormals () const |
| Get number of normals. | |
| virtual const GLC_BoundingBox & | boundingBox (void) |
| return the mesh bounding box | |
| virtual GLC_Geometry * | clone () const |
| Return a copy of the Mesh as GLC_Geometry pointer. | |
| bool | ColorPearVertexIsAcivated () const |
| Return true if color pear vertex is activated. | |
| int | lodCount () const |
| Return the number of lod. | |
| GLfloatVector | positionVector () const |
| Return the Position Vector. | |
| GLfloatVector | normalVector () const |
| Return the normal Vector. | |
| GLfloatVector | texelVector () const |
| Return the texel Vector. | |
| bool | containsTriangles (int lod, GLC_uint materialId) const |
| Return true if the mesh contains triangles in the specified LOD. | |
| QVector< GLuint > | getTrianglesIndex (int lod, GLC_uint materialId) const |
| Return the triangle index. | |
| int | numberOfTriangles (int lod, GLC_uint materialId) const |
| Return the number of triangles in the specified LOD. | |
| bool | containsStrips (int lod, GLC_uint materialId) const |
| Return true if the mesh contains trips in the specified LOD with the specified material id. | |
| QList< QVector< GLuint > > | getStripsIndex (int lod, GLC_uint materialId) const |
| Return the strips index. | |
| int | numberOfStrips (int lod, GLC_uint materialId) const |
| Return the number of strips in the specified LOD with the specified material id. | |
| bool | containsFans (int lod, GLC_uint materialId) const |
| Return true if the mesh contains fans in the specified LOD with the specified material id. | |
| QList< QVector< GLuint > > | getFansIndex (int lod, GLC_uint materialId) const |
| Return the fans index. | |
| int | numberOfFans (int lod, GLC_uint materialId) const |
| Return the number of fans in the specified LOD with the specified material id. | |
| bool | containsLod (int lod) const |
| Return true if the mesh contains the specified LOD. | |
| bool | lodContainsMaterial (int lod, GLC_uint materialId) const |
| Return true if the specified LOD conatins the specified material. | |
| double | getLodAccuracy (int lod) const |
| Return the specified LOD accuracy. | |
| GLC_uint | nextPrimitiveLocalId () const |
| Return the next primitive local id. | |
| bool | isEmpty () const |
| Return true if the mesh position data is empty. | |
| QColor | wireColor () const |
| Return the mesh wire color. | |
| static quint32 | chunckID () |
| Return the class Chunk ID. | |
GLC_Mesh : OpenGL 3D Mesh.
An GLC_Mesh is Mesh composed of triangles, strips and fan
Definition at line 51 of file glc_mesh.h.
| typedef QHash<GLC_uint, GLC_PrimitiveGroup*> GLC_Mesh::LodPrimitiveGroups |
Definition at line 57 of file glc_mesh.h.
| typedef QHash<const int, LodPrimitiveGroups*> GLC_Mesh::PrimitiveGroupsHash |
Definition at line 58 of file glc_mesh.h.
| GLC_Mesh::GLC_Mesh | ( | ) |
| GLC_Mesh::GLC_Mesh | ( | const GLC_Mesh & | mesh | ) |
| GLC_Mesh::~GLC_Mesh | ( | ) | [virtual] |
| void GLC_Mesh::activateVboAndIbo | ( | ) | [inline, private] |
Activate mesh VBOs and IBO of the current LOD.
Definition at line 1036 of file glc_mesh.h.
References GLC_MeshData::GLC_Color, GLC_MeshData::GLC_Normal, GLC_MeshData::GLC_Texel, GLC_MeshData::GLC_Vertex, GLC_State::isInSelectionMode(), m_ColorPearVertex, m_CurrentLod, GLC_Geometry::m_IsSelected, m_MeshData, GLC_MeshData::useIBO(), and GLC_MeshData::useVBO().
Referenced by glDraw().
| void GLC_Mesh::activateVertexArray | ( | ) | [inline, private] |
Activate vertex Array.
Definition at line 1068 of file glc_mesh.h.
References GLC_MeshData::colorVectorHandle(), GLC_State::isInSelectionMode(), m_ColorPearVertex, GLC_Geometry::m_IsSelected, m_MeshData, GLC_MeshData::normalVectorHandle(), GLC_MeshData::positionVectorHandle(), and GLC_MeshData::texelVectorHandle().
Referenced by glDraw().
| void GLC_Mesh::addColors | ( | const GLfloatVector & | colors | ) | [inline] |
Add Colors.
Definition at line 215 of file glc_mesh.h.
Referenced by GLC_OffToWorld::CreateWorldFromOff().
| void GLC_Mesh::addNormals | ( | const GLfloatVector & | normals | ) | [inline] |
Add Normals.
Definition at line 204 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_3dxmlToWorld::createReferenceRep(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), GLC_3dxmlToWorld::loadCurrentExtRep(), and GLC_StlToWorld::scanFacet().
| void GLC_Mesh::addTexels | ( | const GLfloatVector & | texels | ) | [inline] |
Add texel.
Definition at line 211 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_3dxmlToWorld::createReferenceRep(), and GLC_3dxmlToWorld::loadCurrentExtRep().
| GLC_uint GLC_Mesh::addTriangles | ( | GLC_Material * | pMaterial, | |
| const IndexList & | indexList, | |||
| const int | lod = 0, |
|||
| double | accuracy = 0.0 | |||
| ) |
Add triangles.
Definition at line 422 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_NextPrimitiveLocalId, m_NumberOfFaces, m_PrimitiveGroups, and setCurrentMaterial().
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), GLC_3dxmlToWorld::loadFace(), and GLC_StlToWorld::scanFacet().
| GLC_uint GLC_Mesh::addTrianglesFan | ( | GLC_Material * | pMaterial, | |
| const IndexList & | indexList, | |||
| const int | lod = 0, |
|||
| double | accuracy = 0.0 | |||
| ) |
Add triangles Fan and return his id.
Definition at line 464 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_NextPrimitiveLocalId, m_NumberOfFaces, m_PrimitiveGroups, and setCurrentMaterial().
Referenced by GLC_Disc::createMeshAndWire(), and GLC_3dxmlToWorld::loadFace().
| GLC_uint GLC_Mesh::addTrianglesStrip | ( | GLC_Material * | pMaterial, | |
| const IndexList & | indexList, | |||
| const int | lod = 0, |
|||
| double | accuracy = 0.0 | |||
| ) |
Add triangles Strip and return his id.
Definition at line 444 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_NextPrimitiveLocalId, m_NumberOfFaces, m_PrimitiveGroups, and setCurrentMaterial().
Referenced by GLC_Rectangle::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), and GLC_3dxmlToWorld::loadFace().
| void GLC_Mesh::addVertice | ( | const GLfloatVector & | vertices | ) | [inline] |
Add vertices coordinate.
Definition at line 197 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_3dxmlToWorld::createReferenceRep(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), GLC_3dxmlToWorld::loadCurrentExtRep(), and GLC_StlToWorld::scanFacet().
| void GLC_Mesh::bodySelectionRenderLoop | ( | bool | vboIsUsed | ) | [private] |
The body selection render loop.
Definition at line 1173 of file glc_mesh.cpp.
References GLC_State::isInSelectionMode(), m_CurrentLod, m_PrimitiveGroups, vboDrawPrimitivesOf(), and vertexArrayDrawPrimitivesOf().
Referenced by glDraw().
| const GLC_BoundingBox & GLC_Mesh::boundingBox | ( | void | ) | [virtual] |
return the mesh bounding box
Implements GLC_Geometry.
Reimplemented in GLC_Box, GLC_Cylinder, GLC_Disc, and GLC_Rectangle.
Definition at line 165 of file glc_mesh.cpp.
References GLC_WireData::boundingBox(), GLC_BoundingBox::combine(), m_MeshData, GLC_Geometry::m_pBoundingBox, GLC_Geometry::m_WireData, and GLC_MeshData::positionVectorHandle().
Referenced by finish().
| quint32 GLC_Mesh::chunckID | ( | ) | [static] |
Return the class Chunk ID.
Reimplemented in GLC_Cylinder.
Definition at line 147 of file glc_mesh.cpp.
References m_ChunkId.
| void GLC_Mesh::clear | ( | ) | [virtual] |
Clear the content of the mesh and super class and makes them empty.
Reimplemented from GLC_Geometry.
Definition at line 376 of file glc_mesh.cpp.
References clearMeshWireAndBoundingBox().
| void GLC_Mesh::clearMeshWireAndBoundingBox | ( | ) |
Clear only the content off the mesh and makes it empty.
Definition at line 387 of file glc_mesh.cpp.
References GLC_MeshData::clear(), GLC_Geometry::clearWireAndBoundingBox(), m_ColorPearVertex, m_CurrentLod, m_DefaultMaterialId, GLC_Geometry::m_IsSelected, m_MeshData, m_NextPrimitiveLocalId, m_NumberOfFaces, m_NumberOfNormals, m_NumberOfVertice, and m_PrimitiveGroups.
Referenced by clear(), operator=(), GLC_Disc::setAngle(), GLC_Disc::setDiscretion(), GLC_Cylinder::setDiscretion(), GLC_Cylinder::setEndedCaps(), GLC_Cylinder::setLength(), GLC_Rectangle::setLength1(), GLC_Rectangle::setLength2(), GLC_Box::setLgX(), GLC_Box::setLgY(), GLC_Box::setLgZ(), GLC_Disc::setRadius(), GLC_Cylinder::setRadius(), and GLC_Rectangle::setRectangle().
| GLC_Geometry * GLC_Mesh::clone | ( | ) | const [virtual] |
Return a copy of the Mesh as GLC_Geometry pointer.
Implements GLC_Geometry.
Reimplemented in GLC_Box, GLC_Cylinder, GLC_Disc, and GLC_Rectangle.
Definition at line 194 of file glc_mesh.cpp.
References GLC_Mesh().
| bool GLC_Mesh::ColorPearVertexIsAcivated | ( | ) | const [inline] |
Return true if color pear vertex is activated.
Definition at line 102 of file glc_mesh.h.
| bool GLC_Mesh::containsFans | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return true if the mesh contains fans in the specified LOD with the specified material id.
Definition at line 308 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by GLC_Distance::addMeshTrianglesToPQP(), getFansIndex(), and GLC_WorldTo3dxml::writeGeometryFace().
| bool GLC_Mesh::containsLod | ( | int | lod | ) | const [inline] |
Return true if the mesh contains the specified LOD.
Definition at line 152 of file glc_mesh.h.
| bool GLC_Mesh::containsStrips | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return true if the mesh contains trips in the specified LOD with the specified material id.
Definition at line 244 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by GLC_Distance::addMeshTrianglesToPQP(), getStripsIndex(), and GLC_WorldTo3dxml::writeGeometryFace().
| bool GLC_Mesh::containsTriangles | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return true if the mesh contains triangles in the specified LOD.
Definition at line 200 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by GLC_Distance::addMeshTrianglesToPQP(), getTrianglesIndex(), and GLC_WorldTo3dxml::writeGeometryFace().
| unsigned int GLC_Mesh::faceCount | ( | ) | const [virtual] |
Get number of faces.
Reimplemented from GLC_Geometry.
Definition at line 153 of file glc_mesh.cpp.
References m_NumberOfFaces.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld().
| void GLC_Mesh::fillVbosAndIbos | ( | ) | [private] |
Fill VBOs and IBOs.
Definition at line 912 of file glc_mesh.cpp.
References GLC_MeshData::colorVectorHandle(), GLC_MeshData::finishVbo(), glBufferData, GLC_MeshData::GLC_Color, GLC_MeshData::GLC_Normal, GLC_MeshData::GLC_Texel, GLC_MeshData::GLC_Vertex, GLC_MeshData::indexVectorHandle(), GLC_MeshData::lodCount(), m_MeshData, GLC_MeshData::normalVectorHandle(), GLC_MeshData::positionVectorHandle(), GLC_MeshData::texelVectorHandle(), GLC_MeshData::useIBO(), and GLC_MeshData::useVBO().
Referenced by glDraw().
| void GLC_Mesh::finish | ( | ) |
Copy vertex list in a vector list for Vertex Array Use.
Definition at line 502 of file glc_mesh.cpp.
References boundingBox(), GLC_MeshData::finishLod(), finishNonVbo(), finishVbo(), m_MeshData, and GLC_State::vboUsed().
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_3dxmlToWorld::createReferenceRep(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), GLC_3dxmlToWorld::loadCurrentExtRep(), and GLC_StlToWorld::scanFacet().
| void GLC_Mesh::finishNonVbo | ( | ) | [private] |
Move Indexs from the primitive groups to the mesh Data LOD and Set Index offsets.
Definition at line 1028 of file glc_mesh.cpp.
References GLC_MeshData::indexVectorHandle(), GLC_MeshData::indexVectorSize(), m_MeshData, and m_PrimitiveGroups.
Referenced by finish().
| void GLC_Mesh::finishSerialized | ( | ) | [private] |
Set primitive group offset after loading mesh from binary.
Definition at line 970 of file glc_mesh.cpp.
References m_PrimitiveGroups, and GLC_State::vboUsed().
Referenced by loadFromDataStream().
| void GLC_Mesh::finishVbo | ( | ) | [private] |
Move Indexs from the primitive groups to the mesh Data LOD and Set IBOs offsets.
Definition at line 989 of file glc_mesh.cpp.
References BUFFER_OFFSET, GLC_MeshData::indexVectorHandle(), GLC_MeshData::indexVectorSize(), m_MeshData, and m_PrimitiveGroups.
Referenced by finish().
| QList< QVector< GLuint > > GLC_Mesh::getFansIndex | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the fans index.
The specified LOD must exists and uses the specified material id
Definition at line 327 of file glc_mesh.cpp.
References containsFans(), GLC_PrimitiveGroup::fansOffset(), GLC_PrimitiveGroup::fansOffseti(), GLC_PrimitiveGroup::fansSizes(), GLC_MeshData::indexVector(), m_MeshData, m_PrimitiveGroups, and GLC_State::vboUsed().
Referenced by GLC_Distance::addMeshTrianglesToPQP(), and GLC_WorldTo3dxml::writeGeometryFace().
| double GLC_Mesh::getLodAccuracy | ( | int | lod | ) | const [inline] |
Return the specified LOD accuracy.
The specified LOD must exists
Definition at line 164 of file glc_mesh.h.
Referenced by GLC_WorldTo3dxml::writeGeometry().
| QList< QVector< GLuint > > GLC_Mesh::getStripsIndex | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the strips index.
The specified LOD must exists and uses the specified material id
Definition at line 254 of file glc_mesh.cpp.
References containsStrips(), GLC_MeshData::indexVector(), m_MeshData, m_PrimitiveGroups, GLC_PrimitiveGroup::stripsOffset(), GLC_PrimitiveGroup::stripsOffseti(), GLC_PrimitiveGroup::stripsSizes(), and GLC_State::vboUsed().
Referenced by GLC_Distance::addMeshTrianglesToPQP(), and GLC_WorldTo3dxml::writeGeometryFace().
| QVector< GLuint > GLC_Mesh::getTrianglesIndex | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the triangle index.
The specified LOD must exists and uses the specified material id
Definition at line 209 of file glc_mesh.cpp.
References containsTriangles(), GLC_MeshData::indexVector(), m_MeshData, m_PrimitiveGroups, GLC_PrimitiveGroup::trianglesIndexOffset(), GLC_PrimitiveGroup::trianglesIndexOffseti(), GLC_PrimitiveGroup::trianglesIndexSize(), and GLC_State::vboUsed().
Referenced by GLC_Distance::addMeshTrianglesToPQP(), and GLC_WorldTo3dxml::writeGeometryFace().
| void GLC_Mesh::glDraw | ( | const GLC_RenderProperties & | renderProperties | ) | [protected, virtual] |
Virtual interface for OpenGL Geometry set up.
This Virtual function is implemented here.
Implements GLC_Geometry.
Reimplemented in GLC_Box, GLC_Cylinder, GLC_Disc, and GLC_Rectangle.
Definition at line 707 of file glc_mesh.cpp.
References activateVboAndIbo(), activateVertexArray(), glc::BodySelection, bodySelectionRenderLoop(), GLC_MeshData::createVBOs(), fillVbosAndIbos(), glBufferData, GLC_MeshData::GLC_Normal, GLC_WireData::glDraw(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterialsIsEmpty(), GLC_WireData::isEmpty(), GLC_State::isInSelectionMode(), m_ColorPearVertex, m_CurrentLod, GLC_Geometry::m_GeometryIsValid, GLC_Geometry::m_IsSelected, m_MeshData, GLC_Geometry::m_WireColor, GLC_Geometry::m_WireData, normalRenderLoop(), glc::NormalRenderMode, GLC_MeshData::normalVectorHandle(), glc::OverwriteMaterial, OverwriteMaterialRenderLoop(), glc::OverwritePrimitiveMaterial, glc::OverwriteTransparency, OverwriteTransparencyRenderLoop(), GLC_MeshData::positionVectorHandle(), primitiveRenderLoop(), glc::PrimitiveSelected, primitiveSelectedRenderLoop(), glc::PrimitiveSelection, primitiveSelectionRenderLoop(), GLC_RenderProperties::renderingFlag(), GLC_RenderProperties::renderingMode(), GLC_RenderProperties::savedRenderingMode(), GLC_RenderProperties::setOfSelectedPrimitiveIdIsEmpty(), GLC_Geometry::typeIsWire(), GLC_MeshData::useIBO(), GLC_MeshData::useVBO(), GLC_State::vboUsed(), and glc::WireRenderFlag.
| bool GLC_Mesh::isEmpty | ( | void | ) | const [inline] |
Return true if the mesh position data is empty.
Definition at line 175 of file glc_mesh.h.
Referenced by GLC_Rectangle::boundingBox(), GLC_Disc::boundingBox(), GLC_Cylinder::boundingBox(), GLC_Box::boundingBox(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_Rectangle::glDraw(), GLC_Disc::glDraw(), GLC_Cylinder::glDraw(), and GLC_Box::glDraw().
| void GLC_Mesh::loadFromDataStream | ( | QDataStream & | stream, | |
| const MaterialHash & | materialHash, | |||
| const QHash< GLC_uint, GLC_uint > & | materialIdMap | |||
| ) |
Load the mesh from binary data stream.
The MaterialHash contains a hash table of GLC_Material that the mesh can use The QHash<GLC_uint, GLC_uint> is used to map serialised material ID to the new constructed materials
Definition at line 597 of file glc_mesh.cpp.
References GLC_Geometry::addMaterial(), GLC_Geometry::containsMaterial(), finishSerialized(), lodCount(), m_ChunkId, m_MeshData, m_NumberOfFaces, m_NumberOfNormals, m_NumberOfVertice, m_PrimitiveGroups, GLC_Geometry::m_WireData, GLC_Geometry::setName(), and setNextPrimitiveLocalId().
Referenced by operator>>().
| bool GLC_Mesh::lodContainsMaterial | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const [inline] |
Return true if the specified LOD conatins the specified material.
Definition at line 156 of file glc_mesh.h.
Referenced by GLC_Distance::addMeshTrianglesToPQP(), and GLC_WorldTo3dxml::writeGeometry().
| int GLC_Mesh::lodCount | ( | ) | const [inline] |
Return the number of lod.
Definition at line 106 of file glc_mesh.h.
Referenced by loadFromDataStream(), and GLC_WorldTo3dxml::writeGeometry().
| GLC_uint GLC_Mesh::nextPrimitiveLocalId | ( | ) | const [inline] |
Return the next primitive local id.
Definition at line 171 of file glc_mesh.h.
Referenced by saveToDataStream().
| void GLC_Mesh::normalRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The normal display loop.
Definition at line 1067 of file glc_mesh.cpp.
References GLC_SelectionMaterial::glExecute(), GLC_Material::glExecute(), GLC_PrimitiveGroup::id(), GLC_State::isInSelectionMode(), GLC_Material::isTransparent(), GLC_Geometry::isTransparent(), m_CurrentLod, GLC_Geometry::m_IsSelected, GLC_Geometry::m_MaterialHash, m_PrimitiveGroups, GLC_RenderProperties::renderingFlag(), glc::TransparentRenderFlag, vboDrawPrimitivesOf(), and vertexArrayDrawPrimitivesOf().
Referenced by glDraw().
| GLfloatVector GLC_Mesh::normalVector | ( | ) | const [inline] |
Return the normal Vector.
Definition at line 114 of file glc_mesh.h.
Referenced by GLC_WorldTo3dxml::writeGeometry().
| int GLC_Mesh::numberOfFans | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the number of fans in the specified LOD with the specified material id.
Return the number of fans.
Definition at line 318 of file glc_mesh.cpp.
References m_PrimitiveGroups.
| unsigned int GLC_Mesh::numberOfNormals | ( | ) | const [inline] |
Get number of normals.
Definition at line 92 of file glc_mesh.h.
| int GLC_Mesh::numberOfStrips | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the number of strips in the specified LOD with the specified material id.
Definition at line 299 of file glc_mesh.cpp.
References m_PrimitiveGroups.
| int GLC_Mesh::numberOfTriangles | ( | int | lod, | |
| GLC_uint | materialId | |||
| ) | const |
Return the number of triangles in the specified LOD.
Definition at line 235 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Overload "=" operator.
Definition at line 81 of file glc_mesh.cpp.
References clearMeshWireAndBoundingBox(), m_ColorPearVertex, m_CurrentLod, m_DefaultMaterialId, m_MeshData, m_NextPrimitiveLocalId, m_NumberOfFaces, m_NumberOfNormals, m_NumberOfVertice, and m_PrimitiveGroups.
| void GLC_Mesh::OverwriteMaterialRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The overwrite material render loop.
Definition at line 1106 of file glc_mesh.cpp.
References GLC_SelectionMaterial::glExecute(), GLC_Material::glExecute(), GLC_Material::isTransparent(), m_CurrentLod, GLC_Geometry::m_IsSelected, m_PrimitiveGroups, GLC_RenderProperties::overwriteMaterial(), GLC_RenderProperties::renderingFlag(), glc::TransparentRenderFlag, vboDrawPrimitivesOf(), and vertexArrayDrawPrimitivesOf().
Referenced by glDraw().
| void GLC_Mesh::OverwriteTransparencyRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The overwrite transparency render loop.
Definition at line 1136 of file glc_mesh.cpp.
References GLC_SelectionMaterial::glExecute(), GLC_Material::glExecute(), GLC_PrimitiveGroup::id(), m_CurrentLod, GLC_Geometry::m_IsSelected, GLC_Geometry::m_MaterialHash, m_PrimitiveGroups, GLC_RenderProperties::overwriteTransparency(), GLC_RenderProperties::renderingFlag(), glc::TransparentRenderFlag, vboDrawPrimitivesOf(), and vertexArrayDrawPrimitivesOf().
Referenced by glDraw().
| GLfloatVector GLC_Mesh::positionVector | ( | ) | const [inline] |
Return the Position Vector.
Definition at line 110 of file glc_mesh.h.
Referenced by GLC_Distance::addMeshTrianglesToPQP(), and GLC_WorldTo3dxml::writeGeometry().
| void GLC_Mesh::primitiveRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The primitive render loop.
Definition at line 1212 of file glc_mesh.cpp.
References GLC_Material::glExecute(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterials(), GLC_PrimitiveGroup::id(), GLC_Material::isTransparent(), GLC_Geometry::isTransparent(), m_CurrentLod, GLC_Geometry::m_MaterialHash, m_PrimitiveGroups, GLC_RenderProperties::renderingFlag(), glc::TransparentRenderFlag, vboDrawPrimitivesGroupOf(), and vertexArrayDrawPrimitivesGroupOf().
Referenced by glDraw().
| void GLC_Mesh::primitiveSelectedRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The primitive Selected render loop.
Definition at line 1238 of file glc_mesh.cpp.
References GLC_Material::glExecute(), GLC_PrimitiveGroup::id(), GLC_Material::isTransparent(), GLC_Geometry::isTransparent(), m_CurrentLod, GLC_Geometry::m_MaterialHash, m_PrimitiveGroups, GLC_RenderProperties::renderingFlag(), glc::TransparentRenderFlag, vboDrawSelectedPrimitivesGroupOf(), and vertexArrayDrawSelectedPrimitivesGroupOf().
Referenced by glDraw().
| void GLC_Mesh::primitiveSelectionRenderLoop | ( | bool | vboIsUsed | ) | [private] |
The primitive selection render loop.
Definition at line 1192 of file glc_mesh.cpp.
References GLC_State::isInSelectionMode(), m_CurrentLod, m_PrimitiveGroups, vboDrawInSelectionModePrimitivesOf(), and vertexArrayDrawInSelectionModePrimitivesOf().
Referenced by glDraw().
| void GLC_Mesh::replaceMasterMaterial | ( | GLC_Material * | pMat | ) | [virtual] |
Replace the Master material.
Reimplemented from GLC_Geometry.
Definition at line 536 of file glc_mesh.cpp.
References GLC_Geometry::addMaterial(), GLC_Geometry::firstMaterial(), GLC_Geometry::hasMaterial(), GLC_Object::id(), and replaceMaterial().
Referenced by GLC_CuttingPlane::create3DviewInstance(), and GLC_Factory::createCuttingPlane().
| void GLC_Mesh::replaceMaterial | ( | const GLC_uint | oldId, | |
| GLC_Material * | pMat | |||
| ) |
Replace the material specified by id with another one.
Definition at line 550 of file glc_mesh.cpp.
References GLC_Geometry::addMaterial(), GLC_Geometry::containsMaterial(), GLC_Object::id(), GLC_Geometry::m_MaterialHash, m_PrimitiveGroups, GLC_Geometry::removeMaterial(), and GLC_PrimitiveGroup::setId().
Referenced by replaceMasterMaterial(), and GLC_3DRep::replaceMaterial().
| void GLC_Mesh::reverseNormals | ( | ) | [virtual] |
Reverse mesh normal.
Reimplemented from GLC_Geometry.
Definition at line 485 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_MeshData, GLC_MeshData::normalVector(), and GLC_MeshData::normalVectorHandle().
| void GLC_Mesh::saveToDataStream | ( | QDataStream & | stream | ) | const |
Save the mesh to binary data stream.
Definition at line 659 of file glc_mesh.cpp.
References m_ChunkId, m_MeshData, m_NumberOfFaces, m_NumberOfNormals, m_NumberOfVertice, m_PrimitiveGroups, GLC_Geometry::m_WireData, GLC_Geometry::name(), and nextPrimitiveLocalId().
Referenced by operator<<().
| void GLC_Mesh::setColorPearVertex | ( | bool | flag | ) | [inline] |
Set color per vertex flag to use indexed color.
Definition at line 231 of file glc_mesh.h.
Referenced by GLC_OffToWorld::CreateWorldFromOff().
| void GLC_Mesh::setCurrentLod | ( | const int | value | ) | [virtual] |
Set the lod Index.
Reimplemented from GLC_Geometry.
Definition at line 522 of file glc_mesh.cpp.
References GLC_MeshData::lodCount(), m_CurrentLod, and m_MeshData.
| GLC_uint GLC_Mesh::setCurrentMaterial | ( | GLC_Material * | pMaterial, | |
| const | int, | |||
| double | accuracy | |||
| ) | [private] |
Set the current material.
Definition at line 858 of file glc_mesh.cpp.
References GLC_Geometry::addMaterial(), GLC_MeshData::appendLod(), GLC_Geometry::containsMaterial(), GLC_Object::id(), m_DefaultMaterialId, m_MeshData, and m_PrimitiveGroups.
Referenced by addTriangles(), addTrianglesFan(), and addTrianglesStrip().
| void GLC_Mesh::setNextPrimitiveLocalId | ( | GLC_uint | id | ) | [inline] |
Set the mesh next primitive local id.
Definition at line 247 of file glc_mesh.h.
Referenced by loadFromDataStream().
| void GLC_Mesh::setWireColor | ( | const QColor & | color | ) | [inline] |
Set the mesh wire color.
Reimplemented from GLC_Geometry.
Definition at line 251 of file glc_mesh.h.
| GLfloatVector GLC_Mesh::texelVector | ( | ) | const [inline] |
Return the texel Vector.
Definition at line 118 of file glc_mesh.h.
Referenced by GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Box::createMeshAndWire(), and GLC_WorldTo3dxml::writeGeometry().
| void GLC_Mesh::vboDrawInSelectionModePrimitivesOf | ( | GLC_PrimitiveGroup * | pCurrentGroup | ) | [inline, private] |
Use VBO to Draw primitives in selection mode from the specified GLC_PrimitiveGroup.
Definition at line 459 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTrianglesGroupId(), glc::encodeRgbId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffset(), GLC_PrimitiveGroup::fansSizes(), GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffset(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffset(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveSelectionRenderLoop().
| void GLC_Mesh::vboDrawPrimitivesGroupOf | ( | GLC_PrimitiveGroup * | pCurrentGroup, | |
| GLC_Material * | pCurrentMaterial, | |||
| bool | materialIsRenderable, | |||
| bool | isTransparent, | |||
| QHash< GLC_uint, GLC_Material * > * | pMaterialHash | |||
| ) | [inline, private] |
Use VBO to Draw primitives with specific materials from the specified GLC_PrimitiveGroup.
Definition at line 552 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::containsTrianglesGroupId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffset(), GLC_PrimitiveGroup::fansSizes(), GLC_Material::glExecute(), GLC_Material::isTransparent(), GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffset(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffset(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveRenderLoop().
| void GLC_Mesh::vboDrawPrimitivesOf | ( | GLC_PrimitiveGroup * | pCurrentGroup | ) | [inline, private] |
Use VBO to Draw primitives from the specified GLC_PrimitiveGroup.
Definition at line 397 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::fansOffset(), GLC_PrimitiveGroup::fansSizes(), GLC_PrimitiveGroup::stripsOffset(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::trianglesIndexOffset(), and GLC_PrimitiveGroup::trianglesIndexSize().
Referenced by bodySelectionRenderLoop(), normalRenderLoop(), OverwriteMaterialRenderLoop(), and OverwriteTransparencyRenderLoop().
| void GLC_Mesh::vboDrawSelectedPrimitivesGroupOf | ( | GLC_PrimitiveGroup * | pCurrentGroup, | |
| GLC_Material * | pCurrentMaterial, | |||
| bool | materialIsRenderable, | |||
| bool | isTransparent, | |||
| const GLC_RenderProperties & | renderProperties | |||
| ) | [inline, private] |
Use VBO to Draw primitives with selection materials from the specified GLC_PrimitiveGroup.
Definition at line 737 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::containsTrianglesGroupId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffset(), GLC_PrimitiveGroup::fansSizes(), GLC_Material::glExecute(), GLC_SelectionMaterial::glExecute(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterials(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterialsIsEmpty(), GLC_RenderProperties::setOfSelectedPrimitivesId(), GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffset(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffset(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveSelectedRenderLoop().
| void GLC_Mesh::vertexArrayDrawInSelectionModePrimitivesOf | ( | GLC_PrimitiveGroup * | pCurrentGroup | ) | [inline, private] |
Use Vertex Array to Draw primitives in selection mode from the specified GLC_PrimitiveGroup.
Definition at line 502 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTrianglesGroupId(), glc::encodeRgbId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffseti(), GLC_PrimitiveGroup::fansSizes(), GLC_MeshData::indexVectorHandle(), m_CurrentLod, m_MeshData, GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffseti(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffseti(), GLC_PrimitiveGroup::trianglesIndexOffseti(), GLC_PrimitiveGroup::trianglesIndexSize(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveSelectionRenderLoop().
| void GLC_Mesh::vertexArrayDrawPrimitivesGroupOf | ( | GLC_PrimitiveGroup * | pCurrentGroup, | |
| GLC_Material * | pCurrentMaterial, | |||
| bool | materialIsRenderable, | |||
| bool | isTransparent, | |||
| QHash< GLC_uint, GLC_Material * > * | pMaterialHash | |||
| ) | [inline, private] |
Use Vertex Array to Draw primitives with specific materials from the specified GLC_PrimitiveGroup.
Definition at line 643 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::containsTrianglesGroupId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffseti(), GLC_PrimitiveGroup::fansSizes(), GLC_Material::glExecute(), GLC_MeshData::indexVectorHandle(), GLC_Material::isTransparent(), m_CurrentLod, m_MeshData, GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffseti(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffseti(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveRenderLoop().
| void GLC_Mesh::vertexArrayDrawPrimitivesOf | ( | GLC_PrimitiveGroup * | pCurrentGroup | ) | [inline, private] |
Use Vertex Array to Draw primitives from the specified GLC_PrimitiveGroup.
Definition at line 426 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::fansOffseti(), GLC_PrimitiveGroup::fansSizes(), GLC_MeshData::indexVectorHandle(), m_CurrentLod, m_MeshData, GLC_PrimitiveGroup::stripsOffseti(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::trianglesIndexOffseti(), and GLC_PrimitiveGroup::trianglesIndexSize().
Referenced by bodySelectionRenderLoop(), normalRenderLoop(), OverwriteMaterialRenderLoop(), and OverwriteTransparencyRenderLoop().
| void GLC_Mesh::vertexArrayDrawSelectedPrimitivesGroupOf | ( | GLC_PrimitiveGroup * | pCurrentGroup, | |
| GLC_Material * | pCurrentMaterial, | |||
| bool | materialIsRenderable, | |||
| bool | isTransparent, | |||
| const GLC_RenderProperties & | renderProperties | |||
| ) | [inline, private] |
Use Vertex Array to Draw primitives with selection materials from the specified GLC_PrimitiveGroup.
Definition at line 882 of file glc_mesh.h.
References GLC_PrimitiveGroup::containsFan(), GLC_PrimitiveGroup::containsFanGroupId(), GLC_PrimitiveGroup::containsStrip(), GLC_PrimitiveGroup::containsStripGroupId(), GLC_PrimitiveGroup::containsTriangles(), GLC_PrimitiveGroup::containsTrianglesGroupId(), GLC_PrimitiveGroup::fanGroupId(), GLC_PrimitiveGroup::fansOffseti(), GLC_PrimitiveGroup::fansSizes(), GLC_Material::glExecute(), GLC_SelectionMaterial::glExecute(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterials(), GLC_RenderProperties::hashOfOverwritePrimitiveMaterialsIsEmpty(), GLC_MeshData::indexVectorHandle(), m_CurrentLod, m_MeshData, GLC_RenderProperties::setOfSelectedPrimitivesId(), GLC_PrimitiveGroup::stripGroupId(), GLC_PrimitiveGroup::stripsOffseti(), GLC_PrimitiveGroup::stripsSizes(), GLC_PrimitiveGroup::triangleGroupId(), GLC_PrimitiveGroup::trianglesGroupOffseti(), and GLC_PrimitiveGroup::trianglesIndexSizes().
Referenced by primitiveSelectedRenderLoop().
| unsigned int GLC_Mesh::VertexCount | ( | ) | const [virtual] |
Get number of vertex.
Reimplemented from GLC_Geometry.
Definition at line 159 of file glc_mesh.cpp.
References m_NumberOfVertice.
| QColor GLC_Mesh::wireColor | ( | ) | const [inline] |
Return the mesh wire color.
Reimplemented from GLC_Geometry.
Definition at line 179 of file glc_mesh.h.
Referenced by GLC_WorldTo3dxml::writeEdges().
| QDataStream& operator<< | ( | QDataStream & | , | |
| const GLC_Mesh & | ||||
| ) | [friend] |
| QDataStream& operator>> | ( | QDataStream & | , | |
| GLC_Mesh & | ||||
| ) | [friend] |
quint32 GLC_Mesh::m_ChunkId = 0xA701 [static, private] |
Class chunk id.
Reimplemented in GLC_Cylinder.
Definition at line 390 of file glc_mesh.h.
Referenced by chunckID(), loadFromDataStream(), and saveToDataStream().
bool GLC_Mesh::m_ColorPearVertex [private] |
Color pear vertex.
Definition at line 381 of file glc_mesh.h.
Referenced by activateVboAndIbo(), activateVertexArray(), clearMeshWireAndBoundingBox(), glDraw(), and operator=().
int GLC_Mesh::m_CurrentLod [private] |
The current LOD index.
Definition at line 387 of file glc_mesh.h.
Referenced by activateVboAndIbo(), bodySelectionRenderLoop(), clearMeshWireAndBoundingBox(), glDraw(), normalRenderLoop(), operator=(), OverwriteMaterialRenderLoop(), OverwriteTransparencyRenderLoop(), primitiveRenderLoop(), primitiveSelectedRenderLoop(), primitiveSelectionRenderLoop(), setCurrentLod(), vertexArrayDrawInSelectionModePrimitivesOf(), vertexArrayDrawPrimitivesGroupOf(), vertexArrayDrawPrimitivesOf(), and vertexArrayDrawSelectedPrimitivesGroupOf().
GLC_uint GLC_Mesh::m_DefaultMaterialId [private] |
The default material Id.
Definition at line 369 of file glc_mesh.h.
Referenced by clearMeshWireAndBoundingBox(), operator=(), and setCurrentMaterial().
GLC_MeshData GLC_Mesh::m_MeshData [private] |
Data of the mesh (Bulk Data + LOD with indexs).
Definition at line 384 of file glc_mesh.h.
Referenced by activateVboAndIbo(), activateVertexArray(), boundingBox(), clearMeshWireAndBoundingBox(), fillVbosAndIbos(), finish(), finishNonVbo(), finishVbo(), getFansIndex(), getStripsIndex(), getTrianglesIndex(), glDraw(), loadFromDataStream(), operator=(), reverseNormals(), saveToDataStream(), setCurrentLod(), setCurrentMaterial(), vertexArrayDrawInSelectionModePrimitivesOf(), vertexArrayDrawPrimitivesGroupOf(), vertexArrayDrawPrimitivesOf(), and vertexArrayDrawSelectedPrimitivesGroupOf().
GLC_uint GLC_Mesh::m_NextPrimitiveLocalId [private] |
The next primitive local id.
Definition at line 363 of file glc_mesh.h.
Referenced by addTriangles(), addTrianglesFan(), addTrianglesStrip(), clearMeshWireAndBoundingBox(), and operator=().
unsigned int GLC_Mesh::m_NumberOfFaces [private] |
Mesh number of faces.
Definition at line 372 of file glc_mesh.h.
Referenced by addTriangles(), addTrianglesFan(), addTrianglesStrip(), clearMeshWireAndBoundingBox(), faceCount(), loadFromDataStream(), operator=(), and saveToDataStream().
unsigned int GLC_Mesh::m_NumberOfNormals [private] |
Mesh number of normals.
Definition at line 378 of file glc_mesh.h.
Referenced by clearMeshWireAndBoundingBox(), loadFromDataStream(), operator=(), and saveToDataStream().
unsigned int GLC_Mesh::m_NumberOfVertice [private] |
Mesh number of vertice.
Definition at line 375 of file glc_mesh.h.
Referenced by clearMeshWireAndBoundingBox(), loadFromDataStream(), operator=(), saveToDataStream(), and VertexCount().
The hash table of Hash table of primitive group.
Definition at line 366 of file glc_mesh.h.
Referenced by addTriangles(), addTrianglesFan(), addTrianglesStrip(), bodySelectionRenderLoop(), clearMeshWireAndBoundingBox(), containsFans(), containsStrips(), containsTriangles(), finishNonVbo(), finishSerialized(), finishVbo(), getFansIndex(), getStripsIndex(), getTrianglesIndex(), GLC_Mesh(), loadFromDataStream(), normalRenderLoop(), numberOfFans(), numberOfStrips(), numberOfTriangles(), operator=(), OverwriteMaterialRenderLoop(), OverwriteTransparencyRenderLoop(), primitiveRenderLoop(), primitiveSelectedRenderLoop(), primitiveSelectionRenderLoop(), replaceMaterial(), saveToDataStream(), setCurrentMaterial(), and ~GLC_Mesh().