GLC_RenderProperties Class Reference

GLC_RenderProperties encapsulate the render properties off all GLC_3DViewInstance class. More...

#include <glc_renderproperties.h>

List of all members.

Public Member Functions

Constructor / Destructor

 GLC_RenderProperties ()
 Default constructor.
 GLC_RenderProperties (const GLC_RenderProperties &)
 Copy constructor.
GLC_RenderPropertiesoperator= (const GLC_RenderProperties &)
 Assignement operator.
virtual ~GLC_RenderProperties ()
 Destructor.
Get Functions

bool isSelected () const
 Return true if it is selected.
glc::RenderMode renderingMode () const
 Return the rendering mode.
glc::RenderMode savedRenderingMode () const
 Return the saved rendering mode.
GLC_MaterialoverwriteMaterial () const
 Return an handle to the overwrite material.
float overwriteTransparency () const
 Return the overwrite transparency.
QSet< GLC_uint > * setOfSelectedPrimitivesId () const
 Return an handle to the set of selected primitives id of the current body.
bool setOfSelectedPrimitiveIdIsEmpty () const
 Return true if the set of selected primitive id is empty.
bool primitiveIsSelected (int index, GLC_uint id) const
 Return true if the specified primitive id of the specified body index is selected.
QHash< GLC_uint, GLC_Material * > * hashOfOverwritePrimitiveMaterials () const
 Return an handle to the overwrite primitive material Hash.
bool hashOfOverwritePrimitiveMaterialsIsEmpty () const
 Return true if the hash of overwrite primitive material is empty.
GLenum polyFaceMode () const
 Get the PolyFace mode.
GLenum polygonMode () const
 Get the Polygon mode.
glc::RenderFlag renderingFlag () const
 Return rendering flag render flag.
bool needToRenderWithTransparency () const
 Return true if rendering properties needs to render with transparency.
int currentBodyIndex () const
 Return the current body index.
bool isDefault () const
 Return true if this rendering properties has defaut value.
Set Functions

void clear ()
 Clear the content of the render properties and update materials usage.
void select (bool primitive)
 Select the instance.
void unselect (void)
 Unselect the instance.
void setRenderingMode (glc::RenderMode mode)
 Set the rendering mode.
void setOverwriteMaterial (GLC_Material *)
 Set the overwrite material.
void setOverwriteTransparency (float alpha)
 Set the overwrite transparency.
void addSetOfSelectedPrimitivesId (const QSet< GLC_uint > &, int body=0)
 Add the set of selected primitives id of the specified body.
void addSelectedPrimitive (GLC_uint, int body=0)
 Add a selected primitive of the specified body.
void clearSelectedPrimitives ()
 Clear selectedPrimitive Set.
void addOverwritePrimitiveMaterial (GLC_uint, GLC_Material *, int bodyIndex=0)
 Add an overwrite primitive material.
void clearOverwritePrimitiveMaterials ()
 Clear overwrite primitive materials.
void setPolygonMode (GLenum Face, GLenum Mode)
 Polygon's display style.
void setRenderingFlag (glc::RenderFlag flag)
 Set the rendering flag.
void setCurrentBodyIndex (int index)
 Set the current body index.
void useMaterial (GLC_Material *)
 Used the specified material.
void unUseMaterial (GLC_Material *)
 Unused the specified material.

Private Attributes

GLC_uint m_Uid
 The render properties uid : GLC_GenUserID (For GLC_Material usage).
bool m_IsSelected
 Flag to know if it is selected.
GLenum m_PolyFace
 OpenGL polygon rendering mode.
GLenum m_PolyMode
glc::RenderMode m_RenderMode
 Geometry rendering mode.
glc::RenderMode m_SavedRenderMode
 Geometry saved rendering mode.
GLC_Materialm_pOverwriteMaterial
 The overwrite material.
float m_OverwriteOpacity
 The overwrite opacity.
QHash< int, QSet< GLC_uint > * > * m_pBodySelectedPrimitvesId
 The selected primitive id regrouped by body.
QHash< int, QHash< GLC_uint,
GLC_Material * > * > * 
m_pOverwritePrimitiveMaterialMaps
 The overwrite primitive material mapping.
glc::RenderFlag m_RenderingFlag
 Transparent material render flag.
int m_CurrentBody
 The current rendere body.
QHash< GLC_Material *, int > m_MaterialsUsage
 The Hash table of overwrite primitive maped to the number of usages in this render properties.

Detailed Description

GLC_RenderProperties encapsulate the render properties off all GLC_3DViewInstance class.

Definition at line 65 of file glc_renderproperties.h.


Constructor & Destructor Documentation

GLC_RenderProperties::GLC_RenderProperties (  ) 

Default constructor.

Definition at line 27 of file glc_renderproperties.cpp.

GLC_RenderProperties::GLC_RenderProperties ( const GLC_RenderProperties renderProperties  ) 
GLC_RenderProperties::~GLC_RenderProperties (  )  [virtual]

Destructor.

Definition at line 167 of file glc_renderproperties.cpp.

References clear().


Member Function Documentation

