version 3.3

VRS::Box Class Reference

#include <vrs/box.h>

Inheritance diagram for VRS::Box:

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

List of all members.

Public Member Functions

 VRS_TYPEINFO (Box, Shape)
 VRS_SERIALIZABLE (Box)
 Box (const Bounds &bounds=Bounds(Vector(0.0, 0.0, 0.0), Vector(1.0, 1.0, 1.0)))
 Construcs a box with the given bounding box; defaults to the unit box.
 Box (const Vector &llf, const Vector &urb)
 Constructs a box specified by its extremal points.
Bounds getBox () const
 Returns the bounding box.
Vector getLLF () const
 Returns the lower left front point of the box.
Vector getURB () const
 Returns the upper right back point of the box.
void setBox (const Bounds &box)
 Sets the represented bounding box.
void setLLF (const Vector &llf)
 Set the lower left front point of the box.
void setURB (const Vector &urb)
 Set the lower left front point of the box.
virtual Bounds boundingBox () const
 Returns the bounding box.


Detailed Description

Adapter to place bounding boxes in scene graphs, see BoundingBox and Shape Boxes represent a rectangular 3D volume. The Egdes of a box are parallel to the three main axes. llf defines the lower-left-front, urb the upper-right- back vertex of the box. Note that, in contrast to OpenGL, VRS uses a left-handed coordinate system, so the value for back has to be greater than front to define a regular box. Consequently, the normal of the front side of the box generated by a simplifier ought to be (0, 0, -1).

Constructor & Destructor Documentation

VRS::Box::Box ( const Bounds bounds = Bounds(Vector(0.0, 0.0, 0.0), Vector(1.0, 1.0, 1.0))  ) 

Construcs a box with the given bounding box; defaults to the unit box.

VRS::Box::Box ( const Vector llf,
const Vector urb 
)

Constructs a box specified by its extremal points.


Member Function Documentation

VRS::Box::VRS_TYPEINFO ( Box  ,
Shape   
)

VRS::Box::VRS_SERIALIZABLE ( Box   ) 

Bounds VRS::Box::getBox (  )  const

Returns the bounding box.

Vector VRS::Box::getLLF (  )  const

Returns the lower left front point of the box.

Vector VRS::Box::getURB (  )  const

Returns the upper right back point of the box.

void VRS::Box::setBox ( const Bounds box  ) 

Sets the represented bounding box.

void VRS::Box::setLLF ( const Vector llf  ) 

Set the lower left front point of the box.

void VRS::Box::setURB ( const Vector urb  ) 

Set the lower left front point of the box.

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

Returns the bounding box.

Implements VRS::Shape.


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

Generated on Fri May 18 06:00:17 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact