FCDNURBSSpline Class Reference

Represents a NURBS spline. More...

#include <FCDGeometrySpline.h>

Inheritance diagram for FCDNURBSSpline:

FCDSpline FCDObject FUParameterizable FUTrackable FUObject List of all members.

Public Member Functions

 FCDNURBSSpline (FCDocument *document)
 Constructor.
virtual ~FCDNURBSSpline ()
 Destructor.
virtual FUDaeSplineType::Type GetSplineType () const
 FCDSpline method implementation.
uint32 GetDegree () const
 Get the degree for this NURBS.
void SetDegree (uint32 deg)
 Set the degree for this NURBS.
bool AddCV (const FMVector3 &cv, float weight)
 Add a control vertex as a 3D position and a weight attribute specific to this CV.
float * GetWeight (size_t index)
 Retrieves a reference to the weight specified by the index.
const float * GetWeight (size_t index) const
 See above.
size_t GetKnotCount () const
 Retrieves the knot count in this NURB.
void AddKnot (float knot)
 Add a knot to this NURB.
float * GetKnot (size_t index)
 Retrieves a reference to the knot specified by the index.
const float * GetKnot (size_t index) const
 See above.
FloatListGetWeights ()
 Retrieves a const reference to the weight list.
const FloatListGetWeights () const
 See above.
FloatListGetKnots ()
 Retrieves a const reference to the knot list.
const FloatListGetKnots () const
 See above.
virtual bool IsValid () const
 Determines if the spline is valid.
virtual FCDSplineClone (FCDSpline *clone) const
 [INTERNAL] Copies the spline into a clone.

Detailed Description

Represents a NURBS spline.

This is a typical NURBS spline. It uses a list of FMVector3 for its control vertices, along with a list of float to represent each vertex weight. A knot vector (uniform or not, clamped or not), together with a degree, complete the specification.


Constructor & Destructor Documentation

FCDNURBSSpline::FCDNURBSSpline FCDocument document  ) 
 

Constructor.

Parameters:
document The FCollada document that owns this spline.


Member Function Documentation

bool FCDNURBSSpline::AddCV const FMVector3 cv,
float  weight
 

Add a control vertex as a 3D position and a weight attribute specific to this CV.

Parameters:
cv The 3D position.
weight The weight attribute.

void FCDNURBSSpline::AddKnot float  knot  )  [inline]
 

Add a knot to this NURB.

Parameters:
knot The knot value.

virtual FCDSpline* FCDNURBSSpline::Clone FCDSpline clone  )  const [virtual]
 

[INTERNAL] Copies the spline into a clone.

The clone may reside in another document.

Parameters:
clone The empty clone. This pointer cannot be NULL.
Returns:
The clone.

Reimplemented from FCDSpline.

uint32 FCDNURBSSpline::GetDegree  )  const [inline]
 

Get the degree for this NURBS.

Returns:
The degree.

float* FCDNURBSSpline::GetKnot size_t  index  )  [inline]
 

Retrieves a reference to the knot specified by the index.

Parameters:
index The index.
Returns:
The address of the knot value, NULL if index is invalid.

size_t FCDNURBSSpline::GetKnotCount  )  const [inline]
 

Retrieves the knot count in this NURB.

Returns:
The knot count.

FloatList& FCDNURBSSpline::GetKnots  )  [inline]
 

Retrieves a const reference to the knot list.

Returns:
The knots' const reference.

virtual FUDaeSplineType::Type FCDNURBSSpline::GetSplineType  )  const [inline, virtual]
 

FCDSpline method implementation.

Returns:
The NURBS spline type.

Implements FCDSpline.

float* FCDNURBSSpline::GetWeight size_t  index  )  [inline]
 

Retrieves a reference to the weight specified by the index.

Parameters:
index The index.
Returns:
The address of the weight value, NULL if index is invalid.

FloatList& FCDNURBSSpline::GetWeights  )  [inline]
 

Retrieves a const reference to the weight list.

Returns:
The weights' const reference.

virtual bool FCDNURBSSpline::IsValid  )  const [virtual]
 

Determines if the spline is valid.

Returns:
True is the spline is valid, false otherwise.

void FCDNURBSSpline::SetDegree uint32  deg  )  [inline]
 

Set the degree for this NURBS.

Parameters:
deg The wanted degree.


The documentation for this class was generated from the following file:
Generated on Thu Feb 14 16:58:39 2008 for FCollada by  doxygen 1.4.6-NO