GLC_3DRep Class Reference

GLC_3DRep : A referrence 3D Representation. More...

#include <glc_3drep.h>

Inheritance diagram for GLC_3DRep:
GLC_Rep

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_3DRep ()
 Default Constructor.
 GLC_3DRep (GLC_Geometry *)
 Construct a 3DRep with a geometry.
 GLC_3DRep (const GLC_3DRep &)
 Copy Constructor.
virtual GLC_3DRepoperator= (const GLC_3DRep &)
 Assignement operator.
virtual GLC_Repclone () const
 Clone the representation.
virtual GLC_RepdeepCopy () const
 Make a deep copy of the 3DRep.
virtual ~GLC_3DRep ()
 Destructor.
Set Functions

void addGeom (GLC_Geometry *pGeom)
 Add Geometry to the 3DRep.
void clean ()
 Remove empty geometries and factorise materials.
void reverseNormals ()
 Reverse geometries normals.
virtual bool load ()
 Load the representation and return true if success.
virtual bool unload ()
 UnLoad the representation and return true if success.
virtual void replace (GLC_Rep *)
 Replace the representation.
void replaceMaterial (GLC_uint, GLC_Material *)
 Replace the specified material by a new one.
void merge (GLC_3DRep *)
 Merge this 3Drep with another 3DRep.

Private Member Functions

void clear ()
 Clear current representation.

Private Attributes

QList< GLC_Geometry * > * m_pGeomList
 Geometries of the 3D representation.
int * m_pType
 The Type of representation.

Static Private Attributes

static quint32 m_ChunkId = 0xA702
 Class chunk id.

Friends

QDataStream & operator<< (QDataStream &, const GLC_3DRep &)
 Non-member stream operator.
QDataStream & operator>> (QDataStream &, GLC_3DRep &)

Get Functions



virtual int type () const
 Return the type of representation.
GLC_GeometrygeomAt (int index) const
 Get Geometry.
int numberOfBody () const
 Return the number of body.
virtual bool isEmpty () const
 Return true if the representation is empty.
bool boundingBoxIsValid () const
 Return true if the rep bounding box is valid.
GLC_BoundingBox boundingBox () const
 Return the 3DRep bounding Box.
bool contains (GLC_Geometry *pGeom)
 Return true if the 3DRep contains the geometry.
unsigned int faceCount () const
 Return the number of faces of this 3DRep.
unsigned int vertexCount () const
 Return number of vertex of this 3DRep.
unsigned int materialCount () const
 Return number of materials of this 3DRep.
QSet< GLC_Material * > materialSet () const
 Return materials Set of this 3DRep.
static quint32 chunckID ()
 Return the class Chunk ID.

Detailed Description

GLC_3DRep : A referrence 3D Representation.

Definition at line 38 of file glc_3drep.h.


Constructor & Destructor Documentation

GLC_3DRep::GLC_3DRep (  ) 

Default Constructor.

Definition at line 33 of file glc_3drep.cpp.

Referenced by clone().

GLC_3DRep::GLC_3DRep ( GLC_Geometry pGeom  ) 

Construct a 3DRep with a geometry.

Definition at line 42 of file glc_3drep.cpp.

References m_pGeomList, GLC_Geometry::name(), and GLC_Rep::setName().

GLC_3DRep::GLC_3DRep ( const GLC_3DRep rep  ) 

Copy Constructor.

Definition at line 52 of file glc_3drep.cpp.

GLC_3DRep::~GLC_3DRep (  )  [virtual]

Destructor.

Definition at line 94 of file glc_3drep.cpp.

References clear().


Member Function Documentation

void GLC_3DRep::addGeom ( GLC_Geometry pGeom  )  [inline]
GLC_BoundingBox GLC_3DRep::boundingBox (  )  const

Return the 3DRep bounding Box.

Definition at line 133 of file glc_3drep.cpp.

References GLC_BoundingBox::combine(), and m_pGeomList.

Referenced by GLC_BSRep::save().

bool GLC_3DRep::boundingBoxIsValid (  )  const

Return true if the rep bounding box is valid.

Definition at line 119 of file glc_3drep.cpp.

References m_pGeomList.

quint32 GLC_3DRep::chunckID (  )  [static]

Return the class Chunk ID.

Definition at line 103 of file glc_3drep.cpp.

References m_ChunkId.

void GLC_3DRep::clean (  ) 
void GLC_3DRep::clear (  )  [private]

Clear current representation.

Reimplemented from GLC_Rep.

Definition at line 340 of file glc_3drep.cpp.

References GLC_Rep::isTheLast(), m_pGeomList, and m_pType.

Referenced by operator=(), and ~GLC_3DRep().

GLC_Rep * GLC_3DRep::clone (  )  const [virtual]

Clone the representation.

Implements GLC_Rep.

Definition at line 72 of file glc_3drep.cpp.

References GLC_3DRep().

bool GLC_3DRep::contains ( GLC_Geometry pGeom  )  [inline]

Return true if the 3DRep contains the geometry.

Definition at line 111 of file glc_3drep.h.

