Overview | Modules | Class Hierarchy | Classes | Members

Public Member Functions | Protected Member Functions | Protected Attributes
tlp::GlQuadTreeLODCalculator Class Reference

`#include <GlQuadTreeLODCalculator.h>`

Inheritance diagram for tlp::GlQuadTreeLODCalculator:
[legend]
Collaboration diagram for tlp::GlQuadTreeLODCalculator:
[legend]

List of all members.

## 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 ()

## 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 destroy (Graph *)
- void destroy (const Camera *)
- void destroy (PropertyInterface *)
- void removeObservers ()
- void addObservers ()
- void initCamerasObservers ()
- void clearCamerasObservers ()
- void setHaveToCompute ()

## 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
- Camera * currentCamera
- Graph * currentGraph
- PropertyInterface * layoutProperty
- PropertyInterface * sizeProperty
- PropertyInterface * selectionProperty
- int quadTreesVectorPosition
- int simpleEntitiesVectorPosition

## 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 |
| ) |  | `[inline, protected]`

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::addNode | ( | Graph * | ,
|  | const node |
| ) |  | `[inline, protected]`

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::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 | ( |  | ) | `[inline, virtual]`

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 |
| ) |  | `[inline, protected]`

void tlp::GlQuadTreeLODCalculator::delNode | ( | Graph * | ,
|  | const node |
| ) |  | `[inline, protected]`

void tlp::GlQuadTreeLODCalculator::destroy | ( | Graph * |  | ) | `[protected]`

void tlp::GlQuadTreeLODCalculator::destroy | ( | PropertyInterface * |  | ) | `[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 * |  | ) | `[inline, protected]`

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