Class NURBSCurveConstPoint

3DS Max Plug-In SDK

Class NURBSCurveConstPoint

See Also: Class NURBSObject, List of NURBSConst Types, Class Point3.

class NURBSCurveConstPoint : public NURBSObject

Description:

This class is available in release 2.0 and later only.

This class is used to create a dependent point that lies on a curve or relative to it.

The point can either be on the curve or off the curve. If it is on the curve, the U Position is the only control of its location. The U Position specifies a location along the curve (based on the curve’s local U axis). There are three ways to displace the point’s location relative to the U position:

Offset moves the point according to a relative (object space) X,Y,Z location.

Normal moves the point along the direction of the curve’s normal. (Negative values move it opposite to the normal.)

U Position

Tangent moves the point along the tangent of the U Position.

All methods of this class are implemented by the system.

Data Members:

protected:

NURBSId mParentId;

The NURBSId of the parent curve.

int mParentIndex;

The index in the NURBSSet of the parent curve.

NURBSConstType mCType;

The type of constraint in use.

Point3 mOffset;

The offset amount.

float mNormal;

The distance along the normal.

float mUTangent;

The distance along the tangent.

double mUParam;

Specifies the point along the parent curve.

BOOL mTrimCurve;

The point that is constrained to the curve may be used to trim the curve.

BOOL mFlipTrim;

If TRUE the curve is trimmed from the point towards low parameter space. If FALSE the curve is trimmed from the point towards high parameter space.

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:

NURBSCurveConstPoint();

Remarks:

Constructor. The data members are initialized as follows:

 mType = kNCurveCPoint;

 mpObject = NULL;

 mpNSet = NULL;

 mParentId = 0;

 mParentIndex = -1;

 mCType = kNConstOnObject;

 mOffset = Point3(0,0,0);

 mNormal = 0.0f;

 mUTangent = 0.0f;

 mUParam = 0.0;

 mTrimCurve = FALSE;

 mFlipTrim = FALSE;

Prototype:

virtual ~NURBSCurveConstPoint();

Remarks:

Destructor.

Prototype:

void SetParent(int index);

Remarks:

Sets the parent index to the specified value.

Parameters:

int index

The parent index to set.

Prototype:

void SetParentId(NURBSId id);

Remarks:

Sets the parent ID to the specified value.

Parameters:

NURBSId id

The parent ID to set.

Prototype:

int GetParent();

Remarks:

Returns the parent index.

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 SetPointType(NURBSConstType type);

Remarks:

Sets the point type.

Parameters:

NURBSConstType type

Specifies the construction point type. See List of NURBSConst Types.

Prototype:

NURBSConstType GetPointType();

Remarks:

Returns the point type. See List of NURBSConst Types.

Prototype:

void SetOffset(TimeValue t, Point3 pt);

Remarks:

Sets the offset value at the specified time.

Parameters:

TimeValue t

Specifies the time at which the offset value is set.

Point3 pt

The offset to set in object space.

Prototype:

Point3 GetOffset(TimeValue t);

Remarks:

Returns the offset value in object space at the specified time.

Parameters:

TimeValue t

Specifies the time at which the offset value is returned.

Prototype:

void SetUParam(TimeValue t, double param);

Remarks:

Sets the U Parameter for the point.

Parameters:

TimeValue t

Specifies the time at which the value is set.

double param

The U parameter to set.

Prototype:

double GetUParam(TimeValue t);

Remarks:

Returns the U parameter at the specified time.

Parameters:

TimeValue t

Specifies the time at which the value is returned.

Prototype:

void SetNormal(TimeValue t, float dist);

Remarks:

Sets the normal distance at the specified time.

Parameters:

TimeValue t

Specifies the time at which the value is set.

float dist

The distance to set.

Prototype:

float GetNormal(TimeValue t);

Remarks:

Returns the distance along the normal at the specified time.

Parameters:

TimeValue t

Specifies the time at which the value is returned.

Prototype:

void SetUTangent(TimeValue t, float dist);

Remarks:

Set the U tangent value at the specified time.

Parameters:

TimeValue t

Specifies the time at which the value is set.

float dist

The distance to set.

Prototype:

float GetUTangent(TimeValue t);

Remarks:

Returns the U tangent value at the specified time.

Parameters:

TimeValue t

Specifies the time at which the value is returned.

Prototype:

BOOL GetTrimCurve();

Remarks:

Returns TRUE if this point is used to trim the curve and FALSE if it is not.

Prototype:

void SetTrimCurve(BOOL trim);

Remarks:

Sets the trim curve boolean.

Parameters:

BOOL trim

TRUE to indicate this point is used to trim the curve; FALSE to indicate the curve is not trimmed beyond the point.

Prototype:

BOOL GetFlipTrim();

Remarks:

Returns the state of the flip trim boolean.

Prototype:

void SetFlipTrim(BOOL flip);

Remarks:

Sets the state of the flip trim boolean.

Parameters:

BOOL flip

TRUE to indicate the curve is trimmed from the point towards low parameter space. Use FALSE to indicate the curve is trimmed from the point towards high parameter space.

Operators:

Prototype:

NURBSCurveConstPoint & operator=(const NURBSCurveConstPoint& pt);

Remarks:

Assignment operator.

Parameters:

const NURBSCurveConstPoint& pt

The point to assign.