Class NURBSOffsetCurve

3DS Max Plug-In SDK

Class NURBSOffsetCurve

See Also: Class NURBSCurve.

class NURBSOffsetCurve : public NURBSCurve

Description:

This class is available in release 2.0 and later only.

This class defines a dependent offset curve. An offset curve is offset from the original, parent curve. It lies in the same plane as its parent, and is normal to the original. Methods are available to get/set the parent index and id and to get/set the distance from the parent curve.

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:

NURBSOffsetCurve();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNOffsetCurve;

 mpObject = NULL;

 mpNSet = NULL;

 mParentId = 0;

 mParentIndex = -1;

 mDistance = 0.0;

Prototype:

~NURBSOffsetCurve();

Remarks:

Destructor. The cache is cleared.

Prototype:

void SetParent(int index);

Remarks:

Sets the index in the NURBSSet of the parent object.

Parameters:

int index

The index into the NURBSSet of the parent curve.

Prototype:

void SetParentId(NURBSId id);

Remarks:

Sets the NURBSId of the parent.

Parameters:

NURBSId id

The id to set.

Prototype:

int GetParent();

Remarks:

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

Prototype:

NURBSId GetParentId();

Remarks:

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

Prototype:

void SetDistance(TimeValue t, double d);

Remarks:

Sets the distance of the offset curve from the original in 3ds max units at the specified time.

Parameters:

TimeValue t

The time to set the offset distance.

double d

The distance to set.

Prototype:

double GetDistance(TimeValue t);

Remarks:

Returns the distance of the offset curve from the parent at the specified time.

Parameters:

TimeValue t

The time to get the offset distance.

Operators:

Prototype:

NURBSOffsetCurve & operator=(const NURBSOffsetCurve& curve);

Remarks:

Assignment operator.

Parameters:

const NURBSOffsetCurve& curve

The curve to assign.