GLC_Instance Class Reference

GLC_Instance : GLC_Geometry + OpenGL list + bounding box. More...

#include <glc_instance.h>

Inheritance diagram for GLC_Instance:

GLC_Object

List of all members.

OpenGL Functions



void glExecute (GLenum Mode=GL_COMPILE_AND_EXECUTE)
 Display the instance.
void glVisProperties ()
 Set instance visualisation properties.

Public Member Functions

Constructor / Destructor


 GLC_Instance ()
 Default constructor.
 GLC_Instance (GLC_Geometry *pGeom)
 Contruct node with a geometry.
 GLC_Instance (const GLC_Instance &)
 Copy constructor.
GLC_Instanceoperator= (const GLC_Instance &)
 Assignement operator.
 ~GLC_Instance ()
 Destructor.
Get Functions


const bool isNull () const
 Return true if the instance as no geometry.
const bool isSelected (void) const
 Return true if the instance is selected.
GLC_GeometrygetGeometry (void)
 Get the geometry of the instance.
const bool getValidity (void) const
 Get the validity of the Insatnce.
GLC_BoundingBox getBoundingBox (void)
 Get the bounding box.
const bool getBoundingBoxValidity (void) const
 Get the validity of the Bounding Box.
const GLC_Matrix4x4 getMatrix (void) const
 Return transfomation 4x4Matrix.
GLC_Instance clone () const
 Clone the instance.
GLC_Instance instanciate ()
 Instanciate the instance.
GLenum getPolygonMode () const
 Get the Polygon mode off the instance.
bool isVisible () const
 Get the visibility state of instance.
Set Functions


bool setGeometry (GLC_Geometry *pGeom)
 Set the instance Geometry.
void translate (double Tx, double Ty, double Tz)
 translate Geometry
void multMatrix (const GLC_Matrix4x4 &MultMat)
 move instance with a 4x4Matrix
void setMatrix (const GLC_Matrix4x4 &SetMat)
 Replace the instance Matrix.
void resetMatrix (void)
 Reset the instance Matrix.
void setPolygonMode (GLenum Face, GLenum Mode)
 Polygon's display style.
void select (void)
 Select the instance.
void unselect (void)
 Unselect the instance.
void setInstanceValidity (void)
 set Instance validity in case of multiple instance.
void setVisibility (const bool visibility)
 Set instance visibility.

Private Member Functions

void computeBoundingBox (void)
 compute the instance bounding box
void clear ()
 Clear current instance.

Private Attributes

GLC_Geometrym_pGeom
 Geometry of the instance.
GLuint m_ListID
 OpenGL list of the instance.
GLC_BoundingBoxm_pBoundingBox
 BoundingBox of the instance.
int * m_pNumberOfInstance
 Number of this instance.
GLC_Matrix4x4 m_MatPos
 Geometry matrix.
bool m_IsValid
 instance validity
bool m_IsSelected
 Selection state.
GLenum m_PolyFace
 Polygons display style.
GLenum m_PolyMode
bool m_IsVisible
 Visibility.


Detailed Description

GLC_Instance : GLC_Geometry + OpenGL list + bounding box.

An GLC_Instance contain :

Definition at line 47 of file glc_instance.h.


Constructor & Destructor Documentation

GLC_Instance::GLC_Instance (  ) 

Default constructor.

Definition at line 35 of file glc_instance.cpp.

GLC_Instance::GLC_Instance ( GLC_Geometry pGeom  ) 

Contruct node with a geometry.

Definition at line 52 of file glc_instance.cpp.

References GLC_Object::getName(), and GLC_Object::setName().

GLC_Instance::GLC_Instance ( const GLC_Instance inputNode  ) 

Copy constructor.

Definition at line 70 of file glc_instance.cpp.

GLC_Instance::~GLC_Instance (  ) 

Destructor.

Definition at line 109 of file glc_instance.cpp.

References clear().