void GLC_RenderProperties::addOverwritePrimitiveMaterial ( GLC_uint  id,
GLC_Material pMaterial,
int  bodyIndex = 0 
)

Add an overwrite primitive material.

Definition at line 310 of file glc_renderproperties.cpp.

References m_pOverwritePrimitiveMaterialMaps, unUseMaterial(), and useMaterial().

void GLC_RenderProperties::addSelectedPrimitive ( GLC_uint  id,
int  body = 0 
)

Add a selected primitive of the specified body.

Definition at line 278 of file glc_renderproperties.cpp.

References m_pBodySelectedPrimitvesId.

void GLC_RenderProperties::addSetOfSelectedPrimitivesId ( const QSet< GLC_uint > &  set,
int  body = 0 
)

Add the set of selected primitives id of the specified body.

Definition at line 260 of file glc_renderproperties.cpp.

References m_pBodySelectedPrimitvesId.

void GLC_RenderProperties::clear (  ) 

Clear the content of the render properties and update materials usage.

Definition at line 219 of file glc_renderproperties.cpp.

References clearOverwritePrimitiveMaterials(), clearSelectedPrimitives(), GLC_Material::delUsage(), GLC_Material::isUnused(), m_pOverwriteMaterial, and m_Uid.

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

void GLC_RenderProperties::clearOverwritePrimitiveMaterials (  ) 

Clear overwrite primitive materials.

Definition at line 356 of file glc_renderproperties.cpp.

References GLC_Material::delUsage(), GLC_Material::isUnused(), m_MaterialsUsage, m_pOverwritePrimitiveMaterialMaps, and m_Uid.

Referenced by clear().

void GLC_RenderProperties::clearSelectedPrimitives (  ) 

Clear selectedPrimitive Set.

Definition at line 294 of file glc_renderproperties.cpp.

References m_pBodySelectedPrimitvesId.

Referenced by clear().

int GLC_RenderProperties::currentBodyIndex (  )  const [inline]

Return the current body index.

Definition at line 157 of file glc_renderproperties.h.

QHash<GLC_uint, GLC_Material*>* GLC_RenderProperties::hashOfOverwritePrimitiveMaterials (  )  const [inline]

Return an handle to the overwrite primitive material Hash.

Definition at line 127 of file glc_renderproperties.h.

Referenced by GLC_Mesh::primitiveRenderLoop(), GLC_Mesh::vboDrawSelectedPrimitivesGroupOf(), and GLC_Mesh::vertexArrayDrawSelectedPrimitivesGroupOf().

bool GLC_RenderProperties::hashOfOverwritePrimitiveMaterialsIsEmpty (  )  const [inline]

Return true if the hash of overwrite primitive material is empty.

Definition at line 136 of file glc_renderproperties.h.

Referenced by GLC_Mesh::glDraw(), GLC_Mesh::vboDrawSelectedPrimitivesGroupOf(), and GLC_Mesh::vertexArrayDrawSelectedPrimitivesGroupOf().

bool GLC_RenderProperties::isDefault (  )  const
bool GLC_RenderProperties::isSelected (  )  const [inline]
bool GLC_RenderProperties::needToRenderWithTransparency (  )  const
GLC_RenderProperties & GLC_RenderProperties::operator= ( const GLC_RenderProperties renderProperties  ) 
GLC_Material* GLC_RenderProperties::overwriteMaterial (  )  const [inline]

Return an handle to the overwrite material.

Definition at line 103 of file glc_renderproperties.h.

Referenced by GLC_3DViewInstance::isTransparent(), and GLC_Mesh::OverwriteMaterialRenderLoop().

float GLC_RenderProperties::overwriteTransparency (  )  const [inline]

Return the overwrite transparency.

Definition at line 107 of file glc_renderproperties.h.

Referenced by GLC_Mesh::OverwriteTransparencyRenderLoop(), and GLC_WorldTo3dxml::writeOccurenceDefaultViewProperty().

GLenum GLC_RenderProperties::polyFaceMode (  )  const [inline]

Get the PolyFace mode.

PolyFace Mode can Be : GL_FRONT_AND_BACK, GL_FRONT, or GL_BACK

Definition at line 141 of file glc_renderproperties.h.

GLenum GLC_RenderProperties::polygonMode (  )  const [inline]

Get the Polygon mode.

Polygon Mode can Be : GL_POINT, GL_LINE, or GL_FILL

Definition at line 146 of file glc_renderproperties.h.

bool GLC_RenderProperties::primitiveIsSelected ( int  index,
GLC_uint  id 
) const

Return true if the specified primitive id of the specified body index is selected.

Definition at line 249 of file glc_renderproperties.cpp.

References m_CurrentBody, and m_pBodySelectedPrimitvesId.

glc::RenderFlag GLC_RenderProperties::renderingFlag (  )  const [inline]
glc::RenderMode GLC_RenderProperties::renderingMode (  )  const [inline]
glc::RenderMode GLC_RenderProperties::savedRenderingMode (  )  const [inline]

Return the saved rendering mode.

Definition at line 99 of file glc_renderproperties.h.

Referenced by GLC_Mesh::glDraw().

void GLC_RenderProperties::select ( bool  primitive  )  [inline]

