version 3.3

VRS::LODShape Class Reference

#include <vrs/lodshape.h>

Inheritance diagram for VRS::LODShape:

VRS::Shape VRS::RenderObj VRS::SharedObj VRS::Visitable

List of all members.

Public Member Functions

 LODShape ()
 LODShape (Iterator< double > *distances, Iterator< SO< Shape > > *shapes)
void append (double distance, Shape *shape)
void remove (double distance)
void clear ()
int size () const
double getDistance (int index) const
ShapegetShape (int index) const
ShapegetCurrentShape (double distance) const
virtual Bounds boundingBox () const
 Bounding box of the shape.
 VRS_TYPEINFO (LODShape, Shape)
 VRS_SERIALIZABLE (LODShape)

Protected Member Functions

virtual void acceptChildren (std::vector< Visitable * > &appendChildrenHere) const


Constructor & Destructor Documentation

VRS::LODShape::LODShape (  ) 

VRS::LODShape::LODShape ( Iterator< double > *  distances,
Iterator< SO< Shape > > *  shapes 
)

This shape manages distance-shape pairs. The first given shape will be rendered if the distance of the center of the bounding box (union of all given shapes) with the camera position is between the first given distance and the second one. The n-th shape will be rendered if it's distance to the camera position is in the interval of the n-th with the (n+1)-th distance. The first distance usually should be 0.0. The distance-shape pairs will be re-ordered, so the given order doesn't matter.


Member Function Documentation

void VRS::LODShape::append ( double  distance,
Shape shape 
)

void VRS::LODShape::remove ( double  distance  ) 

void VRS::LODShape::clear (  ) 

`append' re-orders the distance-shape pairs by their distances. `remove' removes the distance and the appropriate shape.

int VRS::LODShape::size (  )  const

double VRS::LODShape::getDistance ( int  index  )  const

Shape* VRS::LODShape::getShape ( int  index  )  const

Shape* VRS::LODShape::getCurrentShape ( double  distance  )  const

`size' returns the number of distance-shape pairs. `getCurrentShape' returns a shape for a given distance.

virtual Bounds VRS::LODShape::boundingBox (  )  const [virtual]

Bounding box of the shape.

Implements VRS::Shape.

VRS::LODShape::VRS_TYPEINFO ( LODShape  ,
Shape   
)

VRS::LODShape::VRS_SERIALIZABLE ( LODShape   ) 

virtual void VRS::LODShape::acceptChildren ( std::vector< Visitable * > &  appendChildrenHere  )  const [protected, virtual]

Reimplemented from VRS::Visitable.


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

Generated on Mon May 21 06:00:19 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact