Public Member Functions | Public Attributes | Protected Attributes | Friends

NURBSSet Class Reference

This reference page is linked to from the following overview topics: The NURBS API, NURBS Base Classes, NURBS Surface Classes, Using the API to Create and Modify 3ds Max NURBS Models, Accessing Details of NURBS Objects, Parameter Ranges for Curves and Surfaces, Creating and Retrieving 3ds Max NURBS Objects, Modifying Existing NURBS Objects.


Search for all occurrences

Detailed Description

See also:
Class NURBSObject, Class NURBSDisplay, Class TessApprox, Class NURBSFuseSurfaceCV, Class NURBSFuseCurveCV, Template Class Tab.

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

This class contains a table of NURBSObject entities used to make up the set. Additionally it has two fuse tables: one for fuse curves and one for fuse surfaces. These are used to allow the CVs in the curves or surfaces to be 'stitched' together so if one curve or surface moves the other moves with it. This class also has information required to tessellate the objects to triangle meshes for use in the viewports and the production renderer.

All methods of this class are implemented by the system.
Data Members:
protected:

TessApprox *mpVTess;

This object describes the properties of a tesselation approximation to the mathematical surface for representation in the viewports.

TessApprox *mpRTess;

This object describes the properties of a tesselation approximation to the mathematical surface for the production renderer.

TessApprox *mpRTessDisp;

This object describes the tesselation properties for displacement mapping in the production renderer.

TessApprox *mpVTessCurve;

This object describes the properties of a tesselation approximation to the mathematical curve for representation in the viewports.

TessApprox *mpRTessCurve;

This object describes the properties of a tesselation approximation to the mathematical curve for the production renderer.

float mTessMerge;

Controls the tessellation of surface sub-objects whose edges are joined or very nearly joined. When input to a modifier -- such as Mesh Select -- requires a mesh, and when NURBS surfaces are tessellated for production rendering, by default 3ds Max adjusts the tessellation of adjoining surfaces to match each other, in terms of the number of faces along the edges. The Merge parameter controls how this is done. If Merge is zero, adjoining faces are unchanged. Increasing the value of Merge increases the distance 3ds Max uses to calculate how edges should match, guaranteeing no gaps between the surfaces when they are rendered.

Tab<NURBSObject*> mObjects;

A table of pointers to the NURBSObjects in the set.

Object *mpObject;

The instantiated object in the scene associated with this NURBSSet. This is NULL if there isn't one.

NURBSDisplay mDisplay;

Controls the display of the object in the viewport..

Tab<NURBSFuseSurfaceCV> mSurfFuse;

A table of objects used to allow surfaces in the set to relate to on another.

Tab<NURBSFuseCurveCV> mCurveFuse;

A table of objects used to allow curves in the set to relate to on another.

#include <surf_api.h>

Inheritance diagram for NURBSSet:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSSet (void)
virtual DllExport  ~NURBSSet (void)
DllExport void  Clean ()
DllExport int  GetNumObjects ()
DllExport void  SetObject (int index, NURBSObject *obj)
DllExport int  AppendObject (NURBSObject *obj)
DllExport void  RemoveObject (int index)
DllExport void  DeleteObjects ()
DllExport NURBSObject GetNURBSObject (int index)
DllExport NURBSObject GetNURBSObject (NURBSId id)
DllExport TessApprox GetProdTess (NURBSTessType type=kNTessSurface)
DllExport TessApprox GetViewTess (NURBSTessType type=kNTessSurface)
DllExport void  SetProdTess (TessApprox &tess, NURBSTessType type=kNTessSurface)
DllExport void  SetViewTess (TessApprox &tess, NURBSTessType type=kNTessSurface)
DllExport void  ClearViewTess (NURBSTessType type=kNTessSurface)
DllExport void  ClearProdTess (NURBSTessType type=kNTessSurface)
DllExport float  GetTessMerge ()
DllExport void  SetTessMerge (float merge)
DllExport Object GetMAXObject ()
DllExport NURBSDisplay  GetDisplaySettings ()
DllExport void  SetDisplaySettings (NURBSDisplay &disp)

