GClasses

GClasses::GNurbs Class Reference

NURBS = Non Uniform Rational B-Spline Periodic = closed loop. More...

#include <GBezier.h>

List of all members.

Public Member Functions

 GNurbs (int nControlPoints, int nDegree, bool periodic)
 GNurbs (GNurbs *pThat)
 ~GNurbs ()
int controlPointCount ()
 Returns the number of control points.
void controlPoint (G3DVector *pOutPoint, double *pOutWeight, int n)
 Returns a control point and the associated weight.
void setControlPoint (int n, G3DVector *pPoint, double weight)
 Set a control point location and its weight.
double knotInterval (int n)
void setKnotInterval (int n, double dInterval)
GBezierbezier (int nInterval)
 Create a Bezier curve that exactly fits a portion of this curve. todo: what are acceptable values for nInterval?
void insertKnotPeriodic (int nInterval, double dRatio)
 0 <= dRatio <= 1, (for example, .5 means to insert the knot in the center of the interval)

Protected Member Functions

void pointCircular (struct GBezierPoint *pOutPoint, int n)
double knotValue (int n)
void calculateBezierControlPoint (struct GBezierPoint *pOutPoint, int nInterval, int nControlPoint)
void newKnotPeriodic (struct GBezierPoint *pA, struct GBezierPoint *pB, int n, int nControlPoint, double dRatio)

Protected Attributes

int m_nControlPoints
int m_nDegree
struct GNurbsPoint * m_pPoints
bool m_bPeriodic

Detailed Description

NURBS = Non Uniform Rational B-Spline Periodic = closed loop.


Constructor & Destructor Documentation

GClasses::GNurbs::GNurbs ( int  nControlPoints,
int  nDegree,
bool  periodic 
)
GClasses::GNurbs::GNurbs ( GNurbs pThat)
GClasses::GNurbs::~GNurbs ( )

Member Function Documentation

GBezier* GClasses::GNurbs::bezier ( int  nInterval)

Create a Bezier curve that exactly fits a portion of this curve. todo: what are acceptable values for nInterval?

void GClasses::GNurbs::calculateBezierControlPoint ( struct GBezierPoint *  pOutPoint,
int  nInterval,
int  nControlPoint 
) [protected]
void GClasses::GNurbs::controlPoint ( G3DVector pOutPoint,
double *  pOutWeight,
int  n 
)

Returns a control point and the associated weight.

int GClasses::GNurbs::controlPointCount ( ) [inline]

Returns the number of control points.

void GClasses::GNurbs::insertKnotPeriodic ( int  nInterval,
double  dRatio 
)

0 <= dRatio <= 1, (for example, .5 means to insert the knot in the center of the interval)

double GClasses::GNurbs::knotInterval ( int  n)
double GClasses::GNurbs::knotValue ( int  n) [protected]
void GClasses::GNurbs::newKnotPeriodic ( struct GBezierPoint *  pA,
struct GBezierPoint *  pB,
int  n,
int  nControlPoint,
double  dRatio 
) [protected]
void GClasses::GNurbs::pointCircular ( struct GBezierPoint *  pOutPoint,
int  n 
) [protected]
void GClasses::GNurbs::setControlPoint ( int  n,
G3DVector pPoint,
double  weight 
)

Set a control point location and its weight.

void GClasses::GNurbs::setKnotInterval ( int  n,
double  dInterval 
)

Member Data Documentation

int GClasses::GNurbs::m_nDegree [protected]
struct GNurbsPoint* GClasses::GNurbs::m_pPoints [protected]