Public Member Functions | Friends

NURBSBlendSurface Class Reference

This reference page is linked to from the following overview topics: Creating and Retrieving 3ds Max NURBS Objects.


Search for all occurrences

Detailed Description

See also:
Class NURBSSurface.

Description:
This class is available in release 2.0 and later only.

This class defines a dependent blend surface. A blend surface connects the edge of one surface to the edge of another, blending the curvature of the parents to create a smooth surface between them. Methods are available to get/set the parents, parent Ids, tension parameters and surface normal matching state.

All methods of this class are implemented by the system.

#include <surf_api.h>

Inheritance diagram for NURBSBlendSurface:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSBlendSurface (void)
virtual DllExport  ~NURBSBlendSurface (void)
DllExport NURBSBlendSurface operator= (const NURBSBlendSurface &surf)
DllExport void  SetParent (int pnum, int index)
DllExport void  SetParentId (int pnum, NURBSId id)
DllExport int  GetParent (int pnum)
DllExport NURBSId  GetParentId (int pnum)
DllExport void  SetEdge (int pnum, int edge)
DllExport int  GetEdge (int pnum)
DllExport void  SetTension (TimeValue t, int pnum, double ten)
DllExport double  GetTension (TimeValue t, int pnum)
DllExport void  SetFlip (int pnum, BOOL flip)
DllExport BOOL  GetFlip (int pnum)
DllExport void  SetCurveStartPoint (TimeValue t, int pnum, double startpoint)
DllExport double  GetCurveStartPoint (TimeValue t, int pnum)

Friends

class  NURBSSet

Constructor & Destructor Documentation

DllExport NURBSBlendSurface ( void  )
Remarks:
Constructor. The data members are initialized as follows:

    mType = kNBlendSurface;
    mpObject = NULL;
    mpNSet = NULL;
    for (int i = 0; i < 2; i++)
    {
        mParentId[i] = 0;
        mParentIndex[i] = -1;
        mParentEdge[i] = 0;
        mFlip[i] = FALSE;
        mTension[i] = 1.0;
        mCurveStartParam[i] = 0.0;
    }
virtual DllExport ~NURBSBlendSurface ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

DllExport NURBSBlendSurface& operator= ( const NURBSBlendSurface surf )
Remarks:
Assignment operator.
Parameters:
const NURBSBlendSurface& surf

The surface to assign.
DllExport 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 or 1.

int index

The index into the NURBSSet of the parent surface.
DllExport void SetParentId ( int  pnum,
NURBSId  id 
)
Remarks:
Sets the NURBSId of the specified parent.
Parameters:
int pnum

The parent number: 0 or 1.

NURBSId id

The id to set.
DllExport int GetParent ( int  pnum )
Remarks:
Returns the index in the NURBSSet of the specified parent object.
Parameters:
int pnum

The parent number: 0 or 1.
DllExport 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 or 1.
DllExport void SetEdge ( int  pnum,
int  edge 
)
Remarks:
Sets which edge of the specified surface is used for the blend.
Parameters:
int pnum

The parent number: 0 or 1.

int edge

One of the following values:

0: The low U edge.

1: The high U edge.

2: The low V edge.

3: The high V edge.
DllExport int GetEdge ( int  pnum )
Remarks:
Returns an integer that determines which edge of the specified surface is used for the blend.
Parameters:
int pnum

The parent number: 0 or 1.
Returns:
One of the following values:

0: The low U edge.

1: The high U edge.

2: The low V edge.

3: The high V edge.
DllExport void SetTension ( TimeValue  t,
int  pnum,
double  ten 
)
Remarks:
Sets the tension value for the specified parent surface.
Parameters:
TimeValue t

The time at which to set the tension value.

int pnum

The parent number: 0 or 1.

double ten

The tension value to set.
DllExport double GetTension ( TimeValue  t,
int  pnum 
)
Remarks:
Returns the tension value for the specified parent surface.
Parameters:
TimeValue t

The time at which to return the tension value.

int pnum

The parent number: 0 or 1.
DllExport void SetFlip ( int  pnum,
BOOL  flip 
)
Remarks:
This allows one to control the matching of parent surface normals when creating the blend surface. For example, normally when you create a blend surface between two parent surfaces you don't want a 'bow tie' surface (one with the ends rotated 180 degrees so it crosses on itself in the middle). If you simply match the parent normals you'll occasionally get a 'bow tie' surface. To prevent this you use this method to set a state indicating that one or the other should be flipped before it's used. In this way, when the blend is created, a 'bow tie' won't occur.
Parameters:
int pnum

The number of the parent surface: 0 or 1.

BOOL flip

TRUE to match the parent surface normal; FALSE to not match it.
DllExport BOOL GetFlip ( int  pnum )
Remarks:
Returns the flip state of the specified parent surface.
Parameters:
int pnum

The number of the parent surface: 0 or 1.
DllExport void SetCurveStartPoint ( TimeValue  t,
int  pnum,
double  startpoint 
)
Remarks:
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 number of the parent surface: 0 or 1.

double startpoint

The start point in the range 0.0 to 1.0.
DllExport double GetCurveStartPoint ( TimeValue  t,
int  pnum 
)
Remarks:
Returns the start point of 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 number of the parent surface: 0 or 1.
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface
NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface NURBSBlendSurface