Class NURBSMirrorCurve

3DS Max Plug-In SDK

Class NURBSMirrorCurve

See Also: Class NURBSCurve, List of NURBSMirrorAxis Types.

class NURBSMirrorCurve : public NURBSCurve

Description:

This class is available in release 2.0 and later only.

This class defines a dependent mirror curve. A mirror curve is similar to a mirror object that you create using the Mirror tool (on the 3ds max toolbar) or the Mirror modifier. It is the original curve relfected about one or two axes. Methods are available to get/set the parent index and id, to get/set the reflection axis, and to get/set the offset distance.

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:

NURBSMirrorCurve();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNMirrorCurve;

 mpObject = NULL;

 mpNSet = NULL;

 mParentId = 0;

 mParentIndex = -1;

 mXForm.IdentityMatrix();

 mAxis = kMirrorX;

 mDistance = 0.0;

Prototype:

~NURBSMirrorCurve();

Remarks:

Destructor.

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 specified parent.

Parameters:

NURBSId id

The id to set.

Prototype:

int GetParent();

Remarks:

Returns the index in the NURBSSet of the 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 SetAxis(NURBSMirrorAxis axis);

Remarks:

Sets the axis or axes of reflection for the curve.

Parameters:

NURBSMirrorAxis axis

Specifies the axis or axes of reflection.

Prototype:

NURBSMirrorAxis GetAxis();

Remarks:

Returns the axis or axes of reflection for the curve.

Prototype:

void SetXForm(TimeValue t, Matrix3& mat);

Remarks:

This is an additional transformation applied to the axis specification. This corresponds to the gizmo they user may use interactively to alter the location of the mirror axis. This is exactly equivalent to setting the transform on the gizmo of a mirror modifier.

Parameters:

TimeValue t

The time at which to set the transformation.

Matrix3& mat

The transformation to set.

Prototype:

Matrix3& GetXForm(TimeValue t);

Remarks:

Returns the additional transformation applied to the mirror axis at the specified time.

Parameters:

TimeValue t

The time at which to get the transformation matrix.

Prototype:

void SetDistance(TimeValue t, double d);

Remarks:

Sets the offset distance of the curve.

Parameters:

TimeValue t

The time at which to set the distance.

double d

The distance to set.

Prototype:

double GetDistance(TimeValue t);

Remarks:

Returns the offset distance of the curve.

Parameters:

TimeValue t

The time at which to get the distance.

Operators:

Prototype:

NURBSMirrorCurve & operator=(const NURBSMirrorCurve& curve);

Remarks:

Assignment operator.

Parameters:

const NURBSMirrorCurve& curve

The curve to assign.