Class ShapePSel

3DS Max Plug-In SDK

Class ShapePSel

See Also: Class BitArray, Class PolyShape.

class ShapePSel

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:

public:

int polys;

The number of splines in the shape.

BitArray sel;

One bit for each spline in the shape.

Methods:

Prototype:

ShapePSel();

Remarks:

Constructor. Initialize the class members.

Prototype:

~ShapePSel();

Remarks:

Destructor.

Prototype:

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.

Prototype:

void Delete(int where);

Remarks:

Deletes the specified bit from the BitArray.

Parameters:

int where

Indicates which bit to delete.

Prototype:

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.

Prototype:

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.

Prototype:

void Set(int index);

Remarks:

Sets the bit specified by the index to 1.

Parameters:

int index

The bit to set.

Prototype:

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.

Prototype:

void Clear(int index);

Remarks:

Clears the bit specified by the index to 1.

Parameters:

int index

The bit to clear.

Prototype:

void ClearAll();

Remarks:

Clears all the bits in the array (sets them to 0).

Prototype:

void Empty();

Remarks:

Sets the size of sel to 0.

Prototype:

IOResult Save(ISave* isave);

Remarks:

Saves the BitArray to disk.

Prototype:

IOResult Load(ILoad* iload);

Remarks:

Loads the BitArray from disk.

Operators:

Prototype:

ShapePSel& operator=(ShapePSel& from);

Remarks:

Assignment operator.

Prototype:

int operator[](int index) const;

Remarks:

Array access operator.