Select the instance.

Definition at line 281 of file glc_renderproperties.h.

References m_IsSelected, m_RenderMode, m_SavedRenderMode, and glc::PrimitiveSelected.

void GLC_RenderProperties::setCurrentBodyIndex ( int  index  )  [inline]

Set the current body index.

Definition at line 225 of file glc_renderproperties.h.

Referenced by GLC_3DViewInstance::render(), and GLC_3DViewInstance::renderForBodySelection().

bool GLC_RenderProperties::setOfSelectedPrimitiveIdIsEmpty (  )  const [inline]

Return true if the set of selected primitive id is empty.

Definition at line 120 of file glc_renderproperties.h.

Referenced by GLC_Mesh::glDraw().

QSet<GLC_uint>* GLC_RenderProperties::setOfSelectedPrimitivesId (  )  const [inline]

Return an handle to the set of selected primitives id of the current body.

Definition at line 111 of file glc_renderproperties.h.

Referenced by GLC_Mesh::vboDrawSelectedPrimitivesGroupOf(), and GLC_Mesh::vertexArrayDrawSelectedPrimitivesGroupOf().

void GLC_RenderProperties::setOverwriteMaterial ( GLC_Material pMaterial  ) 
void GLC_RenderProperties::setOverwriteTransparency ( float  alpha  )  [inline]

Set the overwrite transparency.

Definition at line 193 of file glc_renderproperties.h.

Referenced by GLC_3dxmlToWorld::loadDefaultViewProperty().

void GLC_RenderProperties::setPolygonMode ( GLenum  Face,
GLenum  Mode 
) [inline]

Polygon's display style.

Face Polygon Mode can be : GL_FRONT_AND_BACK, GL_FRONT, or GL_BACK mode can be : GL_POINT, GL_LINE, or GL_FILL

Definition at line 214 of file glc_renderproperties.h.

void GLC_RenderProperties::setRenderingFlag ( glc::RenderFlag  flag  )  [inline]

Set the rendering flag.

Definition at line 221 of file glc_renderproperties.h.

Referenced by GLC_RepTrackBallMover::glDraw(), and GLC_3DViewInstance::render().

void GLC_RenderProperties::setRenderingMode ( glc::RenderMode  mode  )  [inline]
void GLC_RenderProperties::unselect ( void   )  [inline]

Unselect the instance.

Definition at line 292 of file glc_renderproperties.h.

References m_IsSelected, m_RenderMode, m_SavedRenderMode, and glc::PrimitiveSelected.

void GLC_RenderProperties::unUseMaterial ( GLC_Material pMaterial  )  [inline]

Unused the specified material.

Definition at line 317 of file glc_renderproperties.h.

References GLC_Material::delUsage(), GLC_Material::isUnused(), m_MaterialsUsage, and m_Uid.

Referenced by addOverwritePrimitiveMaterial().

void GLC_RenderProperties::useMaterial ( GLC_Material pMaterial  )  [inline]

Used the specified material.

Definition at line 301 of file glc_renderproperties.h.

References GLC_Material::addUsage(), m_MaterialsUsage, and m_Uid.

Referenced by addOverwritePrimitiveMaterial().


Member Data Documentation

The current rendere body.

Definition at line 273 of file glc_renderproperties.h.

Referenced by operator=(), and primitiveIsSelected().

Flag to know if it is selected.

Definition at line 245 of file glc_renderproperties.h.

Referenced by operator=(), select(), and unselect().

The Hash table of overwrite primitive maped to the number of usages in this render properties.

Definition at line 276 of file glc_renderproperties.h.

Referenced by clearOverwritePrimitiveMaterials(), GLC_RenderProperties(), unUseMaterial(), and useMaterial().

The overwrite opacity.

Definition at line 261 of file glc_renderproperties.h.

Referenced by isDefault(), needToRenderWithTransparency(), and operator=().

The selected primitive id regrouped by body.

Definition at line 264 of file glc_renderproperties.h.

Referenced by addSelectedPrimitive(), addSetOfSelectedPrimitivesId(), clearSelectedPrimitives(), GLC_RenderProperties(), operator=(), and primitiveIsSelected().

OpenGL polygon rendering mode.

Definition at line 248 of file glc_renderproperties.h.

Referenced by operator=().

Definition at line 249 of file glc_renderproperties.h.

Referenced by operator=().

Transparent material render flag.

Definition at line 270 of file glc_renderproperties.h.

Referenced by operator=().

Geometry rendering mode.

Definition at line 252 of file glc_renderproperties.h.

Referenced by needToRenderWithTransparency(), operator=(), select(), and unselect().

Geometry saved rendering mode.

Definition at line 255 of file glc_renderproperties.h.

Referenced by operator=(), select(), and unselect().

The render properties uid : GLC_GenUserID (For GLC_Material usage).

Definition at line 242 of file glc_renderproperties.h.

Referenced by clear(), clearOverwritePrimitiveMaterials(), GLC_RenderProperties(), operator=(), setOverwriteMaterial(), unUseMaterial(), and useMaterial().


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

SourceForge.net Logo

©2005-2011 Laurent Ribon