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. | |
| virtual void | copyVboToClientSide () |
| Copy VBO to the Client Side. | |
| virtual void | releaseVboClientSide (bool update) |
| Release client VBO. | |
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. | |
| void | copyIndex (int lod, GLC_Mesh *pLodMesh, QHash< GLuint, GLuint > &sourceToTargetIndexMap, QHash< GLuint, GLuint > &tagetToSourceIndexMap, int &maxIndex, int targetLod) |
| Copy index of this mesh from the given LOD into the given mesh. | |
| void | copyBulkData (GLC_Mesh *pLodMesh, const QHash< GLuint, GLuint > &tagetToSourceIndexMap, int maxIndex) |
| Copy Bulk data. | |
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_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 (int lod) 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 contains 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. | |
| GLC_Mesh * | createMeshOfGivenLod (int lodIndex) |
| Create a mesh of the given LOD index. | |
| GLC_Mesh * | createMeshFromGivenLod (int lodIndex) |
| Create a mesh from the given LOD index. | |
| GLC_Mesh & | transformVertice (const GLC_Matrix4x4 &matrix) |
| Transform mesh vertice by the given matrix. | |
| 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 49 of file glc_mesh.h.
| typedef QHash<GLC_uint, GLC_PrimitiveGroup*> GLC_Mesh::LodPrimitiveGroups |
Definition at line 55 of file glc_mesh.h.
| typedef QHash<const int, LodPrimitiveGroups*> GLC_Mesh::PrimitiveGroupsHash |
Definition at line 56 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 1052 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 1084 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 222 of file glc_mesh.h.
Referenced by GLC_OffToWorld::CreateWorldFromOff().
| void GLC_Mesh::addNormals | ( | const GLfloatVector & | normals | ) | [inline] |
Add Normals.
Definition at line 211 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), copyBulkData(), GLC_3dsToWorld::create3DRep(), GLC_Sphere::createMesh(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::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 218 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), copyBulkData(), GLC_3dsToWorld::create3DRep(), GLC_Sphere::createMesh(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::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 508 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_MeshData, m_NextPrimitiveLocalId, m_PrimitiveGroups, setCurrentMaterial(), and GLC_MeshData::trianglesAdded().
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), copyIndex(), GLC_3dsToWorld::create3DRep(), GLC_ColladaToWorld::createMesh(), GLC_OffToWorld::CreateWorldFromOff(), GLC_StlToWorld::CreateWorldFromStl(), glDraw(), 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 551 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_MeshData, m_NextPrimitiveLocalId, m_PrimitiveGroups, setCurrentMaterial(), and GLC_MeshData::trianglesAdded().
Referenced by copyIndex(), 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 530 of file glc_mesh.cpp.
References GLC_Geometry::m_GeometryIsValid, m_MeshData, m_NextPrimitiveLocalId, m_PrimitiveGroups, setCurrentMaterial(), and GLC_MeshData::trianglesAdded().
Referenced by copyIndex(), GLC_Sphere::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::createMeshAndWire(), GLC_Box::createMeshAndWire(), and GLC_3dxmlToWorld::loadFace().
| void GLC_Mesh::addVertice | ( | const GLfloatVector & | vertices | ) | [inline] |
Add vertices coordinate.
Definition at line 204 of file glc_mesh.h.
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld(), copyBulkData(), GLC_3dsToWorld::create3DRep(), GLC_Sphere::createMesh(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::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 1247 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_Cone, GLC_Cylinder, GLC_Disc, GLC_Rectangle, and GLC_Sphere.
Definition at line 161 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_Cone, GLC_Cylinder, and GLC_Sphere.
Definition at line 143 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 463 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 474 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_NumberOfNormals, m_NumberOfVertice, and m_PrimitiveGroups.
Referenced by clear(), operator=(), GLC_Disc::setAngle(), GLC_Sphere::setDiscretion(), GLC_Disc::setDiscretion(), GLC_Cylinder::setDiscretion(), GLC_Cone::setDiscretion(), GLC_Cylinder::setEndedCaps(), GLC_Cylinder::setLength(), GLC_Cone::setLength(), GLC_Rectangle::setLength1(), GLC_Rectangle::setLength2(), GLC_Box::setLgX(), GLC_Box::setLgY(), GLC_Box::setLgZ(), GLC_Sphere::setRadius(), GLC_Disc::setRadius(), GLC_Cylinder::setRadius(), GLC_Cone::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_Cone, GLC_Cylinder, GLC_Disc, GLC_Rectangle, and GLC_Sphere.
Definition at line 190 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 100 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 304 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by copyIndex(), 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 150 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 240 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by copyIndex(), 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 196 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Referenced by copyIndex(), getTrianglesIndex(), and GLC_WorldTo3dxml::writeGeometryFace().
| void GLC_Mesh::copyBulkData | ( | GLC_Mesh * | pLodMesh, | |
| const QHash< GLuint, GLuint > & | tagetToSourceIndexMap, | |||
| int | maxIndex | |||
| ) | [private] |
Copy Bulk data.
Definition at line 1431 of file glc_mesh.cpp.
References addNormals(), addTexels(), addVertice(), m_MeshData, GLC_MeshData::normalVectorHandle(), GLC_MeshData::positionVectorHandle(), and GLC_MeshData::texelVectorHandle().
Referenced by createMeshFromGivenLod(), and createMeshOfGivenLod().
| void GLC_Mesh::copyIndex | ( | int | lod, | |
| GLC_Mesh * | pLodMesh, | |||
| QHash< GLuint, GLuint > & | sourceToTargetIndexMap, | |||
| QHash< GLuint, GLuint > & | tagetToSourceIndexMap, | |||
| int & | maxIndex, | |||
| int | targetLod | |||
| ) | [private] |
Copy index of this mesh from the given LOD into the given mesh.
The list of LOD material ID
Definition at line 1338 of file glc_mesh.cpp.
References GLC_Lod::accuracy(), addTriangles(), addTrianglesFan(), addTrianglesStrip(), containsFans(), containsStrips(), containsTriangles(), getFansIndex(), GLC_MeshData::getLod(), getStripsIndex(), getTrianglesIndex(), m_MeshData, m_PrimitiveGroups, GLC_Geometry::material(), and GLC_Geometry::materialCount().
Referenced by createMeshFromGivenLod(), and createMeshOfGivenLod().
| void GLC_Mesh::copyVboToClientSide | ( | ) | [virtual] |
Copy VBO to the Client Side.
Reimplemented from GLC_Geometry.
Definition at line 683 of file glc_mesh.cpp.
References GLC_MeshData::copyVboToClientSide(), and m_MeshData.
Referenced by createMeshFromGivenLod(), createMeshOfGivenLod(), and transformVertice().
| GLC_Mesh * GLC_Mesh::createMeshFromGivenLod | ( | int | lodIndex | ) |
Create a mesh from the given LOD index.
Definition at line 390 of file glc_mesh.cpp.
References copyBulkData(), copyIndex(), copyVboToClientSide(), finish(), GLC_MeshData::lodCount(), lodCount(), m_MeshData, GLC_Geometry::name(), releaseVboClientSide(), and GLC_Geometry::setName().
| GLC_Mesh * GLC_Mesh::createMeshOfGivenLod | ( | int | lodIndex | ) |
Create a mesh of the given LOD index.
Definition at line 367 of file glc_mesh.cpp.
References copyBulkData(), copyIndex(), copyVboToClientSide(), finish(), GLC_MeshData::lodCount(), m_MeshData, GLC_Geometry::name(), releaseVboClientSide(), and GLC_Geometry::setName().
| unsigned int GLC_Mesh::faceCount | ( | int | lod | ) | const [virtual] |
Get number of faces.
Reimplemented from GLC_Geometry.
Definition at line 149 of file glc_mesh.cpp.
References m_MeshData, and GLC_MeshData::trianglesCount().
Referenced by GLC_ObjToWorld::addCurrentObjMeshToWorld().
| void GLC_Mesh::fillVbosAndIbos | ( | ) | [private] |
Fill VBOs and IBOs.
Definition at line 1012 of file glc_mesh.cpp.
References GLC_MeshData::fillVbo(), 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, and GLC_MeshData::useIBO().
Referenced by glDraw().
| void GLC_Mesh::finish | ( | ) |
Copy vertex list in a vector list for Vertex Array Use.
Definition at line 589 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_Sphere::createMesh(), GLC_ColladaToWorld::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::createMeshAndWire(), GLC_Box::createMeshAndWire(), createMeshFromGivenLod(), createMeshOfGivenLod(), 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 1102 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 1044 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 1063 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 323 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 copyIndex(), 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 162 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 250 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 copyIndex(), 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 205 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 copyIndex(), 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_Cone, GLC_Cylinder, GLC_Disc, and GLC_Rectangle.
Definition at line 803 of file glc_mesh.cpp.
References activateVboAndIbo(), activateVertexArray(), GLC_RenderStatistics::addBodies(), addTriangles(), 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_MeshData::trianglesCount(), 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 173 of file glc_mesh.h.
Referenced by GLC_Sphere::boundingBox(), GLC_Rectangle::boundingBox(), GLC_Disc::boundingBox(), GLC_Cylinder::boundingBox(), GLC_Cone::boundingBox(), GLC_Box::boundingBox(), GLC_Sphere::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::createMeshAndWire(), GLC_Box::createMeshAndWire(), GLC_Rectangle::glDraw(), GLC_Disc::glDraw(), GLC_Cylinder::glDraw(), GLC_Cone::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 696 of file glc_mesh.cpp.
References GLC_Geometry::addMaterial(), GLC_Geometry::containsMaterial(), finishSerialized(), lodCount(), m_ChunkId, m_MeshData, 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 contains the specified material.
Definition at line 154 of file glc_mesh.h.
Referenced by GLC_WorldTo3dxml::writeGeometry().
| int GLC_Mesh::lodCount | ( | ) | const [inline] |
Return the number of lod.
Definition at line 104 of file glc_mesh.h.
Referenced by createMeshFromGivenLod(), loadFromDataStream(), and GLC_WorldTo3dxml::writeGeometry().
| GLC_uint GLC_Mesh::nextPrimitiveLocalId | ( | ) | const [inline] |
Return the next primitive local id.
Definition at line 169 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 1141 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 112 of file glc_mesh.h.
Referenced by GLC_Cone::createMeshAndWire(), and 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 314 of file glc_mesh.cpp.
References m_PrimitiveGroups.
| unsigned int GLC_Mesh::numberOfNormals | ( | ) | const [inline] |
Get number of normals.
Definition at line 90 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 295 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 231 of file glc_mesh.cpp.
References m_PrimitiveGroups.
Overload "=" operator.
Definition at line 78 of file glc_mesh.cpp.
References clearMeshWireAndBoundingBox(), m_ColorPearVertex, m_CurrentLod, m_DefaultMaterialId, m_MeshData, m_NextPrimitiveLocalId, 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 1180 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 1210 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 108 of file glc_mesh.h.
Referenced by GLC_WorldTo3dxml::writeGeometry().
| void GLC_Mesh::primitiveRenderLoop | ( | const GLC_RenderProperties & | renderProperties, | |
| bool | vboIsUsed | |||
| ) | [private] |
The primitive render loop.
Definition at line 1286 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 1312 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 1266 of file glc_mesh.cpp.
References GLC_State::isInSelectionMode(), m_CurrentLod, m_PrimitiveGroups, vboDrawInSelectionModePrimitivesOf(), and vertexArrayDrawInSelectionModePrimitivesOf().
Referenced by glDraw().
| void GLC_Mesh::releaseVboClientSide | ( | bool | update | ) | [virtual] |
Release client VBO.
Reimplemented from GLC_Geometry.
Definition at line 689 of file glc_mesh.cpp.
References m_MeshData, and GLC_MeshData::releaseVboClientSide().
Referenced by createMeshFromGivenLod(), createMeshOfGivenLod(), and transformVertice().
| void GLC_Mesh::replaceMasterMaterial | ( | GLC_Material * | pMat | ) | [virtual] |
Replace the Master material.
Reimplemented from GLC_Geometry.
Definition at line 623 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 637 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 572 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 756 of file glc_mesh.cpp.
References m_ChunkId, m_MeshData, 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 238 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 609 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 958 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 254 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 258 of file glc_mesh.h.
| GLfloatVector GLC_Mesh::texelVector | ( | ) | const [inline] |
Return the texel Vector.
Definition at line 116 of file glc_mesh.h.
Referenced by GLC_Sphere::createMesh(), GLC_Rectangle::createMeshAndWire(), GLC_Disc::createMeshAndWire(), GLC_Cylinder::createMeshAndWire(), GLC_Cone::createMeshAndWire(), GLC_Box::createMeshAndWire(), and GLC_WorldTo3dxml::writeGeometry().
| GLC_Mesh & GLC_Mesh::transformVertice | ( | const GLC_Matrix4x4 & | matrix | ) |
Transform mesh vertice by the given matrix.
Definition at line 426 of file glc_mesh.cpp.
References copyVboToClientSide(), GLC_Matrix4x4::Identity, m_MeshData, GLC_Geometry::m_pBoundingBox, GLC_MeshData::normalVectorHandle(), GLC_MeshData::positionVectorHandle(), releaseVboClientSide(), GLC_Matrix4x4::rotationMatrix(), and GLC_Matrix4x4::type().
Referenced by GLC_3DRep::transformSubGeometries().
| 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 475 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 568 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 413 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 753 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 518 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 659 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 442 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 898 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 155 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 177 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_Cone, GLC_Cylinder, and GLC_Sphere.
Definition at line 406 of file glc_mesh.h.
Referenced by chunckID(), loadFromDataStream(), and saveToDataStream().
bool GLC_Mesh::m_ColorPearVertex [private] |
Color pear vertex.
Definition at line 397 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 403 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 388 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 400 of file glc_mesh.h.
Referenced by activateVboAndIbo(), activateVertexArray(), addTriangles(), addTrianglesFan(), addTrianglesStrip(), boundingBox(), clearMeshWireAndBoundingBox(), copyBulkData(), copyIndex(), copyVboToClientSide(), createMeshFromGivenLod(), createMeshOfGivenLod(), faceCount(), fillVbosAndIbos(), finish(), finishNonVbo(), finishVbo(), getFansIndex(), getStripsIndex(), getTrianglesIndex(), glDraw(), loadFromDataStream(), operator=(), releaseVboClientSide(), reverseNormals(), saveToDataStream(), setCurrentLod(), setCurrentMaterial(), transformVertice(), vertexArrayDrawInSelectionModePrimitivesOf(), vertexArrayDrawPrimitivesGroupOf(), vertexArrayDrawPrimitivesOf(), and vertexArrayDrawSelectedPrimitivesGroupOf().
GLC_uint GLC_Mesh::m_NextPrimitiveLocalId [private] |
The next primitive local id.
Definition at line 382 of file glc_mesh.h.
Referenced by addTriangles(), addTrianglesFan(), addTrianglesStrip(), clearMeshWireAndBoundingBox(), and operator=().
unsigned int GLC_Mesh::m_NumberOfNormals [private] |
Mesh number of normals.
Definition at line 394 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 391 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 385 of file glc_mesh.h.
Referenced by addTriangles(), addTrianglesFan(), addTrianglesStrip(), bodySelectionRenderLoop(), clearMeshWireAndBoundingBox(), containsFans(), containsStrips(), containsTriangles(), copyIndex(), 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().