Public Attributes

Tab< NURBSFuseSurfaceCV mSurfFuse
Tab< NURBSFuseCurveCV mCurveFuse

Protected Attributes

TessApprox mpVTess
TessApprox mpRTess
TessApprox mpRTessDisp
TessApprox mpVTessCurve
TessApprox mpRTessCurve
float  mTessMerge
Tab< NURBSObject * >  mObjects
Object mpObject
NURBSDisplay  mDisplay

Friends

DllExport Object CreateNURBSObject (IObjParam *ip, NURBSSet *nset, Matrix3 &mat)
DllExport int  AddNURBSObjects (Object *MAXobj, IObjParam *ip, NURBSSet *nset)
DllExport BOOL  GetNURBSSet (Object *object, TimeValue t, NURBSSet &nset, BOOL Relational)

Constructor & Destructor Documentation

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

mpObject = NULL;

mpVTess = NULL;

mpRTess = NULL;

mpRTessDisp = NULL;

mpVTessCurve = NULL;

mpRTessCurve = NULL;

mTessMerge = 0.01f;

mDisplay.mDisplayCurves = TRUE;

mDisplay.mDisplaySurfaces = TRUE;

mDisplay.mDisplayLattices = FALSE;

mDisplay.mDisplayShadedLattice = FALSE;

mDisplay.mDisplaySurfCVLattices = TRUE;

mDisplay.mDisplayCurveCVLattices = TRUE;

mDisplay.mDisplayDependents = TRUE;

mDisplay.mDisplayTrimming = TRUE;

mDisplay.mDegradeOnMove = TRUE;
virtual DllExport ~NURBSSet ( void  ) [virtual]
Remarks:
Destructor. Any tesselation objects are deleted.

Member Function Documentation

DllExport void Clean ( )
Remarks:
This removes the NURBS Set connection to a live NURBS object. One use of this is so you can call CreateNURBSObject() twice with the same NURBSSet. You call Clean() in between the calls. Another use is if you want to use the API to copy a NURBS object. You could call GetNURBSSet() followed by a Clea() followed by a CreateNURBSObject().
DllExport int GetNumObjects ( )
Remarks:
Returns the number of objects in the set.
DllExport void SetObject ( int  index,
NURBSObject obj 
)
Remarks:
This method sets an object in the table of objects maintained by the set. If the index is to an existing object in the set this will replace that object. If it is a new index, all the objects which follow this one in the set are set to NULL and the one passed is set.
Parameters:
int index

If the index is an existing object in the set this will replace the object. If it is a new index, all the objects which follow this one are set to NULL and the one passed is set.

NURBSObject* obj

Points to the object to add to the table.
Remarks:
Sets the specified NURBSObject pointer in the table to the specified pointer. If the value of index is greater than the number of items in the table, the table is resized and any non-initialized pointers are set to NULL.
Parameters:
int index

The zero based index of the object to set.

NURBSObject* obj

Points to the object to set.
DllExport int AppendObject ( NURBSObject obj )
Remarks:
Adds the specified object pointer to the end of the table of object pointers.

Note: This method is ONLY used for adding an object to a NURBSSet that is not yet in the scene. To add an object to an existing scene use the global function AddNURBSObjects().
Parameters:
NURBSObject* obj

The pointer to the object to append.
Returns:
Returns the number of objects in the table prior to appending.
DllExport void RemoveObject ( int  index )
Remarks:
Removes the specified object pointer from the table.
Parameters:
int index

The zero based index of the object to remove.
DllExport void DeleteObjects ( )
Remarks:
Deletes all the objects that are in the table.

This method frees all the NURBSObjects in a NURBSSet. A developer using a NURBSSet must call this method to free all the memory when done.
DllExport NURBSObject* GetNURBSObject ( int  index )
Remarks:
Returns a pointer to the specified object in the table.
Parameters:
int index

The zero based index of the object to return.
DllExport NURBSObject* GetNURBSObject ( NURBSId  id )
Remarks:
Returns a pointer to the specified object in the table.
Parameters:
NURBSId id

