Class NURBSControlVertex

3DS Max Plug-In SDK

Class NURBSControlVertex

See Also: Class NURBSObject, Class NURBSSurface, Class NURBSSet, Class NURBSPoint, Class NURBSCurve, Class NURBSFuseSurfaceCV, Class NURBSFuseCurveCV.

class NURBSControlVertex : public NURBSObject

Description:

This class is available in release 2.0 and later only.

This class represents a control vertex in a NURBS curve. Methods are available to get and set the point position, and get/set the weight.

All methods of this class are implemented by the system.

Methods:

Prototype:

NURBSControlVertex();

Remarks:

Constructor. The name is set to NULL, the points are set to 0.0f and the weight is set to 1.0.

Prototype:

~NURBSControlVertex();

Remarks:

Destructor.

Prototype:

void SetPosition(TimeValue t, Point3 pt);

Remarks:

Sets the position of the control vertex.

Parameters:

TimeValue t

The time to set the position.

Point3 pt

Specifies the position to set.

Prototype:

void SetPosition(TimeValue t, float x, float y, float z);

Remarks:

Sets the position of the control vertex.

Parameters:

TimeValue t

The time to set the position.

float x, float y, float z

Specifies the position to set.

Prototype:

void SetPosition(TimeValue t, double x, double y, double z);

Remarks:

Sets the position of the control vertex.

Parameters:

TimeValue t

The time to set the position.

double x, double y, double z

Specifies the position to set.

Prototype:

Point3 GetPosition(TimeValue t);

Remarks:

Returns the position of the control vertex.

Parameters:

TimeValue t

The time to get the position.

Prototype:

void GetPosition(TimeValue t, float& x, float& y, float& z);

Remarks:

Retrieves the position of the control vertex.

Parameters:

TimeValue t

The time to get the position.

float& x

The X coordinates is returned here.

float& y

The Y coordinates is returned here.

float& z

The Z coordinates is returned here.

Prototype:

void GetPosition(TimeValue t, double& x, double& y, double& z);

Remarks:

Retrieves the position of the control vertex.

Parameters:

TimeValue t

The time to get the position.

double& x

The X coordinates is returned here.

double& y

The Y coordinates is returned here.

double& z

The Z coordinates is returned here.

Prototype:

void SetWeight(TimeValue t, float wt);

Remarks:

Sets the weight of the control vertex.

Parameters:

TimeValue t

The time to set the weight.

float wt

Specifies the weight to set. This is a value greater than zero. Larger values cause the CV to have a greater effect, thus the curve or surface will try to pass closer to the CV.

Prototype:

void SetWeight(TimeValue t, double wt);

Remarks:

Sets the weight of the control vertex.

Parameters:

TimeValue t

The time to set the weight.

double wt

Specifies the weight to set. . This is a value greater than zero. Larger values cause the CV to have a greater effect, thus the curve or surface will try to pass closer to the CV.

Prototype:

void GetWeight(TimeValue t, float& wt);

Remarks:

Retrieves the weight of the control vertex.

Parameters:

TimeValue t

The time to get the weight.

float& wt

The weight is returned here.

Prototype:

double GetWeight(TimeValue t);

Remarks:

Returns the weight of the control vertex.

Parameters:

TimeValue t

The time to get the weight.

Prototype:

void GetWeight(TimeValue t, double& wt);

Remarks:

Retrieves the weight of the control vertex.

Parameters:

TimeValue t

The time to get the weight.

double& wt

The weight is returned here.

Operators:

Prototype:

NURBSControlVertex & operator=(const NURBSControlVertex& cv);

Remarks:

Assignment operator.

Parameters:

const NURBSControlVertex& cv

The control vertex to assign.

Prototype:

BOOL operator==(const NURBSControlVertex& cv);

Remarks:

Equality operator. Compares if the coordinates and weight are the same.

Parameters:

const NURBSControlVertex& cv

The control vertex to compare.

Return Value:

TRUE if the CVs are equal; otherwise FALSE.

Prototype:

BOOL operator!=(const NURBSControlVertex& cv);

Remarks:

Inequality operator. Compares if the coordinates or weight are not the same.

Parameters:

const NURBSControlVertex& cv

The control vertex to compare.

Return Value:

TRUE if the CVs are not equal; otherwise FALSE.