Overview     Modules     Class Hierarchy     Classes     Members  

#include <GlQuadTreeLODCalculator.h>

Inheritance diagram for tlp::GlQuadTreeLODCalculator:
Collaboration diagram for tlp::GlQuadTreeLODCalculator:

Public Member Functions

 GlQuadTreeLODCalculator ()
 ~GlQuadTreeLODCalculator ()
void setScene (GlScene &scene)
bool needEntities ()
void setNeedEntities (bool)
void addSimpleEntityBoundingBox (GlSimpleEntity *entity, const BoundingBox &bb)
void addNodeBoundingBox (unsigned int id, const BoundingBox &bb)
void addEdgeBoundingBox (unsigned int id, const BoundingBox &bb)
void compute (const Vector< int, 4 > &globalViewport, const Vector< int, 4 > &currentViewport)
void computeFor3DCamera (LayerLODUnit *layerLODUnit, const Coord &eye, const Matrix< float, 4 > transformMatrix, const Vector< int, 4 > &globalViewport, const Vector< int, 4 > &currentViewport)
void setInputData (GlGraphInputData *newInputData)
virtual GlLODCalculator * clone ()
- Public Member Functions inherited from tlp::GlCPULODCalculator
 GlCPULODCalculator ()
virtual ~GlCPULODCalculator ()
virtual void beginNewCamera (Camera *camera)
virtual void reserveMemoryForNodes (unsigned int numberOfNodes)
virtual void reserveMemoryForEdges (unsigned int numberOfEdges)
virtual BoundingBox getSceneBoundingBox ()
void setComputeEdgesLOD (bool state)
void setComputeOutScreenLOD (bool state)

Protected Member Functions

void update (PropertyInterface *property)
void treatEvent (const Event &ev)
void observableDestroyed (Observable *)
void afterSetNodeValue (PropertyInterface *, const node n)
void afterSetEdgeValue (PropertyInterface *, const edge e)
void afterSetAllNodeValue (PropertyInterface *)
void afterSetAllEdgeValue (PropertyInterface *)
void addNode (Graph *, const node)
void addEdge (Graph *, const edge)
void delNode (Graph *, const node)
void delEdge (Graph *, const edge)
void addLocalProperty (Graph *, const std::string &name)
void delLocalProperty (Graph *, const std::string &name)
void addInheritedProperty (Graph *, const std::string &name)
void afterDelInheritedProperty (Graph *, const std::string &name)
void destroy (Graph *)
void destroy (const Camera *)
void removeObservers ()
void addObservers ()
void initCamerasObservers ()
void clearCamerasObservers ()
void setHaveToCompute ()
- Protected Member Functions inherited from tlp::GlCPULODCalculator
virtual void computeFor2DCamera (LayerLODUnit *layerLODUnit, const Vector< int, 4 > &globalViewport, const Vector< int, 4 > &currentViewport)

Protected Attributes

std::vector< QuadTreeNode
< unsigned int > * > 
nodesQuadTree
std::vector< QuadTreeNode
< unsigned int > * > 
edgesQuadTree
std::vector< QuadTreeNode
< GlSimpleEntity * > * > 
entitiesQuadTree
std::vector< std::vector
< SimpleEntityLODUnit > > 
simpleEntities
bool haveToCompute
BoundingBox nodesGlobalBoundingBox
BoundingBox edgesGlobalBoundingBox
BoundingBox entitiesGlobalBoundingBox
std::vector< Camera * > cameras
std::map< GlLayer *, std::pair
< Camera *, Camera > > 
layerToCamera
CameracurrentCamera
Graph * currentGraph
PropertyInterface * layoutProperty
PropertyInterface * sizeProperty
PropertyInterface * selectionProperty
int quadTreesVectorPosition
int simpleEntitiesVectorPosition
- Protected Attributes inherited from tlp::GlCPULODCalculator
bool computeEdgesLOD
bool computeOutScreenLOD
BoundingBox sceneBoundingBox
LayerLODUnit * currentLayerLODUnit

Detailed Description

Class use to compute bounding boxs of a vector of GlEntity

Constructor & Destructor Documentation

tlp::GlQuadTreeLODCalculator::GlQuadTreeLODCalculator ( )
tlp::GlQuadTreeLODCalculator::~GlQuadTreeLODCalculator ( )

Member Function Documentation

void tlp::GlQuadTreeLODCalculator::addEdge ( Graph *  ,
const edge   
)
inlineprotected
void tlp::GlQuadTreeLODCalculator::addEdgeBoundingBox ( unsigned int  id,
const BoundingBox &  bb 
)
virtual

This function is call by GlLODSceneVisitor when an edge is found

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::addInheritedProperty ( Graph *  ,
const std::string &  name 
)
protected
void tlp::GlQuadTreeLODCalculator::addLocalProperty ( Graph *  ,
const std::string &  name 
)
protected
void tlp::GlQuadTreeLODCalculator::addNode ( Graph *  ,
const node   
)
inlineprotected
void tlp::GlQuadTreeLODCalculator::addNodeBoundingBox ( unsigned int  id,
const BoundingBox &  bb 
)
virtual

