NURBSObject Class Reference

#include <surf_api.h>

Class Description

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

Description:
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:
+ Inheritance diagram for NURBSObject:

Public Member Functions

DllExport NURBSObject (void)
 
virtual DllExport ~NURBSObject (void)
 
DllExport NURBSObjectoperator= (const NURBSObject &pt)
 
DllExport void SetName (const MCHAR *name)
 
DllExport const MCHARGetName (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 ObjectGetMAXObject ()
 
DllExport NURBSSetGetNSet ()
 
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
 
ObjectmpObject
 
NURBSSetmpNSet
 
BOOL mSelected
 

Friends

class NURBSSet
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 

Constructor & Destructor Documentation

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.

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

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

The name to set.
DllExport const 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