FCDGeometrySpline Class Reference
[COLLADA Document Geometry Entity]

A COLLADA geometric spline. More...

#include <FCDGeometrySpline.h>

Inheritance diagram for FCDGeometrySpline:

FCDObject FUObject List of all members.

Public Member Functions

 FCDGeometrySpline (FCDocument *document, FCDGeometry *parent)
 Constructor: do not use directly.
virtual ~FCDGeometrySpline ()
 Destructor: do not use directly.
FCDGeometryGetParent ()
 Retrieve the parent of this geometric spline: the geometry entity.
const FCDGeometryGetParent () const
 See above.
FCDCVsGetCVs ()
 Retrieves the list of control points for the spline.
const FCDCVsGetCVs () const
 See above.
size_t GetCVCount () const
 Retrieves the number of control points for the spline.
FMVector3GetCV (size_t index)
 Retrieves a specific control point of the spline.
const FMVector3GetCV (size_t index) const
 See above.
FCDKnotsGetKnots ()
 Retrieves the list of knots for the spline.
const FCDKnotsGetKnots () const
 See above.
size_t GetKnotCount () const
 Retrieves the number of knots for the spline.
double GetKnot (size_t index) const
 Retrieves a specific knot of the spline.
bool IsClosed () const
 Retrieves whether this spline is closed.
bool IsOpen () const
 Retrieves whether this spline is open.
void SetCVs (const FCDCVs &_cvs)
 Overwrites the list of control points for this spline with a new ordered list of control points.
void SetKnots (const FCDKnots &_knots)
 Overwrites the list of knots for this spline with a new ordered list of knots.
void SetClosed (bool _isClosed)
 Sets the spline closed state.
FUStatus LoadFromXML (xmlNode *splineNode)
 [INTERNAL] Reads in the <spline> element from a given COLLADA XML tree node.
xmlNode * WriteToXML (xmlNode *parentNode) const
 [INTERNAL] Writes out the <spline> element to the given COLLADA XML tree node.

Detailed Description

A COLLADA geometric spline.

A COLLADA spline contains a list of control points (CVs) that define an ordered list of 3D coordinates that influence the spline. The spline also contains a matching list of knots: there should be as many control points as there are knots.

A COLLADA spline may be closed or open. If the spline is closed, then the first control point should be re-used when evaluating the last control point: the result should be a continuous curve, while an open spline will result in a discontinuity at each end.

Todo:
: Insert the mathematical formula to calculate the spline position.


Constructor & Destructor Documentation

FCDGeometrySpline::FCDGeometrySpline FCDocument document,
FCDGeometry parent
 

Constructor: do not use directly.

Use the FCDGeometry::CreateMesh function instead.

Parameters:
document The COLLADA document that owns the new spline.
parent The geometry entity that contains the new spline.

virtual FCDGeometrySpline::~FCDGeometrySpline  )  [virtual]
 

Destructor: do not use directly.

All geometric splines are released with the geometry that they belong to.


Member Function Documentation

FMVector3* FCDGeometrySpline::GetCV size_t  index  )  [inline]
 

Retrieves a specific control point of the spline.

Parameters:
index The index of the control point. The index should always be less than the number of control point.
Returns:
The control point.

size_t FCDGeometrySpline::GetCVCount  )  const [inline]
 

Retrieves the number of control points for the spline.

Returns:
The control point count.

FCDCVs& FCDGeometrySpline::GetCVs  )  [inline]
 

Retrieves the list of control points for the spline.

Returns:
The list of control points.

double FCDGeometrySpline::GetKnot size_t  index  )  const [inline]
 

Retrieves a specific knot of the spline.

Parameters:
index The index of the knot. The index should always be less than the number of knots.
Returns:
The knot value.

size_t FCDGeometrySpline::GetKnotCount  )  const [inline]
 

Retrieves the number of knots for the spline.

Returns:
The knot count.

FCDKnots& FCDGeometrySpline::GetKnots  )  [inline]
 

Retrieves the list of knots for the spline.

Returns:
The list of knots.

FCDGeometry* FCDGeometrySpline::GetParent  )  [inline]
 

Retrieve the parent of this geometric spline: the geometry entity.

Returns:
The geometry entity that this spline belongs to.

bool FCDGeometrySpline::IsClosed  )  const [inline]
 

Retrieves whether this spline is closed.

Returns:
Whether the spline is closed.

bool FCDGeometrySpline::IsOpen  )  const [inline]
 

Retrieves whether this spline is open.

Returns:
Whether the spline is open.

FUStatus FCDGeometrySpline::LoadFromXML xmlNode *  splineNode  ) 
 

[INTERNAL] Reads in the <spline> element from a given COLLADA XML tree node.

Parameters:
splineNode The COLLADA XML tree node.
Returns:
The status of the import. If the status is not successful, it may be dangerous to extract information from the spline.

void FCDGeometrySpline::SetClosed bool  _isClosed  )  [inline]
 

Sets the spline closed state.

Parameters:
_isClosed The new closed state.

void FCDGeometrySpline::SetCVs const FCDCVs _cvs  )  [inline]
 

Overwrites the list of control points for this spline with a new ordered list of control points.

Parameters:
_cvs The new control points.

void FCDGeometrySpline::SetKnots const FCDKnots _knots  )  [inline]
 

Overwrites the list of knots for this spline with a new ordered list of knots.

Parameters:
_knots The new knots.

xmlNode* FCDGeometrySpline::WriteToXML xmlNode *  parentNode  )  const
 

[INTERNAL] Writes out the <spline> element to the given COLLADA XML tree node.

Parameters:
parentNode The COLLADA XML parent node in which to insert the spline information.
Returns:
The created <spline> element XML tree node.


The documentation for this class was generated from the following file:
Generated on Fri May 12 16:44:43 2006 for FCollada by  doxygen 1.4.6-NO