version 3.3

VRS::Plane Class Reference

Infinite Plane Shape. More...

#include <vrs/plane.h>

Inheritance diagram for VRS::Plane:

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

List of all members.

Public Member Functions

 Plane (const Vector &normal=Vector(0, 1, 0), const Vector &anchor=Vector(0, 0, 0), double textureTiling=1.0)
Vector getAnchor () const
void setAnchor (const Vector &anchor)
 Get/set the Anchor-Point.
Vector getNormal () const
void setNormal (const Vector &normal)
 Get/set the Normal.
double getTextureTiling () const
void setTextureTiling (double textile)
 Get/set the texturescale.
virtual Bounds boundingBox () const
Matrix transform () const
 VRS_TYPEINFO (Plane, Shape)
 VRS_SERIALIZABLE (Plane)


Detailed Description

Infinite Plane Shape.

Constructor & Destructor Documentation

VRS::Plane::Plane ( const Vector normal = Vector(0, 1, 0),
const Vector anchor = Vector(0, 0, 0),
double  textureTiling = 1.0 
)

`anchor' is a point of the plane, and `normal' is a vector perpendicular to the plane. Together, these values define the geometry completely. The texture- coordinates are implied by `transform' and its interpretation. TextureTiling provides a suitable texturing. IMPORTANT: THIS SHAPE uses the current transformation matrices, so it MUST NOT BE CACHED!!!


Member Function Documentation

Vector VRS::Plane::getAnchor (  )  const [inline]

void VRS::Plane::setAnchor ( const Vector anchor  ) 

Get/set the Anchor-Point.

Vector VRS::Plane::getNormal (  )  const [inline]

void VRS::Plane::setNormal ( const Vector normal  ) 

Get/set the Normal.

double VRS::Plane::getTextureTiling (  )  const [inline]

void VRS::Plane::setTextureTiling ( double  textile  ) 

Get/set the texturescale.

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

Return the bounding box. This always returns an infinte Box.

Implements VRS::Shape.

Matrix VRS::Plane::transform (  )  const

This matrix specifies how the XZ-Plane is transformed to become this plane. The texture-coordinates in the XZ-Plane are simply the (X,Z). If the objects plane is considered to be the mapped xz-plane, the texture is mapped as well. This transformation is obtained by first translating the origin to the anchor, and then rotate the plane around that point (using the rotation with the least absolute angle) to match the objects. plane. Sounds technical, eh? :-)

VRS::Plane::VRS_TYPEINFO ( Plane  ,
Shape   
)

VRS::Plane::VRS_SERIALIZABLE ( Plane   ) 


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

Generated on Tue May 22 06:00:26 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact