3ds Max C++ API Reference
Loading...
Searching...
No Matches
GenericNamedSelSetList Class Reference

#include <namesel.h>

+ Inheritance diagram for GenericNamedSelSetList:

Public Member Functions

CoreExport ~GenericNamedSelSetList ()
 
CoreExport BitArrayGetSet (MSTR &name)
 
CoreExport BitArrayGetSet (DWORD id)
 
CoreExport BitArrayGetSetByIndex (int index)
 
int Count ()
 
CoreExport void AppendSet (const BitArray &nset, DWORD id=0, const MSTR &name=MSTR(_M("")))
 
CoreExport void InsertSet (int pos, const BitArray &nset, DWORD id=0, const MSTR &name=MSTR(_M("")))
 
CoreExport int InsertSet (const BitArray &nset, DWORD id=0, const MSTR &name=MSTR(_M("")))
 
CoreExport BOOL RemoveSet (MSTR &name)
 
CoreExport BOOL RemoveSet (DWORD id)
 
CoreExport IOResult Load (ILoad *iload)
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport void SetSize (int size)
 
CoreExport GenericNamedSelSetListoperator= (GenericNamedSelSetList &from)
 
CoreExport void DeleteSetElements (BitArray &set, int m=1)
 
CoreExport void DeleteSet (int i)
 
CoreExport BOOL RenameSet (MSTR &oldName, MSTR &newName)
 
CoreExport void Alphabetize ()
 
BitArrayoperator[] (int i)
 

Public Attributes

Tab< MSTR * > names
 
Tab< BitArray * > sets
 
Tab< DWORD > ids
 

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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
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.
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator.
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator.
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary.
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary.
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc.
 

Detailed Description

See also
Class BitArray.
Description:
This class is a tool for manipulating lists of named selection sets. This class is used by modifiers such as the edit mesh, mesh select, spline select and edit patch.

All methods of this class are implemented by the system.
Data Members:
Tab<MSTR*> names;

A table of names, one for each selection set.

Tab<BitArray*> sets;

The bit array pointers for the selection sets.

Tab<DWORD> ids;

A table of Ids, one for each selection set.

Constructor & Destructor Documentation

◆ ~GenericNamedSelSetList()

Remarks
Destructor. The names and sets are deleted.

Member Function Documentation

◆ GetSet() [1/2]

CoreExport BitArray * GetSet ( MSTR name)
Remarks
Returns a pointer to the bit array corresponding to the specified name. If the set is not found NULL is returned.
Parameters:
MSTR name

The name of the selection set to retrieve.

◆ GetSet() [2/2]

CoreExport BitArray * GetSet ( DWORD  id)
Remarks
Returns a poniter to the bit array corresponding to the specified ID. If the set is not found NULL is returned.
Parameters:
DWORD id

The id of the selection set to retrieve.

◆ GetSetByIndex()

CoreExport BitArray * GetSetByIndex ( int  index)
Remarks
Returns a pointer to the bit array corresponding to the specified index in the list. If the set is not found NULL is returned.
Parameters:
int index

The zero based index of the selection set to retrieve (>= 0 and < sets.Count()).

◆ Count()

int Count ( )
inline
Remarks
Returns the number of selection sets.
69{return sets.Count();}
Tab< BitArray * > sets
Definition: namesel.h:44
int Count() const
Retrieves the number of items in the Tab.
Definition: tab.h:219

◆ AppendSet()

CoreExport void AppendSet ( const BitArray nset,
DWORD  id = 0,
const MSTR name = MSTR(_M("")) 
)
Remarks
Appends the named selection set data to the list of sets maintained by this class.
Parameters:
BitArray &nset

The selection set data to append.

DWORD id=0

An ID for the selection set.

MSTR name

The name for the selection set.

◆ InsertSet() [1/2]

CoreExport void InsertSet ( int  pos,
const BitArray nset,
DWORD  id = 0,
const MSTR name = MSTR(_M("")) 
)
Remarks
Inserts the named selection set data into the list of sets maintained by this class.
Parameters:
int pos

The position in the list where this named selection set should be inserted. If pos >= Count(), AppendSet() is automatically used instead.

BitArray &nset

The selection set data to insert.

DWORD id=0

An ID for the selection set.

MSTR &name=MSTR("")

The name for the selection set.

◆ InsertSet() [2/2]

CoreExport int InsertSet ( const BitArray nset,
DWORD  id = 0,
const MSTR name = MSTR(_M("")) 
)
Remarks
This method is similar to InsertSet() above, however instead of accepting an explicit location this method inserts the new set alphabetically in the list. (Of course, this requires an alphabetized list to work properly, although there's no problem if the list is not alphabetized.)
Parameters:
BitArray &nset

The selection set data to insert.

DWORD id=0

An ID for the selection set.

MSTR &name=MSTR("")

The name for the selection set.
Returns
The position where the set was inserted.

◆ RemoveSet() [1/2]

CoreExport BOOL RemoveSet ( MSTR name)
Remarks
Removes the selection set whose name is passed.
Parameters:
MSTR name

The name of the selection set to remove.
Returns
TRUE on success; otherwise FALSE.

◆ RemoveSet() [2/2]

CoreExport BOOL RemoveSet ( DWORD  id)
Remarks
Removes the selection set whose ID is passed.
Parameters:
DWORD id

The id of the selection set to retrieve.
Returns
TRUE on success; otherwise FALSE.

◆ Load()

CoreExport IOResult Load ( ILoad iload)
Remarks
This method is used internally to load the selection sets from disk.

◆ Save()

CoreExport IOResult Save ( ISave isave)
Remarks
This method is used internally to save the selection sets to disk.

◆ SetSize()

CoreExport void SetSize ( int  size)
Remarks
Resizes the selectin set bit arrays to the specified number of bits. The old selection set data is preserved.
Parameters:
int size

The new size for the bit arrays in bits.

◆ operator=()

Remarks
Assignment operator. This list of sets is emptied and then copied from the list passed.
Parameters:
GenericNamedSelSetList& from

The list of selection sets to copy.

◆ DeleteSetElements()

CoreExport void DeleteSetElements ( BitArray set,
int  m = 1 
)
Remarks
This method is not currently used. What it does however, is go through all of the named selection sets and deletes array elements according to which bits are set in the given bit array. It could be used to keep the named selection set bit arrays in line with the vertex array (for example).

◆ DeleteSet()

CoreExport void DeleteSet ( int  i)
Remarks
Deletes the named selection set whose index is passed.
Parameters:
int i

The zero based index of the set to delete (>=0 and < sets.Count()).

◆ RenameSet()

CoreExport BOOL RenameSet ( MSTR oldName,
MSTR newName 
)
Remarks
This locates the named selection set oldName and renames it to newName.
Parameters:
MSTR &oldName

The old name of the set.

MSTR &newName

The new name for the set.
Returns
TRUE if the operation succeeded; otherwise FALSE. It will only fail if the oldName set is not present.

◆ Alphabetize()

CoreExport void Alphabetize ( )
Remarks
Alphabetizes the list of names.

◆ operator[]()

BitArray & operator[] ( int  i)
inline
Remarks
Returns a reference to the 'i-th' selection set.
Parameters:
int i

The zero based index of the selection set to return.
164{return *sets[i];}

Member Data Documentation

◆ names

Tab<MSTR*> names

◆ sets

Tab<BitArray*> sets

◆ ids

Tab<DWORD> ids