Overview     Modules     Class Hierarchy     Classes     Members  
tlp::GlCPULODCalculator Class Reference

Class used to compute LOD of GlEntities with OpenMP parallelization. More...

#include <GlCPULODCalculator.h>

Inheritance diagram for tlp::GlCPULODCalculator:

List of all members.

Public Member Functions

Protected Member Functions

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

Protected Attributes


Detailed Description

Class used to compute LOD of GlEntities with OpenMP parallelization.

This class perform LOD computation of GlEntities based on screen projection of entities bounding boxes

Warning:
By default this class don't compute LOD for edges (for optimisation) and return a lod of 10. to these edges, if you want to compute edges' LOD call setComputeEdgesLOD(true)

Constructor & Destructor Documentation

tlp::GlCPULODCalculator::GlCPULODCalculator ( )
virtual tlp::GlCPULODCalculator::~GlCPULODCalculator ( ) [virtual]

Member Function Documentation

virtual void tlp::GlCPULODCalculator::addEdgeBoundingBox ( unsigned int  id,
const BoundingBox &  bb 
) [virtual]

This function is call by GlLODSceneVisitor when an edge is found

Reimplemented in tlp::GlQuadTreeLODCalculator.

virtual void tlp::GlCPULODCalculator::addNodeBoundingBox ( unsigned int  id,
const BoundingBox &  bb 
) [virtual]

This function is call by GlLODSceneVisitor when a node is found

Reimplemented in tlp::GlQuadTreeLODCalculator.

virtual void tlp::GlCPULODCalculator::addSimpleEntityBoundingBox ( GlSimpleEntity entity,
const BoundingBox &  bb 
) [virtual]

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

Reimplemented in tlp::GlQuadTreeLODCalculator.

virtual void tlp::GlCPULODCalculator::beginNewCamera ( Camera camera) [virtual]

Begin a new camera (use to render next entities)

virtual GlLODCalculator* tlp::GlCPULODCalculator::clone ( ) [inline, virtual]

Reimplemented in tlp::GlQuadTreeLODCalculator.

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

Compute all bounding boxes If you want to compute LOD for a simple scene, you just have to call this function with same value on globalViewport and currentViewport But if you want to perform a sub screen part selection you have to call this function with : globalViewport the viewport of the visualisation and currentViewport the viewport of the selection

Parameters:
globalViewportis used to compute LOD
currentViewport: return -1 for all entities outside this viewport

Reimplemented in tlp::GlQuadTreeLODCalculator.

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

Reimplemented in tlp::GlQuadTreeLODCalculator.

virtual BoundingBox tlp::GlCPULODCalculator::getSceneBoundingBox ( ) [inline, virtual]

This function return the scene bounding box

virtual void tlp::GlCPULODCalculator::reserveMemoryForEdges ( unsigned int  numberOfEdges) [virtual]

Reserve memory to store edges LOD, this function is an optimisation function

virtual void tlp::GlCPULODCalculator::reserveMemoryForNodes ( unsigned int  numberOfNodes) [virtual]

Reserve memory to store nodes LOD, this function is an optimisation function

void tlp::GlCPULODCalculator::setComputeEdgesLOD ( bool  state) [inline]

Set if the edge LOD must be calculated at default the edge LOD is not calculated and return 10.

void tlp::GlCPULODCalculator::setComputeOutScreenLOD ( bool  state) [inline]

Set if the LOD is computed for out screen entities


Member Data Documentation



Tulip Software by LaBRI Visualization Team    2001 - 2012