Class NURBSBlendCurve

3DS Max Plug-In SDK

Class NURBSBlendCurve

See Also: Class NURBSCurve.

class NURBSBlendCurve : public NURBSCurve

Description:

This class is available in release 2.0 and later only.

This class defines a dependent blend curve. A blend curve connects the specified end of one curve to the specified end of another, blending the curvature of the parents to create a smooth curve between them. Methods are available to get/set the parent indices and ids, to get/set the ends of the curves used for the blend, and to get/set the tension values used.

All methods of this class are implemented by the system.

Friend Classes:

friend class NURBSSet

Methods:

protected:

Prototype:

void Clean(NURBSIdTab ids);

Remarks:

This method is available in release 3.0 and later only.

This methods breaks the relation between this NURBSObject and a NURBSSet.

Parameters:

NURBSIdTab ids

A table with the IDs of each object in the NURBSSet.

public:

Prototype:

NURBSBlendCurve();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNBlendCurve;

 mpObject = NULL;

 mpNSet = NULL;

 for (int i = 0; i < 2; i++) {

  mParentId[i] = 0;

  mParentIndex[i] = -1;

  mParentEnd[i] = TRUE;

  mTension[i] = 1.0;

 }

Prototype:

~NURBSBlendCurve();

Remarks:

Destructor. The cache is cleared.

Prototype:

void SetParent(int pnum, int index);

Remarks:

Sets the index in the NURBSSet of the specified parent object.

Parameters:

int pnum

The parent number: 0 or 1.

int index

The index into the NURBSSet of the parent object.

Prototype:

void SetParentId(int pnum, NURBSId id);

Remarks:

Sets the NURBSId of the specified parent.

Parameters:

int pnum

The parent number: 0 or 1.

NURBSId id

The id to set.

Prototype:

int GetParent(int pnum);

Remarks:

Returns the index in the NURBSSet of the specified parent object.

Parameters:

int pnum

The parent number: 0 or 1.

Prototype:

NURBSId GetParentId(int pnum);

Remarks:

Returns the NURBSId of the parent. Note that a NURBSId won't be valid until the object has been instantiated in the scene

Parameters:

int pnum

The parent number: 0 or 1.

Prototype:

void SetEnd(int pnum, BOOL end);

Remarks:

Sets if the beginning or end of the specified curve is used for the blend.

Parameters:

int pnum

The parent number: 0 or 1.

BOOL end

TRUE to use the end of the curve; FALSE to use the beginning. The beginning of the curve has lesser parameter values than the end.

Prototype:

BOOL GetEnd(int pnum);

Remarks:

Indicates if the beginning or end of the specified curve is used for the blend.

Parameters:

int pnum

The parent number: 0 or 1.

Return Value:

TRUE if the end of the curve is used; FALSE if the beginning is used.

Prototype:

void SetTension(TimeValue t, int pnum, double ten);

Remarks:

Sets the tension value for the specified parent curve.

Parameters:

TimeValue t

The time at which to set the tension

int pnum

The parent number: 0 or 1.

double ten

The tension value to set.

Prototype:

double GetTension(TimeValue t, int pnum);

Remarks:

Returns the tension value for the specified parent curve.

Parameters:

TimeValue t

The time at which to get the tension

int pnum

The parent number: 0 or 1.

Operators:

Prototype:

NURBSBlendCurve & operator=(const NURBSBlendCurve& curve);

Remarks:

Assignment operator.

Parameters:

const NURBSBlendCurve& curve

The curve to assign.