Referenced by GLC_3DViewInstance::setGeometry().

GLC_Rep * GLC_3DRep::deepCopy (  )  const [virtual]

Make a deep copy of the 3DRep.

Implements GLC_Rep.

Definition at line 78 of file glc_3drep.cpp.

References addGeom(), GLC_Rep::fileName(), m_pGeomList, GLC_Rep::name(), GLC_Rep::setFileName(), and GLC_Rep::setName().

Referenced by GLC_3DViewInstance::deepCopy().

unsigned int GLC_3DRep::faceCount (  )  const

Return the number of faces of this 3DRep.

Definition at line 145 of file glc_3drep.cpp.

References m_pGeomList.

Referenced by GLC_StructReference::numberOfFaces().

GLC_Geometry* GLC_3DRep::geomAt ( int  index  )  const [inline]
virtual bool GLC_3DRep::isEmpty ( void   )  const [inline, virtual]
bool GLC_3DRep::load (  )  [virtual]

Load the representation and return true if success.

Implements GLC_Rep.

Definition at line 238 of file glc_3drep.cpp.

References GLC_Factory::create3DRepFromFile(), GLC_Rep::fileName(), GLC_Factory::instance(), isEmpty(), m_pGeomList, and GLC_Rep::m_pIsLoaded.

unsigned int GLC_3DRep::materialCount (  )  const

Return number of materials of this 3DRep.

Definition at line 177 of file glc_3drep.cpp.

References m_pGeomList.

Referenced by GLC_StructReference::numberOfMaterials().

QSet< GLC_Material * > GLC_3DRep::materialSet (  )  const

Return materials Set of this 3DRep.

Definition at line 193 of file glc_3drep.cpp.

References m_pGeomList.

Referenced by GLC_3dsToWorld::createMeshes(), GLC_3dxmlToWorld::factorizeMaterial(), GLC_StructReference::materialSet(), and operator<<().

void GLC_3DRep::merge ( GLC_3DRep pRep  ) 

Merge this 3Drep with another 3DRep.

Definition at line 305 of file glc_3drep.cpp.

References addGeom(), GLC_Geometry::clone(), geomAt(), and m_pGeomList.

Referenced by GLC_ColladaToWorld::createOccurenceFromNode().

int GLC_3DRep::numberOfBody (  )  const [inline]
GLC_3DRep & GLC_3DRep::operator= ( const GLC_3DRep rep  )  [virtual]

Assignement operator.

Definition at line 61 of file glc_3drep.cpp.

References clear(), m_pGeomList, and m_pType.

void GLC_3DRep::replace ( GLC_Rep pRep  )  [virtual]

Replace the representation.

Implements GLC_Rep.

Definition at line 264 of file glc_3drep.cpp.

References GLC_Rep::fileName(), isEmpty(), m_pGeomList, GLC_Rep::name(), GLC_Rep::setFileName(), and GLC_Rep::setName().

void GLC_3DRep::replaceMaterial ( GLC_uint  oldId,
GLC_Material pNewMaterial 
)

Replace the specified material by a new one.

Definition at line 285 of file glc_3drep.cpp.

References GLC_Geometry::containsMaterial(), GLC_Object::id(), m_pGeomList, and GLC_Mesh::replaceMaterial().

Referenced by GLC_3dxmlToWorld::factorizeMaterial().

void GLC_3DRep::reverseNormals (  ) 

Reverse geometries normals.

Definition at line 228 of file glc_3drep.cpp.

References m_pGeomList.

int GLC_3DRep::type (  )  const [virtual]

Return the type of representation.

Implements GLC_Rep.

Definition at line 109 of file glc_3drep.cpp.

References m_pType.

bool GLC_3DRep::unload (  )  [virtual]

UnLoad the representation and return true if success.

Implements GLC_Rep.

Definition at line 316 of file glc_3drep.cpp.

References GLC_Rep::fileName(), m_pGeomList, and GLC_Rep::m_pIsLoaded.

unsigned int GLC_3DRep::vertexCount (  )  const

Return number of vertex of this 3DRep.

Definition at line 161 of file glc_3drep.cpp.

References m_pGeomList.

Referenced by GLC_3dsToWorld::createMeshes(), and GLC_StructReference::numberOfVertex().


Friends And Related Function Documentation

QDataStream& operator<< ( QDataStream &  ,
const GLC_3DRep  
) [friend]

Non-member stream operator.

Definition at line 358 of file glc_3drep.cpp.

QDataStream& operator>> ( QDataStream &  ,
GLC_3DRep  
) [friend]

Definition at line 392 of file glc_3drep.cpp.


Member Data Documentation

quint32 GLC_3DRep::m_ChunkId = 0xA702 [static, private]

Class chunk id.

Definition at line 179 of file glc_3drep.h.

Referenced by chunckID(), operator<<(), and operator>>().

int* GLC_3DRep::m_pType [private]

The Type of representation.

Definition at line 176 of file glc_3drep.h.

Referenced by clear(), operator=(), and type().


The documentation for this class was generated from the following files:

SourceForge.net Logo

©2005 Laurent Ribon