Class NURBSMirrorSurface

3DS Max Plug-In SDK

Class NURBSMirrorSurface

See Also: Class NURBSSurface, List of NURBSMirrorAxis Types.

class NURBSMirrorSurface : public NURBSSurface

Description:

This class is available in release 2.0 and later only.

This class defines a dependent mirror surface. A mirror surface 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 surface relfected about one or two axes. Methods are available to get/set the indices of the parent surface in the NURBSSet and the parent Ids, to get/set the mirror axes, to get/set the mirror distance, and to set the transformation used to position the surface in the NURBSSet.

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:

NURBSMirrorSurface();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNMirrorSurface;

 mpObject = NULL;

 mpNSet = NULL;

 mParentId = 0;

 mParentIndex = -1;

 mXForm.IdentityMatrix();

 mAxis = kMirrorX;

 mDistance = 0.0;

Prototype:

virtual ~NURBSMirrorSurface();

Remarks:

Destructor.

Prototype:

void SetParent(int index);

Remarks:

Sets the index in the NURBSSet of the parent object.

Parameters:

int index

The index in the NURBSSet of the parent object

Prototype:

void SetParentId(NURBSId id);

Remarks:

Sets the NURBSId of the parent object.

Parameters:

NURBSId id

The NURBSId of the parent object.

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 mirror axis to the specified constant.

Parameters:

NURBSMirrorAxis axis

The mirror axis to set.

Prototype:

NURBSMirrorAxis GetAxis();

Remarks:

Returns the axis or axes of reflection for the surface.

Prototype:

void SetXForm(TimeValue t, Matrix3& mat);

Remarks:

This is an additional transformation applied to the axis specification. This corresponds to the gizmo the 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:

This is just like the offset parameter in the mirror modifier. It is an offset from the center of the local coordinate system for the mirror object that moves the mirror, in the direction specified by the mirror axis.

Parameters:

TimeValue t

The time at which to set the offset.

double d

The offset distance.

Prototype:

double GetDistance(TimeValue t);

Remarks:

Returns the offset distance of the mirror at the specified time.

Parameters:

TimeValue t

The time at which to return the offset.

Operators:

Prototype:

NURBSMirrorSurface & operator=(const NURBSMirrorSurface& surf);

Remarks:

Assignment operator.

Parameters:

const NURBSMirrorSurface& surf

The surface to assign.