Public Member Functions | Protected Member Functions | Protected Attributes | Friends

NURBSObject Class Reference

This reference page is linked to from the following overview topics: Object Plug-ins, Modeling, Primitive Pipeline Objects, The NURBS API, Creating and Retrieving 3ds Max NURBS Objects.


Search for all occurrences

Detailed Description

See also:
Class NURBSSurface, Class NURBSControlVertex, Class NURBSPoint, Class NURBSCurve, Class NURBSSet, NURBSObject Types.

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

This is the base class for many of the other classes in the NURBS API. It provides a common set of methods that each of them use. It has methods to get and set the name of the item, and methods to deal with error processing. To determine the type of object the derived class is use the method GetType().

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

MCHAR mName[NURBS_NAME_SIZE];

The name of the NURBS object. The maximum length of this name including the terminating NULL is specified using the following #define: #define NURBS_NAME_SIZE 80

NURBSType mType;

The type of NURBS object this is. See NURBSObject Types.

NURBSKind mKind;

The kind of NURBS object this is. See NURBSObject Kinds.

NURBSId mId;

This is the ID of the NURBS object used to specify the parent object in many of the dependent point, curves and surface classes. This ID is not persistant across sessions and should not be saved to a file. A NURBSId is defined as follows: typedef unsigned long NURBSId;

Object *mpObject;

When an object is instantiated in the 3ds Max scene this pointer is filled in. For example, if you use the function CreateNURBSObject() and pass a NURBSSet, this data member is filled in to point to the actual editable NURBS object in 3ds Max that this NURBSObject is a part of.

NURBSSet* mpNSet;

When an object is instantiated in the 3ds Max scene this pointer is filled in. This points to the NURBSSet this object is a contained within.

BOOL mSelected;

TRUE if the object is selected; otherwise FALSE.
protected:

#include <surf_api.h>

Inheritance diagram for NURBSObject:
Inheritance graph
[legend]

List of all members.

Public Member Functions

DllExport  NURBSObject (void)
virtual DllExport  ~NURBSObject (void)
DllExport NURBSObject operator= (const NURBSObject &pt)
DllExport void  SetName (MCHAR *name)
DllExport MCHAR *  GetName (void)
DllExport NURBSType  GetType ()
DllExport NURBSKind  GetKind ()
DllExport NURBSId  GetId ()
DllExport void  SetId (NURBSId id)
DllExport void  SetNSet (NURBSSet *nset)
DllExport void  SetObject (Object *object)
DllExport Object GetMAXObject ()
DllExport NURBSSet GetNSet ()
DllExport int  GetIndex ()
DllExport BOOL  IsSelected ()
DllExport void  SetSelected (BOOL set)

Protected Member Functions

DllExport void  Clean (NURBSIdTab ids)

Protected Attributes

MCHAR  mName [NURBS_NAME_SIZE]
NURBSType  mType
NURBSKind  mKind
NURBSId  mId
Object mpObject
NURBSSet mpNSet
BOOL  mSelected

Friends

class  NURBSSet

Constructor & Destructor Documentation

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

mName[0] = '/0';

mId = 0;

mpObject = NULL;

mpNSet = NULL;

mSelected = FALSE;
virtual DllExport ~NURBSObject ( void  ) [virtual]
Remarks:
Destructor.

Member Function Documentation

DllExport void Clean ( NURBSIdTab  ids ) [protected]
Remarks:
Sets the mId to 0 and mpObject pointer to NULL. This effectively breaks the relation between this NURBSObject and a NURBSSet.
Parameters:
NURBSIdTab ids

This parameter is not used.

Reimplemented in NURBSPointConstPoint, NURBSCurveConstPoint, NURBSCurveCurveIntersectionPoint, NURBSSurfConstPoint, and NURBSCurveSurfaceIntersectionPoint.

DllExport NURBSObject& operator= ( const NURBSObject pt )
Remarks:
Assignment operator.
Parameters:
const NURBSObject& pt

The NURBSObject to assign.
DllExport void SetName ( MCHAR *  name )
Remarks:
Sets the name of the item to the specified string.
Parameters:
MCHAR *name

The name to set.
DllExport MCHAR* GetName ( void  )
Remarks:
Returns a pointer to the name of the item.
DllExport NURBSType GetType ( )
Remarks:
Returns the specific type of object this is. See NURBSObject Types
DllExport NURBSKind GetKind ( )
Remarks:
Returns the specific kind of object this is. See NURBSObject Kinds.
DllExport NURBSId GetId ( )
Remarks:
Returns the NURBSId of this NURBSObject. This ID is not persistant across sessions and should not be saved to a file.
DllExport void SetId ( NURBSId  id )
Remarks:
Sets the NURBSId of this NURBSObject.
Parameters:
NURBSId id

The ID to set.
DllExport void SetNSet ( NURBSSet nset )
Remarks:
Sets the pointer to the NURBSSet maintained by the object.
Parameters:
NURBSSet *nset

The pointer to set.
DllExport void SetObject ( Object object )
Remarks:
Sets the pointer to the 3ds Max editable NURBS object maintained by this object.
Parameters:
Object *object

The pointer to set.
DllExport Object* GetMAXObject ( )
Remarks:
Returns a pointer to the Object maintained by this class.
DllExport NURBSSet* GetNSet ( )
Remarks:
Returns a pointer to the NURBSSet maintained by this class.
DllExport int GetIndex ( )
Remarks:
Returns the index in the NURBSSet of this object or -1 if there isn't an associated NURBSSet.
DllExport BOOL IsSelected ( )
Remarks:
Returns TRUE if the object is selected; otherwise FALSE.
DllExport void SetSelected ( BOOL  set )
Remarks:
Sets the object to selected or not.
Parameters:
BOOL set

TRUE to select the object; FALSE to de-select it.
Operators:

Friends And Related Function Documentation

friend class NURBSSet [friend]

Member Data Documentation

MCHAR mName[NURBS_NAME_SIZE] [protected]
NURBSType mType [protected]
NURBSKind mKind [protected]
NURBSId mId [protected]
Object* mpObject [protected]
NURBSSet* mpNSet [protected]
BOOL mSelected [protected]

NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject
NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject NURBSObject