Member Function Documentation

GLC_Instance & GLC_Instance::operator= ( const GLC_Instance inputNode  ) 

Assignement operator.

Definition at line 92 of file glc_instance.cpp.

References clear(), m_MatPos, GLC_Object::m_Name, m_pGeom, m_pNumberOfInstance, and GLC_Object::m_Uid.

const bool GLC_Instance::isNull (  )  const [inline]

Return true if the instance as no geometry.

Definition at line 78 of file glc_instance.h.

References m_pGeom.

const bool GLC_Instance::isSelected ( void   )  const [inline]

Return true if the instance is selected.

Definition at line 81 of file glc_instance.h.

References m_IsSelected.

GLC_Geometry * GLC_Instance::getGeometry ( void   ) 

const bool GLC_Instance::getValidity ( void   )  const

Get the validity of the Insatnce.

Definition at line 126 of file glc_instance.cpp.

References GLC_Geometry::getValidity(), m_IsValid, and m_pGeom.

GLC_BoundingBox GLC_Instance::getBoundingBox ( void   ) 

Get the bounding box.

Definition at line 136 of file glc_instance.cpp.

References computeBoundingBox(), getBoundingBoxValidity(), m_pBoundingBox, and m_pGeom.

const bool GLC_Instance::getBoundingBoxValidity ( void   )  const

Get the validity of the Bounding Box.

Definition at line 157 of file glc_instance.cpp.

References GLC_Geometry::getListIsValid(), GLC_Geometry::getValidity(), m_pBoundingBox, and m_pGeom.

Referenced by getBoundingBox().

const GLC_Matrix4x4 GLC_Instance::getMatrix ( void   )  const [inline]

Return transfomation 4x4Matrix.

Definition at line 96 of file glc_instance.h.

References m_MatPos.

Referenced by GLC_OrbitCircle::glExecute().

GLC_Instance GLC_Instance::clone (  )  const

Clone the instance.

Definition at line 167 of file glc_instance.cpp.

References GLC_Geometry::clone(), m_MatPos, m_pBoundingBox, m_pGeom, m_PolyFace, and m_PolyMode.

GLC_Instance GLC_Instance::instanciate (  ) 

Instanciate the instance.

Definition at line 182 of file glc_instance.cpp.

References GLC_GenID(), and GLC_Object::m_Uid.

Referenced by GLC_Part::clone().

GLenum GLC_Instance::getPolygonMode (  )  const [inline]

Get the Polygon mode off the instance.

Polygon Mode can Be : GL_POINT, GL_LINE, or GL_FILL

Definition at line 107 of file glc_instance.h.

References m_PolyMode.

bool GLC_Instance::isVisible (  )  const [inline]

Get the visibility state of instance.

Definition at line 110 of file glc_instance.h.

References m_IsVisible.

bool GLC_Instance::setGeometry ( GLC_Geometry pGeom  ) 

Set the instance Geometry.

instance must be null

Definition at line 195 of file glc_instance.cpp.

References m_pGeom.

void GLC_Instance::translate ( double  Tx,
double  Ty,
double  Tz 
)

translate Geometry

Definition at line 206 of file glc_instance.cpp.

References multMatrix().

Referenced by GLC_Factory::createBox().

void GLC_Instance::multMatrix ( const GLC_Matrix4x4 MultMat  ) 

move instance with a 4x4Matrix

Definition at line 215 of file glc_instance.cpp.

References m_IsValid, and m_MatPos.

Referenced by GLC_OrbitCircle::glExecute(), GLC_OrbitCircle::mapArcs(), and translate().

void GLC_Instance::setMatrix ( const GLC_Matrix4x4 SetMat  ) 

Replace the instance Matrix.

Definition at line 223 of file glc_instance.cpp.

References m_IsValid, and m_MatPos.

Referenced by GLC_OrbitCircle::glExecute(), GLC_Part::move(), GLC_OrbitCircle::setOrientArcs(), and GLC_Part::updateAbsoluteMatrix().

