Public Member Functions | Protected Attributes | Friends

NURBSPointCurve Class Reference

Search for all occurrences

Detailed Description

See also:
Class NURBSCurve, Class NURBSIndependentPoint.

Description:
This class is available in release 2.0 and later only.

This class defines a curve that uses points to describe its shape. All the points lie on the curve itself. There are methods to get/set the number of points in the curve, get/set the points themselves, refine the curve (add points without changing its shape), and to get/set the transformation matrix used by the curve. This matrix is used to set the postion of the curve in the NURBSSet.

All methods of this class are implemented by the system.
Data Members:
protected:

NURBSIndependentPoint *mpPts;

Array of independent points.

BOOL mClosed;

TRUE if the curve is closed; otherwise FALSE.

int mNumPts;

The number of independent points.

#include <surf_api.h>

Inheritance diagram for NURBSPointCurve:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSPointCurve (void)
virtual DllExport  ~NURBSPointCurve (void)
DllExport NURBSPointCurve operator= (const NURBSPointCurve &curve)
DllExport void  Close (void)
DllExport BOOL  IsClosed (void)
DllExport void  SetNumPts (int num)
DllExport int  GetNumPts (void)
DllExport void  GetNumPts (int &num)
DllExport NURBSIndependentPoint GetPoint (int index)
DllExport void  SetPoint (int index, NURBSIndependentPoint &pt)
DllExport void  SetTransformMatrix (TimeValue t, SetXFormPacket &xPack)
DllExport Matrix3  GetTransformMatrix (TimeValue t)
DllExport void  Refine (TimeValue t, double u)

Protected Attributes

NURBSIndependentPoint mpPts
BOOL  mClosed
int  mNumPts

Friends

class  NURBSSet

Constructor & Destructor Documentation

DllExport NURBSPointCurve ( void  )
Remarks:
Constructor. The data members are initialized as follows:

mType = kNPointCurve;

mClosed = FALSE;

mpPts = NULL;
virtual DllExport ~NURBSPointCurve ( void  ) [virtual]
Remarks:
Destructor. If any points were allocated they are freed and the cache is cleared.

Member Function Documentation

DllExport NURBSPointCurve& operator= ( const NURBSPointCurve curve )
Remarks:
Assignment operator.
Parameters:
const NURBSPointCurve& curve

The curve to assign.
DllExport void Close ( void  )
Remarks:
Closes the point curve.
DllExport BOOL IsClosed ( void  )
Remarks:
Returns TRUE if the curve is closed; otherwise FALSE.

Reimplemented from NURBSCurve.

DllExport void SetNumPts ( int  num )
Remarks:
Sets the number of points in the point curve. Note that any previous point data is not maintained when the new number is set.
Parameters:
int num

The number of points in the curve.
DllExport int GetNumPts ( void  )
Remarks:
Returns the number of points in the curve.
DllExport void GetNumPts ( int &  num )
Remarks:
Retrieves the number of points in the curve.
Parameters:
int &num

The result is stored here.
DllExport NURBSIndependentPoint* GetPoint ( int  index )
Remarks:
Returns a pointer to the specified point.
Parameters:
int index

The zero based index of the point to get.
DllExport void SetPoint ( int  index,
NURBSIndependentPoint pt 
)
Remarks:
Sets the specified point in the curve.
Parameters:
int index

The zero based index of the point to set.

NURBSIndependentPoint &pt

The point to set.
DllExport void SetTransformMatrix ( TimeValue  t,
SetXFormPacket xPack 
)
Remarks:
Sets the transformation matrix for the NURBSPointCurve. This controls the relative position of the item within a NURBSSet.
Parameters:
TimeValue t

The time at which to set the matrix.

SetXFormPacket& xPack

An instance of the XFormPacket class that describes the properties of the transformation. See Class SetXFormPacket.
DllExport Matrix3 GetTransformMatrix ( TimeValue  t )
Remarks:
Returns the transformation matrix that controls the relative position of the point curve in the NURBSSet.
Parameters:
TimeValue t

The time at which to return the matrix.
DllExport void Refine ( TimeValue  t,
double  u 
)
Remarks:
This method adds a new point at the specified location on the curve without changing its shape. The point is specified as a distance in U parameter space. Note that calling this method causes all animation of the curve to be removed.
Parameters:
TimeValue t

The time at which to refine the curve. The curve may be animated, and thus the underlying parameter space may be changing. So when the u value is specified it must relate to the curve at a specific time.

double u

The point at which to refine the curve. Developers should use the method NURBSCurve::GetParameterRange() to get the valid range of values that may be passed here.
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

Member Data Documentation

BOOL mClosed [protected]
int mNumPts [protected]

NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve
NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve NURBSPointCurve