Class NURBSULoftSurface

3DS Max Plug-In SDK

Class NURBSULoftSurface

See Also: Class NURBSSurface.

class NURBSULoftSurface : public NURBSSurface

Description:

This class is available in release 2.0 and later only.

This class defines a dependent U Loft surface. A U Loft surface interpolates a surface across multiple curve sub-objects. The curves become U-axis contours of the surface. Methods are available to get/set the number of curves used to make the loft, append curves to the list, get/set the parent ids, and get/set the flipped state for each of the curves.

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:

NURBSULoftSurface();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNULoftSurface;

 mpObject = NULL;

 mpNSet = NULL;

 mParentId.SetCount(0);

 mParentIndex.SetCount(0);

 mFlip.SetCount(0);

 mCurveStartParam.SetCount(0);

 mTension.SetCount(0);

 mUseTangents.SetCount(0);

 mFlipTangents.SetCount(0);

 mAutoAlign = FALSE;

 mCloseLoft = FALSE;

Prototype:

virtual ~NURBSULoftSurface();

Remarks:

Destructor.

Prototype:

void SetNumCurves(int num);

Remarks:

Sets the number of curves used by the U loft.

Parameters:

int num

The number of curves to set.

Prototype:

int GetNumCurves();

Remarks:

Returns the number of curves used by the surface.

Prototype:

int AppendCurve(int index, BOOL flip);

Remarks:

Adds a curve to the end of the list of curves used to make the U loft surface.

Parameters:

int index

The index of the curve to add in the NURBSSet.

BOOL flip

TRUE to flip the orientation of this curve's normal used to build the loft; otherwise FALSE.

Return Value:

The number of curves in the list prior to this one being added.

Prototype:

int AppendCurve(NURBSId id, BOOL flip);

Remarks:

Adds a curve to the end of the list of curves used to make the U loft surface.

Parameters:

NURBSId id

The NURBS id of the curve to add.

BOOL flip

TRUE to flip the orientation of this curve's normal used to build the loft; otherwise FALSE.

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, 1, 2, etc.

int index

The index into the NURBSSet of the parent surface.

Prototype:

void SetParentId(int pnum, NURBSId id);

Remarks:

Sets the NURBSId of the specified parent.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

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, 1, 2, etc.

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, 1, 2, etc.

Prototype:

void SetFlip(int pnum, BOOL flip);

Remarks:

This method allows one to control the matching of parent normals when creating the U loft surface.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

BOOL flip

TRUE to flip the orientation of the normal when building the surface at this curve; otherwise FALSE.

Prototype:

BOOL GetFlip(int pnum);

Remarks:

Returns the flip state of the specified parent normal.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

Prototype:

void SetCurveStartPoint(TimeValue t, int pnum, double startpoint);

Remarks:

This method is available in release 3.0 and later only.

Sets the start point for the specified parent curve. Note: This is only applicable if the parent is a closed curve.

Parameters:

TimeValue t

The time at which to set the start point.

int pnum

The parent number, 0, 1, 2, etc.

double startpoint

The start point in the range 0.0 to 1.0.

Prototype:

double GetCurveStartPoint(TimeValue t, int pnum);

Remarks:

This method is available in release 3.0 and later only.

Returns the start point for the specified parent curve. Note: This is only applicable if the parent is a closed curve.

Parameters:

TimeValue t

The time at which to get the start point.

int pnum

The parent number, 0, 1, 2, etc.

Prototype:

void SetCurveTension(TimeValue t, int pnum, double tension);

Remarks:

This method is available in release 3.0 and later only.

Sets the curve tension for the specified parent curve.

Parameters:

TimeValue t

The time at which to set the tension.

int pnum

The parent number, 0, 1, 2, etc.

double tension

The tension value to set.

Prototype:

double GetCurveTension(TimeValue t, int pnum);

Remarks:

This method is available in release 3.0 and later only.

Returns the tension setting of the specified parent curve at the specified time.

Parameters:

TimeValue t

The time at which to get the tension.

int pnum

The parent number, 0, 1, 2, etc.

Prototype:

void SetCurveUseSurfaceTangent(int pnum, BOOL useTangent);

Remarks:

This method is available in release 3.0 and later only.

Sets the curve use surface tangent setting. If the curve is a curve on surface, turning this on causes the U loft to use the tangency of the surface. This can help blend a loft smoothly onto a surface.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

BOOL useTangent

TRUE to use the tangent; otherwise FALSE.

Prototype:

BOOL GetCurveUseSurfaceTangent(int pnum);

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if the curve use surface tangent setting is on; FALSE if off.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

Prototype:

void SetFlipTangent(int pnum, BOOL flipTangent);

Remarks:

This method is available in release 3.0 and later only.

Sets the flip tangent setting for the specified parent curve.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

BOOL flipTangent

TRUE to flip the tangent; otherwise FALSE.

Prototype:

BOOL GetFlipTangent(int pnum);

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if the tangent is flipped for the specified parent curve; otherwise FALSE.

Parameters:

int pnum

The parent number, 0, 1, 2, etc.

Prototype:

void SetAutoAlign(BOOL autoalign);

Remarks:

This method is available in release 3.0 and later only.

Sets if auto align is on or off.

Parameters:

BOOL autoalign

TRUE for on; FALSE for off.

Prototype:

BOOL GetAutoAlign();

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if auto align is on; otherwise FALSE.

Prototype:

void SetCloseLoft(BOOL closeLoft);

Remarks:

This method is available in release 3.0 and later only.

Sets if the loft is closed or not.

Parameters:

BOOL closeLoft

TRUE for closed; FALSE for open.

Prototype:

BOOL GetCloseLoft();

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if loft is closed; otherwise FALSE.

Operators:

Prototype:

NURBSULoftSurface & operator=(const NURBSULoftSurface& surf);

Remarks:

Assignment operator.

Parameters:

const NURBSULoftSurface& surf

The surface to assign.