Class NURBSChamferCurve

3DS Max Plug-In SDK

Class NURBSChamferCurve

See Also: Class NURBSCurve.

class NURBSChamferCurve : public NURBSCurve

Description:

This class is available in release 2.0 and later only.

This class defines a dependent chamfer curve. A chamfer is a curve that creates a straight line corner between two parent curves. Methods are availalble to get/set the parent indices and ids, to get/set which ends of the curves are used for the chamfer, get/set the trim settings for each curve, and to get/set the length of the curve back from the selected end that represents the start of the chamfer.

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:

NURBSChamferCurve();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNChamferCurve;

 mpObject = NULL;

 mpNSet = NULL;

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

  mParentId[i] = 0;

  mParentIndex[i] = -1;

  mParentEnd[i] = TRUE;

  mTrimCurve[i] = TRUE;

mFlipTrim[i] = FALSE;

  mLength[i] = 0.0;

 }

Prototype:

~NURBSChamferCurve();

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 specified 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 which end of the specified curve is used for the chamfer.

Parameters:

int pnum

The parent number: 0 or 1.

BOOL end

TRUE to use the end of the curve; FALSE to use the beginning.

Prototype:

BOOL GetEnd(int pnum);

Remarks:

Returns which end of the specified curve is used for the chamfer. TRUE if the end of the curve is used; FALSE if the beginning is used.

Parameters:

int pnum

The parent curve number: 0 or 1.

Prototype:

void SetLength(TimeValue t, int pnum, double length);

Remarks:

Sets the length for the specified parent curve back from the end that defines the beginning of the chamfer, at the specified time.

Parameters:

TimeValue t

The time at which to set the chamfer length.

int pnum

The parent curve number: 0 or 1.

double length

The chamfer length to set.

Prototype:

double GetLength(TimeValue t, int pnum);

Remarks:

Returns the length of the chamfer at the specified time.

Parameters:

TimeValue t

The time at which to return the chamfer length.

int pnum

The parent curve number: 0 or 1.

Prototype:

void SetTrimCurve(int pnum, BOOL trim);

Remarks:

Sets if the specified curve is trimmed beyond the chamfer.

Parameters:

int pnum

The parent curve number: 0 or 1.

BOOL trim

TRUE to trim the curve beyond the chamfer; otherwise FALSE.

Prototype:

BOOL GetTrimCurve(int pnum);

Remarks:

Determines if the specified curve is trimmed beyond the fillet. TRUE if the curve is trimmed; otherwise FALSE.

Parameters:

int pnum

The parent curve number: 0 or 1.

Prototype:

BOOL GetFlipTrim(int pnum);

Remarks:

Returns the flip state for the specified curve.

Parameters:

int pnum

The parent curve number: 0 or 1.

Return Value:

TRUE if flip is set; FALSE it not.

Prototype:

void SetFlipTrim(int pnum, BOOL flip);

Remarks:

Sets the flip state for the specified curve.

Parameters:

int pnum

The parent curve number: 0 or 1.

BOOL flip

TRUE to flip; FALSE to not flip.

Operators:

Prototype:

NURBSChamferCurve & operator=(const NURBSChamferCurve& curve);

Remarks:

Assignment operator.

Parameters:

const NURBSChamferCurve& curve

The curve to assign.