void GLC_Instance::resetMatrix ( void   ) 

Reset the instance Matrix.

Definition at line 231 of file glc_instance.cpp.

References m_IsValid, m_MatPos, and GLC_Matrix4x4::setToIdentity().

void GLC_Instance::setPolygonMode ( GLenum  Face,
GLenum  Mode 
)

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 239 of file glc_instance.cpp.

References m_IsValid, m_PolyFace, and m_PolyMode.

void GLC_Instance::select ( void   ) 

Select the instance.

Definition at line 251 of file glc_instance.cpp.

References m_IsSelected, and m_IsValid.

Referenced by GLC_Collection::select().

void GLC_Instance::unselect ( void   ) 

Unselect the instance.

Definition at line 258 of file glc_instance.cpp.

References m_IsSelected, and m_IsValid.

void GLC_Instance::setInstanceValidity ( void   ) 

set Instance validity in case of multiple instance.

Definition at line 265 of file glc_instance.cpp.

References GLC_Geometry::getValidity(), m_IsValid, and m_pGeom.

void GLC_Instance::setVisibility ( const bool  visibility  )  [inline]

Set instance visibility.

Definition at line 154 of file glc_instance.h.

References m_IsVisible.

void GLC_Instance::glExecute ( GLenum  Mode = GL_COMPILE_AND_EXECUTE  ) 

void GLC_Instance::glVisProperties (  )  [private]

Set instance visualisation properties.

Definition at line 328 of file glc_instance.cpp.

References m_MatPos, m_PolyFace, m_PolyMode, and GLC_Matrix4x4::return_dMat().

Referenced by glExecute().

void GLC_Instance::computeBoundingBox ( void   )  [private]

compute the instance bounding box

Definition at line 344 of file glc_instance.cpp.

References GLC_Geometry::getBoundingBox(), m_MatPos, m_pBoundingBox, m_pGeom, and GLC_BoundingBox::transform().

Referenced by getBoundingBox(), and glExecute().

void GLC_Instance::clear ( void   )  [private]

Clear current instance.

Definition at line 358 of file glc_instance.cpp.

References m_IsValid, m_ListID, m_pBoundingBox, m_pGeom, and m_pNumberOfInstance.

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


Member Data Documentation

GLuint GLC_Instance::m_ListID [private]

OpenGL list of the instance.

Definition at line 191 of file glc_instance.h.

Referenced by clear(), and glExecute().

BoundingBox of the instance.

Definition at line 194 of file glc_instance.h.

Referenced by clear(), clone(), computeBoundingBox(), getBoundingBox(), and getBoundingBoxValidity().

Number of this instance.

Definition at line 197 of file glc_instance.h.

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

Geometry matrix.

Definition at line 200 of file glc_instance.h.

Referenced by clone(), computeBoundingBox(), getMatrix(), glVisProperties(), multMatrix(), operator=(), resetMatrix(), and setMatrix().

bool GLC_Instance::m_IsValid [private]

Selection state.

Definition at line 206 of file glc_instance.h.

Referenced by glExecute(), isSelected(), select(), and unselect().

GLenum GLC_Instance::m_PolyFace [private]

Polygons display style.

Definition at line 209 of file glc_instance.h.

Referenced by clone(), glVisProperties(), and setPolygonMode().

GLenum GLC_Instance::m_PolyMode [private]

Definition at line 210 of file glc_instance.h.

Referenced by clone(), getPolygonMode(), glExecute(), glVisProperties(), and setPolygonMode().

bool GLC_Instance::m_IsVisible [private]

Visibility.

Definition at line 213 of file glc_instance.h.

Referenced by isVisible(), and setVisibility().


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

Generated on Wed Nov 16 2005 for GLC_lib by  doxygen 1.4.5

SourceForge.net Logo

©2005 Laurent Ribon