version 3.3

VRS::VertexAttributeGenerator Class Reference

base class for subclasses that generate analytic vertex attribute data. More...

#include <vrs/vertexattributegenerator.h>

Inheritance diagram for VRS::VertexAttributeGenerator:

VRS::BoxSideGenerator VRS::ConeGenerator VRS::CylinderGenerator VRS::DiscGenerator VRS::HyperboloidGenerator VRS::KnotGenerator VRS::ParaboloidGenerator VRS::SphereGenerator VRS::SuperQuadGenerator VRS::TorusGenerator

List of all members.

Public Member Functions

 VertexAttributeGenerator (unsigned int nx, unsigned int ny)
virtual ~VertexAttributeGenerator ()
 Derived classes often create temporary data, which must be deleted in their destructor.
virtual Iterator< Vector > * calcVertexData (const ID &vertexDataType)
virtual Matrix getTransform () const
unsigned int nx () const
 gets nx
unsigned int ny () const
 gets ny

Protected Attributes

const unsigned int nx_
const unsigned int ny_
const unsigned int size_
SO< Iterator< Vector > > vertices_
SO< Iterator< Vector > > normals_
SO< Iterator< Vector > > textures_
SO< Iterator< Vector > > tangents_
SO< Iterator< Vector > > binormals_
SO< Iterator< Vector > > uvparam_


Detailed Description

base class for subclasses that generate analytic vertex attribute data.

Constructor & Destructor Documentation

VRS::VertexAttributeGenerator::VertexAttributeGenerator ( unsigned int  nx,
unsigned int  ny 
)

A VertexAttributeGenerator is a base class of classes that create analytical vertex attribute data that fits in a mesh. The tesselation of the mesh is given by nx and ny, i.e., the exact mesh dimension is (nx+1)*(ny+1)

Beware: this is no SharedObj! As this class and sub-classes will be used internally in VRS only, and only by simplifier classes, this seems to be no big problem.

virtual VRS::VertexAttributeGenerator::~VertexAttributeGenerator (  )  [virtual]

Derived classes often create temporary data, which must be deleted in their destructor.


Member Function Documentation

virtual Iterator<Vector>* VRS::VertexAttributeGenerator::calcVertexData ( const ID vertexDataType  )  [virtual]

For the given abtract vertex data type (as defined in VertexAttributeMap), generates an Iterator that contains the vertex data for further use in a mesh. The VertexAttributeGenerator can generate

  • VertexAttributeMap::UV_PARAMETER (simple parametrisation of the mesh)
  • VertexAttributeMap::BINORMAL (by creating NORMAL and TANGENT data and calculating the cross-product). Other data must be created by subclasses for concrete analytic shapes.

Reimplemented in VRS::BoxSideGenerator, VRS::ConeGenerator, VRS::CylinderGenerator, VRS::DiscGenerator, VRS::HyperboloidGenerator, VRS::KnotGenerator, VRS::ParaboloidGenerator, VRS::SphereGenerator, VRS::SuperQuadGenerator, and VRS::TorusGenerator.

virtual Matrix VRS::VertexAttributeGenerator::getTransform (  )  const [virtual]

Returns the transformation matrix which should be applied to the shape for correct location and orientation.

Reimplemented in VRS::ConeGenerator, VRS::CylinderGenerator, VRS::DiscGenerator, and VRS::SphereGenerator.

unsigned int VRS::VertexAttributeGenerator::nx (  )  const [inline]

gets nx

unsigned int VRS::VertexAttributeGenerator::ny (  )  const [inline]

gets ny


Member Data Documentation

const unsigned int VRS::VertexAttributeGenerator::nx_ [protected]

const unsigned int VRS::VertexAttributeGenerator::ny_ [protected]

const unsigned int VRS::VertexAttributeGenerator::size_ [protected]


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

Generated on Tue May 21 06:00:36 2013 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact