GLC_lib  2.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Private Member Functions | Private Attributes | Static Private Attributes | List of all members
GLC_Octree Class Reference

GLC_Octree : represent space partioning implementation with octree. More...

#include <glc_octree.h>

+ Inheritance diagram for GLC_Octree:

Public Member Functions

Constructor / Destructor
 GLC_Octree (GLC_3DViewCollection *)
 Create an empty octree of the given 3D view collection.
 
 GLC_Octree (const GLC_Octree &)
 Create the octree from the given octree.
 
virtual ~GLC_Octree ()
 Destructor.
 
- Public Member Functions inherited from GLC_SpacePartitioning
 GLC_SpacePartitioning (GLC_3DViewCollection *)
 Default constructor.
 
 GLC_SpacePartitioning (const GLC_SpacePartitioning &)
 Copy constructor.
 
virtual ~GLC_SpacePartitioning ()
 Destructor.
 
GLC_3DViewCollectioncollectionHandle ()
 Return the 3DViewCollection of the space partitioning.
 

Private Member Functions

void createBoxWithMaterial (GLC_3DViewCollection *, GLC_OctreeNode *, GLC_Material *)
 Create octree box representation in the given 3d view collection.
 

Private Attributes

GLC_OctreeNodem_pRootNode
 Octree root node.
 
int m_OctreeDepth
 Octree depth.
 

Static Private Attributes

static int m_DefaultOctreeDepth = 3
 The default octree Depth.
 

Get Functions

virtual QList
< GLC_3DViewInstance * > 
listOfIntersectedInstances (const GLC_BoundingBox &bBox)
 Return the list off instances inside or intersect the given bounding box.
 
static int defaultDepth ()
 Return the default octree Depth.
 

Set Functions

virtual void updateViewableInstances (const GLC_Frustum &)
 Update the viewable 3d view instance of this octree from the given frustum.
 
virtual void updateSpacePartitioning ()
 Update this octree space partionning.
 
virtual void clear ()
 Clear the space partionning.
 
void setDepth (int)
 Set this octree depth.
 
void createBox (GLC_Material *, GLC_3DViewCollection *pCol=NULL)
 Create octree box representation in the given collection with the specified material.
 
static void setDefaultDepth (int depth)
 Set the default octree depth.
 

Additional Inherited Members

- Protected Attributes inherited from GLC_SpacePartitioning
GLC_3DViewCollectionm_pCollection
 The Collection containing 3dview Instances.
 

Detailed Description

GLC_Octree : represent space partioning implementation with octree.

Definition at line 38 of file glc_octree.h.

Constructor & Destructor Documentation

GLC_Octree::GLC_Octree ( GLC_3DViewCollection pCollection)

Create an empty octree of the given 3D view collection.

Definition at line 31 of file glc_octree.cpp.

GLC_Octree::GLC_Octree ( const GLC_Octree octree)

Create the octree from the given octree.

Definition at line 40 of file glc_octree.cpp.

References GLC_OctreeNode, and m_pRootNode.

GLC_Octree::~GLC_Octree ( )
virtual

Destructor.

Definition at line 51 of file glc_octree.cpp.

References m_pRootNode.

Member Function Documentation

void GLC_Octree::clear ( void  )
virtual

Clear the space partionning.

Implements GLC_SpacePartitioning.

Definition at line 93 of file glc_octree.cpp.

References m_pRootNode.

void GLC_Octree::createBox ( GLC_Material pMat,
GLC_3DViewCollection pCol = NULL 
)

Create octree box representation in the given collection with the specified material.

Definition at line 108 of file glc_octree.cpp.

References createBoxWithMaterial(), GLC_OctreeNode::isEmpty(), GLC_SpacePartitioning::m_pCollection, m_pRootNode, and updateSpacePartitioning().

void GLC_Octree::createBoxWithMaterial ( GLC_3DViewCollection pCol,
GLC_OctreeNode pNode,
GLC_Material pMat 
)
private
int GLC_Octree::defaultDepth ( )
static

Return the default octree Depth.

Definition at line 56 of file glc_octree.cpp.

References m_DefaultOctreeDepth.

Referenced by GLC_State::defaultOctreeDepth().

QList< GLC_3DViewInstance * > GLC_Octree::listOfIntersectedInstances ( const GLC_BoundingBox bBox)
virtual

Return the list off instances inside or intersect the given bounding box.

Implements GLC_SpacePartitioning.

Definition at line 61 of file glc_octree.cpp.

References m_pRootNode, GLC_OctreeNode::setOfIntersectedInstances(), and updateSpacePartitioning().

void GLC_Octree::setDefaultDepth ( int  depth)
static

Set the default octree depth.

Definition at line 122 of file glc_octree.cpp.

References m_DefaultOctreeDepth.

Referenced by GLC_State::setDefaultOctreeDepth().

void GLC_Octree::setDepth ( int  depth)

Set this octree depth.

If space partitionning is already done, update it

Definition at line 99 of file glc_octree.cpp.

References m_OctreeDepth, m_pRootNode, and updateSpacePartitioning().

void GLC_Octree::updateSpacePartitioning ( )
virtual
void GLC_Octree::updateViewableInstances ( const GLC_Frustum frustum)
virtual

Update the viewable 3d view instance of this octree from the given frustum.

Implements GLC_SpacePartitioning.

Definition at line 70 of file glc_octree.cpp.

References m_pRootNode, updateSpacePartitioning(), and GLC_OctreeNode::updateViewableInstances().

Member Data Documentation

int GLC_Octree::m_DefaultOctreeDepth = 3
staticprivate

The default octree Depth.

Definition at line 115 of file glc_octree.h.

Referenced by defaultDepth(), and setDefaultDepth().

int GLC_Octree::m_OctreeDepth
private

Octree depth.

Definition at line 112 of file glc_octree.h.

Referenced by setDepth(), and updateSpacePartitioning().

GLC_OctreeNode* GLC_Octree::m_pRootNode
private

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

©2005-2013 Laurent Ribon