3ds Max C++ API Reference
ShapePSel Class Reference

#include <shpsels.h>

+ Inheritance diagram for ShapePSel:

Public Member Functions

CoreExport ShapePSel ()
 
CoreExport ShapePSel (ShapePSel &from)
 
CoreExport ~ShapePSel ()
 
CoreExport ShapePSeloperator= (ShapePSel &from)
 
CoreExport BOOL operator== (ShapePSel &s)
 
CoreExport void Insert (int where)
 
CoreExport void Delete (int where)
 
CoreExport void SetSize (ShapePSel &selset, BOOL save=FALSE)
 
CoreExport void SetSize (BezierShape &shape, BOOL save=FALSE)
 
CoreExport void SetSize (PolyShape &shape, BOOL save=FALSE)
 
CoreExport void Set (int index)
 
CoreExport void Set (int index, int value)
 
CoreExport void Clear (int index)
 
CoreExport int operator[] (int index) const
 
CoreExport void ClearAll ()
 
CoreExport void SetAll ()
 
CoreExport void Toggle ()
 
CoreExport void Empty ()
 
CoreExport BOOL IsCompatible (ShapePSel &selset)
 
CoreExport BOOL IsCompatible (BezierShape &shape)
 
CoreExport BOOL IsCompatible (PolyShape &shape)
 
CoreExport IOResult Save (ISave *isave)
 
CoreExport IOResult Load (ILoad *iload)
 
CoreExport bool Delete (const unsigned int *pIndices, unsigned int n)
 Delete multiple entries at once. More...
 

Public Attributes

int polys
 
BitArray sel
 

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...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
Class BitArray, Class PolyShape.

Description:
This class stores and provides access to shape polygon (spline) selection data. All methods of this class are implemented by the system.
Data Members:
int polys;

The number of splines in the shape.

BitArray sel;

One bit for each spline in the shape.

Constructor & Destructor Documentation

◆ ShapePSel() [1/2]

Remarks
Constructor. Initialize the class members.

◆ ShapePSel() [2/2]

◆ ~ShapePSel()

Remarks
Destructor.

Member Function Documentation

◆ operator=()

CoreExport ShapePSel& operator= ( ShapePSel from)
Remarks
Assignment operator.

◆ operator==()

CoreExport BOOL operator== ( ShapePSel s)

◆ Insert()

CoreExport void Insert ( int  where)
Remarks
Resizes the BitArray sel to include a new bit at the specified location.
Parameters:
int where

The location for the new bit in the BitArray.

◆ Delete() [1/2]

CoreExport void Delete ( int  where)
Remarks
Deletes the specified bit from the BitArray.
Parameters:
int where

Indicates which bit to delete.

◆ SetSize() [1/3]

CoreExport void SetSize ( ShapePSel selset,
BOOL  save = FALSE 
)

◆ SetSize() [2/3]

CoreExport void SetSize ( BezierShape shape,
BOOL  save = FALSE 
)
Remarks
Sets the number of splines and resizes the BitArray based on the shape passed.
Parameters:
BezierShape& shape

The shape whose splines determine the sizes set.

BOOL save=FALSE

TRUE to keep the previous BitArray contents. FALSE to discard it.

◆ SetSize() [3/3]

CoreExport void SetSize ( PolyShape shape,
BOOL  save = FALSE 
)
Remarks
Sets the number of splines and resizes the BitArray based on the shape passed.
Parameters:
PolyShape& shape

The shape whose lines determine the sizes set.

BOOL save=FALSE

TRUE to keep the previous BitArray contents. FALSE to discard it.

◆ Set() [1/2]

CoreExport void Set ( int  index)
Remarks
Sets the bit specified by the index to 1.
Parameters:
int index

The bit to set.

◆ Set() [2/2]

CoreExport void Set ( int  index,
int  value 
)
Remarks
Sets the bit specified by the index to the value passed.
Parameters:
int index

The bit to set or clear.

int value

The value to set, either 0 or 1.

◆ Clear()

CoreExport void Clear ( int  index)
Remarks
Clears the bit specified by the index to 1.
Parameters:
int index

The bit to clear.

◆ operator[]()

CoreExport int operator[] ( int  index) const
Remarks
Array access operator.

◆ ClearAll()

CoreExport void ClearAll ( )
Remarks
Clears all the bits in the array (sets them to 0).

◆ SetAll()

CoreExport void SetAll ( )

◆ Toggle()

CoreExport void Toggle ( )

◆ Empty()

Remarks
Sets the size of sel to 0.

◆ IsCompatible() [1/3]

CoreExport BOOL IsCompatible ( ShapePSel selset)

◆ IsCompatible() [2/3]

CoreExport BOOL IsCompatible ( BezierShape shape)

◆ IsCompatible() [3/3]

CoreExport BOOL IsCompatible ( PolyShape shape)

◆ Save()

CoreExport IOResult Save ( ISave isave)
Remarks
Saves the BitArray to disk.

◆ Load()

CoreExport IOResult Load ( ILoad iload)
Remarks
Loads the BitArray from disk.
Operators:

◆ Delete() [2/2]

CoreExport bool Delete ( const unsigned int pIndices,
unsigned int  n 
)

Delete multiple entries at once.

Deleting multiple entries at once is faster than deleting one by one by calling Delete(), because the internal bookkeeping only needs to be done once.

Parameters
[in]pIndicesPointer to an array of indices to delete. Indices should be unique, and sorted in ascending order.
[in]nNumber of entries in the indices array.
Returns
false if any of the vertex indices are invalid.
See also
ShapePSel::Delete

Member Data Documentation

◆ polys

int polys

◆ sel

BitArray sel