Class NURBS1RailSweepSurface

3DS Max Plug-In SDK

Class NURBS1RailSweepSurface

See Also: Class NURBSSurface.

class NURBS1RailSweepSurface : public NURBSSurface

Description:

This class is available in release 2.5 and later only.

This class provides access to the 1-Rail Sweep Surface. A 1-Rail Sweep Surface uses at least two curves. One curve, the "rail," defines one edge of the surface. The other curves define the surface's cross sections. The cross-section curves should intersect the rail curve. If the cross sections don't intersect the rail, the resulting surface is unpredicable.

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:

NURBS1RailSweepSurface();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kN1RailSweepSurface;

 mpObject = NULL;

 mpNSet = NULL;

 mRailId = NULL;

 mRailIndex = -1;

 mParentId.SetCount(0);

 mParentIndex.SetCount(0);

 mFlip.SetCount(0);

 mCurveStartParam.SetCount(0);

 mSnapCrossSections = FALSE;

 mRoadlike = FALSE;

 mXForm.IdentityMatrix();

Prototype:

virtual ~NURBS1RailSweepSurface();

Remarks:

Destructor.

Prototype:

void SetParentRail(int index);

Remarks:

Establishes the curve to use as the rail by specifying its index in the NURBSSet.

Parameters:

int index

The index in the NURBSSet.

Prototype:

void SetParentRailId(NURBSId id);

Remarks:

Establishes the curve to use as the rail by specifying its NURBSId.

Parameters:

NURBSId id

The id of the rail curve to use.

Prototype:

int GetParentRail();

Remarks:

Returns the index in the NURBSSet of the rail curve.

Prototype:

NURBSId GetParentRailId();

Remarks:

Returns the NURBSId of the rail curve.

Prototype:

void SetNumCurves(int num);

Remarks:

Sets the number of cross-section curves.

Parameters:

int num

The number of cross-section curves to use.

Prototype:

int GetNumCurves(void);

Remarks:

Returns the number of cross-section curves used.

Prototype:

int AppendCurve(int index, BOOL flip);

Remarks:

Adds a curve to the end of the list of cross-section curves by specifying the index in the NURBSSet.

Parameters:

int index

The index in the NURBSSet of the cross-section curve to append.

BOOL flip

TRUE to reverse (or flip) the direction of the curve; FALSE to use the non-reversed orientation.

Return Value:

The number of cross-section curves prior to appending.

Prototype:

int AppendCurve(NURBSId id, BOOL flip);

Remarks:

Adds a curve to the end of the list of cross-section curves by specifying a NURBSId.

Parameters:

NURBSId id

Specifies the cross-section curve to append.

BOOL flip

TRUE to reverse (or flip) the direction of the curve; FALSE to use the non-reversed orientation.

Return Value:

The number of cross-section curves prior to appending.

Prototype:

void SetParent(int pnum, int index);

Remarks:

Specifies the curve to use as a cross-section via its index in the NURBSSet.

Parameters:

int pnum

The zero based index of the curve to set.

int index

The index in the NURBSSet of the curve.

Prototype:

void SetParentId(int pnum, NURBSId id);

Remarks:

Specifies the curve to use as a cross-section via its NURBSId.

Parameters:

int pnum

The zero based index of the curve to set.

NURBSId id

The id of the curve.

Prototype:

int GetParent(int pnum);

Remarks:

Returns the index in the NURBSSet of the specified cross-section curve.

Parameters:

int pnum

The zero based index of the curve to get.

Prototype:

NURBSId GetParentId(int pnum);

Remarks:

Returns the NURBSId of the specified cross-section curve.

Parameters:

int pnum

The zero based index of the curve to get.

Prototype:

void SetFlip(int pnum, BOOL flip);

Remarks:

Sets the reversed (or flipped) state of the specified cross-section curve.

Parameters:

int pnum

The zero based index of the curve.

BOOL flip

TRUE to reverse the direction; FALSE for the normal direction.

Prototype:

BOOL GetFlip(int pnum);

Remarks:

Returns the reversed (or flipped) state of the specified cross-section curve. TRUE is reversed; FALSE is not.

Parameters:

int pnum

The zero based index of the curve.

Prototype:

void SetParallel(BOOL para);

Remarks:

Sets the state of the parallel flag. When on, it ensures that the sweep surface's normal is parallel to the rail.

Parameters:

BOOL para

TRUE for on; FALSE for off.

Prototype:

BOOL GetParallel();

Remarks:

Returns the state of the parallel flag. When TRUE, 3ds max ensures that the sweep surface's normal is parallel to the rail.

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 zero based index of the curve in the set of cross sections.

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 of the specified parent curve.

Parameters:

TimeValue t

The time at which to get the start point.

int pnum

The zero based index of the curve in the set of cross sections.

 

Prototype:

void SetSnapCS(BOOL snapCS);

Remarks:

This method is available in release 3.0 and later only.

Sets the snap cross sections setting. When on, cross-section curves are translated so they intersect the rail.

Parameters:

BOOL snapCS

TRUE for on; FALSE for off.

Prototype:

BOOL GetSnapCS();

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if snap to Cross Section is on; otherwise FALSE.

Prototype:

void SetRoadlike(BOOL roadlike);

Remarks:

This method is available in release 3.0 and later only.

Sets the roadlike setting to on or off. When on, the sweep uses a constant up-vector so the cross sections twist uniformly as they travel along the rail. In other words, the cross sections bank like a car following a road, or a camera following a path controller in 3ds max.

Parameters:

BOOL roadlike

TRUE for on; FALSE for off.

Prototype:

BOOL GetRoadlike();

Remarks:

This method is available in release 3.0 and later only.

Returns TRUE if the roadlike setting is on; otherwise FALSE.

Prototype:

void SetAxis(TimeValue t, Matrix3& ray);

Remarks:

This method is available in release 3.0 and later only.

Sets the axis of the sweep.

Parameters:

TimeValue t

The time at which to set the axis.

Matrix3& ray

The axis system to set.

Prototype:

Matrix3& GetAxis(TimeValue t);

Remarks:

This method is available in release 3.0 and later only.

Returns the axis of the sweep.

Parameters:

TimeValue t

The time at which to get the axis.

Operators:

Prototype:

NURBS1RailSweepSurface & operator=(const NURBS1RailSweepSurface& surf);

Remarks:

Assignment operator.

Parameters:

const NURBS1RailSweepSurface& surf

The surface to assign.