This function is call by GlLODSceneVisitor when a node is found

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::addObservers ( )
protected
void tlp::GlQuadTreeLODCalculator::addSimpleEntityBoundingBox ( GlSimpleEntity entity,
const BoundingBox &  bb 
)
virtual

This function is call by GlLODSceneVisitor when a simple entitie is found

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::afterDelInheritedProperty ( Graph *  ,
const std::string &  name 
)
protected
void tlp::GlQuadTreeLODCalculator::afterSetAllEdgeValue ( PropertyInterface *  )
protected
void tlp::GlQuadTreeLODCalculator::afterSetAllNodeValue ( PropertyInterface *  )
protected
void tlp::GlQuadTreeLODCalculator::afterSetEdgeValue ( PropertyInterface *  ,
const edge  e 
)
protected
void tlp::GlQuadTreeLODCalculator::afterSetNodeValue ( PropertyInterface *  ,
const node  n 
)
protected
void tlp::GlQuadTreeLODCalculator::clearCamerasObservers ( )
protected
virtual GlLODCalculator* tlp::GlQuadTreeLODCalculator::clone ( )
inlinevirtual

Clone the calculator

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::compute ( const Vector< int, 4 > &  globalViewport,
const Vector< int, 4 > &  currentViewport 
)
virtual

This function compute LOD See compute function of GlCPULODCalculator for more details This function do some computation and after call computeFor2DCamera() or computeFor3DCamera()

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::computeFor3DCamera ( LayerLODUnit *  layerLODUnit,
const Coord &  eye,
const Matrix< float, 4 >  transformMatrix,
const Vector< int, 4 > &  globalViewport,
const Vector< int, 4 > &  currentViewport 
)
virtual

Specific function to compute LOD for 3D cameras

Reimplemented from tlp::GlCPULODCalculator.

void tlp::GlQuadTreeLODCalculator::delEdge ( Graph *  ,
const edge   
)
inlineprotected
void tlp::GlQuadTreeLODCalculator::delLocalProperty ( Graph *  ,
const std::string &  name 
)
protected
void tlp::GlQuadTreeLODCalculator::delNode ( Graph *  ,
const node   
)
inlineprotected
void tlp::GlQuadTreeLODCalculator::destroy ( Graph *  )
protected
void tlp::GlQuadTreeLODCalculator::destroy ( const Camera )
protected
void tlp::GlQuadTreeLODCalculator::initCamerasObservers ( )
protected
bool tlp::GlQuadTreeLODCalculator::needEntities ( )

To know if the calculator need to have entities returned by a visitor in GlScene

void tlp::GlQuadTreeLODCalculator::observableDestroyed ( Observable *  )
inlineprotected
void tlp::GlQuadTreeLODCalculator::removeObservers ( )
protected
void tlp::GlQuadTreeLODCalculator::setHaveToCompute ( )
protected
void tlp::GlQuadTreeLODCalculator::setInputData ( GlGraphInputData *  newInputData)

Change the input data used by this LOD calculator

void tlp::GlQuadTreeLODCalculator::setNeedEntities ( bool  )

Set if the calculator need to have entities

void tlp::GlQuadTreeLODCalculator::setScene ( GlScene scene)

Set the SlScene used by this calculator

void tlp::GlQuadTreeLODCalculator::treatEvent ( const Event &  ev)
protected
void tlp::GlQuadTreeLODCalculator::update ( PropertyInterface *  property)
protected

Member Data Documentation

std::vector<Camera *> tlp::GlQuadTreeLODCalculator::cameras
protected
Camera* tlp::GlQuadTreeLODCalculator::currentCamera
protected
Graph* tlp::GlQuadTreeLODCalculator::currentGraph
protected
BoundingBox tlp::GlQuadTreeLODCalculator::edgesGlobalBoundingBox
protected
std::vector<QuadTreeNode<unsigned int> *> tlp::GlQuadTreeLODCalculator::edgesQuadTree
protected
BoundingBox tlp::GlQuadTreeLODCalculator::entitiesGlobalBoundingBox
protected
std::vector<QuadTreeNode<GlSimpleEntity *> *> tlp::GlQuadTreeLODCalculator::entitiesQuadTree
protected
bool tlp::GlQuadTreeLODCalculator::haveToCompute
protected
std::map<GlLayer*,std::pair<Camera*, Camera> > tlp::GlQuadTreeLODCalculator::layerToCamera
protected
PropertyInterface* tlp::GlQuadTreeLODCalculator::layoutProperty
protected
BoundingBox tlp::GlQuadTreeLODCalculator::nodesGlobalBoundingBox
protected
std::vector<QuadTreeNode<unsigned int> *> tlp::GlQuadTreeLODCalculator::nodesQuadTree
protected
int tlp::GlQuadTreeLODCalculator::quadTreesVectorPosition
protected
PropertyInterface* tlp::GlQuadTreeLODCalculator::selectionProperty
protected
std::vector<std::vector<SimpleEntityLODUnit> > tlp::GlQuadTreeLODCalculator::simpleEntities
protected
int tlp::GlQuadTreeLODCalculator::simpleEntitiesVectorPosition
protected
PropertyInterface* tlp::GlQuadTreeLODCalculator::sizeProperty
protected


Tulip Software by LaBRI Visualization Team    2001 - 2012