version 3.3

VRS::Bezier Class Reference

Bezier Curve. More...

#include <vrs/bezier.h>

Inheritance diagram for VRS::Bezier:

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

List of all members.

Public Member Functions

 Bezier (Iterator< Vector > *controlpoints=(Iterator< Vector > *) 0, Iterator< Color > *controlpointcolors=(Iterator< Color > *) 0)
 Constructs the curve with the given control points.
void setVertexIterator (Iterator< Vector > *itr)
 Sets the control points.
Iterator< Vector > * newVertexIterator () const
 Returns the control points.
void setColorIterator (Iterator< Color > *itr)
 Sets the colors for the control points.
Iterator< Color > * newColorIterator () const
 Sets the colors for the control points.
virtual Vector curvePoint (double u) const
 Returns the curve point specified by u.
virtual Vector derivative (int degree, double u) const
 Returns the degree's derivative at the point specified by u, see curvePoint.
virtual Bounds boundingBox () const
 Returns the bounding box.
 VRS_TYPEINFO (Bezier, Curve)
 VRS_SERIALIZABLE (Bezier)


Detailed Description

Bezier Curve.

Constructor & Destructor Documentation

VRS::Bezier::Bezier ( Iterator< Vector > *  controlpoints = (IteratorVector > *) 0,
Iterator< Color > *  controlpointcolors = (IteratorColor > *) 0 
)

Constructs the curve with the given control points.

The number of control points specifies the order of the Bezier curve. IMPORTANT: the colors are not supported !!


Member Function Documentation

void VRS::Bezier::setVertexIterator ( Iterator< Vector > *  itr  ) 

Sets the control points.

Iterator<Vector>* VRS::Bezier::newVertexIterator (  )  const

Returns the control points.

void VRS::Bezier::setColorIterator ( Iterator< Color > *  itr  ) 

Sets the colors for the control points.

There must be the same number of colors as control points.

Iterator<Color>* VRS::Bezier::newColorIterator (  )  const

Sets the colors for the control points.

The colors correspond 1 on 1 to the controlling vertices.

virtual Vector VRS::Bezier::curvePoint ( double  u  )  const [virtual]

Returns the curve point specified by u.

u is the parametric value between 0 and 1. The calculation is based on the current set of control points.

Implements VRS::Curve.

virtual Vector VRS::Bezier::derivative ( int  degree,
double  u 
) const [virtual]

Returns the degree's derivative at the point specified by u, see curvePoint.

Implements VRS::Curve.

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

Returns the bounding box.

Implements VRS::Shape.

VRS::Bezier::VRS_TYPEINFO ( Bezier  ,
Curve   
)

VRS::Bezier::VRS_SERIALIZABLE ( Bezier   ) 


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