The Id of the object to return.
DllExport TessApprox* GetProdTess ( NURBSTessType  type = kNTessSurface )
Remarks:
Returns a pointer to the TessApprox object for the production renderer for the specified tesselation operation.
Parameters:
NURBSTessType type=kNTessSurface

The type of tesselation. See NURBSTess Types.
DllExport TessApprox* GetViewTess ( NURBSTessType  type = kNTessSurface )
Remarks:
Returns a pointer to the TessApprox object for the viewport renderer for the specified tesselation operation.
Parameters:
NURBSTessType type=kNTessSurface

The type of tesselation. See NURBSTess Types.
DllExport void SetProdTess ( TessApprox tess,
NURBSTessType  type = kNTessSurface 
)
Remarks:
Sets the TessApprox object for the production renderer for the specified tesselation operation.
Parameters:
TessApprox& tess

The tesselation object.

NURBSTessType type=kNTessSurface

This parameter is available in release 3.0 and later only.

The type of tesselation. See NURBSTess Types.
DllExport void SetViewTess ( TessApprox tess,
NURBSTessType  type = kNTessSurface 
)
Remarks:
Sets the TessApprox object for the viewport renderer for the specified tesselation operation.
Parameters:
TessApprox& tess

The tesselation object.

NURBSTessType type=kNTessSurface

This parameter is available in release 3.0 and later only.

The type of tesselation. See NURBSTess Types.
DllExport void ClearViewTess ( NURBSTessType  type = kNTessSurface )
Remarks:
Clears (deletes) the specified tesselation object used for viewport rendering.
Parameters:
NURBSTessType type=kNTessSurface

The type of tesselation. See NURBSTess Types.
DllExport void ClearProdTess ( NURBSTessType  type = kNTessSurface )
Remarks:
Clears (deletes) the specified tesselation object used for production rendering.
Parameters:
NURBSTessType type=kNTessSurface

The type of tesselation. See NURBSTess Types.
DllExport float GetTessMerge ( )
Remarks:
Returns the tesselation merge value.
DllExport void SetTessMerge ( float  merge )
Remarks:
Sets the tesselation merge value.
Parameters:
float merge

The tessellation merge value. Controls the tessellation of surface sub-objects whose edges are joined or very nearly joined. When input to a modifier -- such as Mesh Select -- requires a mesh, and when NURBS surfaces are tessellated for production rendering, by default 3ds Max adjusts the tessellation of adjoining surfaces to match each other, in terms of the number of faces along the edges. The Merge parameter controls how this is done. If Merge is zero, adjoining faces are unchanged. Increasing the value of Merge increases the distance 3ds Max uses to calculate how edges should match, guaranteeing no gaps between the surfaces when they are rendered.
DllExport Object* GetMAXObject ( )
Remarks:
Returns a pointer to the instantiated object in the scene associated with this NURBSSet. This is NULL if there isn't one.
DllExport NURBSDisplay GetDisplaySettings ( )
Remarks:
Returns the display settings for this NURBSSet.
DllExport void SetDisplaySettings ( NURBSDisplay disp )
Remarks:
Sets the display settings used by this NURBSSet.
Parameters:
NURBSDisplay& disp

The settings to use.

Friends And Related Function Documentation

DllExport Object* CreateNURBSObject ( IObjParam ip,
NURBSSet nset,
Matrix3 mat 
) [friend]
DllExport int AddNURBSObjects ( Object MAXobj,
IObjParam ip,
NURBSSet nset 
) [friend]
DllExport BOOL GetNURBSSet ( Object object,
TimeValue  t,
NURBSSet nset,
BOOL  Relational 
) [friend]

Member Data Documentation

TessApprox* mpVTess [protected]
TessApprox* mpRTess [protected]
TessApprox* mpRTessDisp [protected]
TessApprox* mpVTessCurve [protected]
TessApprox* mpRTessCurve [protected]
float mTessMerge [protected]
Tab<NURBSObject*> mObjects [protected]
Object* mpObject [protected]
NURBSDisplay mDisplay [protected]

NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet
NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet NURBSSet