Spline Class Reference

#include <Spline.h>

List of all members.

Public Member Functions

 Spline ()
 ~Spline ()
void initialize (unsigned int numCP, unsigned int lev)
void evaluate ()
Spline copy (void)
unsigned long getLevel ()
unsigned long getNumControlPoints ()
unsigned long getNumSplinePoints ()
std::vector< Spline::SplinePoint > * getControlPoints ()
std::vector< Spline::SplinePoint > * getControlPointNormals ()
std::vector< Spline::SplinePoint > * getSplinePoints ()
std::vector< Spline::SplinePoint > * getSplinePointNormals ()
void printControlPoints ()
void printControlPointNormals ()
void printSplinePoints ()
void printSplinePointNormals ()

Protected Attributes

std::vector< SplinePoint_controlPoints
std::vector< SplinePoint_controlPointNormalVectors
std::vector< SplinePoint_splinePoints
std::vector< SplinePoint_splinePointNormalVectors
unsigned long _level
unsigned long _numControlPoints
unsigned long _numSplinePoints

Classes

struct  SplinePoint


Detailed Description

This class implements a spline curve constructed by subdivision.

It is adapted from the Spline class in the original Tabletop Framework by T. Isenberg and J. Ales. The name of the functions were changed but their contents were kept. Documentation comments were added as well.

Author:
Tobias Isenberg - isenberg@cpsc.ucalgary.ca

Janez Ales - janez.ales@gmail.com

Fabricio Anastacio - fabriciocfa@yahoo.com

Since:
August 20, 2007 (adaptation)


Constructor & Destructor Documentation

Spline::Spline (  ) 

Constructs an empty spline curve.

Spline::~Spline (  ) 

Destroys this spline curve.


Member Function Documentation

void Spline::initialize ( unsigned int  numCP,
unsigned int  lev 
)

Initializes the spline and sets the number of control points and level.

Parameters:
numCP the number of control points in the spline.
lev the number of subdivisions of the spline.

void Spline::evaluate (  ) 

Evaluates this spline using the current control points. It calculates sample points along the spline and the normal vectors at these points.

Spline Spline::copy ( void   ) 

Copies this spline to a new object and returns it.

Returns:
a copy of this spline.

unsigned long Spline::getLevel (  ) 

Returns the number of subdivisions of this spline.

Returns:
the number of subdivisions of this spline.

unsigned long Spline::getNumControlPoints (  ) 

Returns the number of control points of this spline.

Returns:
the number of control points of this spline.

unsigned long Spline::getNumSplinePoints (  ) 

Returns the number of sample points of this spline.

Returns:
the number of sample points of this spline.

std::vector< Spline::SplinePoint > * Spline::getControlPoints (  ) 

Returns the control points of this spline.

Returns:
the control points of this spline.

std::vector< Spline::SplinePoint > * Spline::getControlPointNormals (  ) 

Returns the normal vectors at the control points of this spline.

Returns:
the normal vectors at the control points of this spline.

std::vector< Spline::SplinePoint > * Spline::getSplinePoints (  ) 

Returns the sample points of this spline.

Returns:
the sample points of this spline.

std::vector< Spline::SplinePoint > * Spline::getSplinePointNormals (  ) 

Returns the normal vectors at the sample points of this spline.

Returns:
the normal vectors at the sample points of this spline.

void Spline::printControlPoints (  ) 

Prints the control points of this spline.

void Spline::printControlPointNormals (  ) 

Prints the normal vector at the control points of this spline.

void Spline::printSplinePoints (  ) 

Prints the sample points of this spline.

void Spline::printSplinePointNormals (  ) 

Prints the normal vector at the sample points of this spline.


Member Data Documentation

std::vector<SplinePoint> Spline::_controlPoints [protected]

The spline control points.

std::vector<SplinePoint> Spline::_controlPointNormalVectors [protected]

The normal vectors at the control points.

std::vector<SplinePoint> Spline::_splinePoints [protected]

The sample points along the spline.

std::vector<SplinePoint> Spline::_splinePointNormalVectors [protected]

The normal vectors at the sample points.

unsigned long Spline::_level [protected]

The number of subdivisions of the spline.

unsigned long Spline::_numControlPoints [protected]

The number of control points.

unsigned long Spline::_numSplinePoints [protected]

The number of sample points.


The documentation for this class was generated from the following files:
Generated on Fri Dec 21 17:46:08 2007 for LargeDisplayFrameworkToolkit by  doxygen 1.5.2