Class IMeshSelectData

3DS Max Plug-In SDK

Class IMeshSelectData

See Also: Class ModContext, Class BitArray, Class IMeshSelect, Class Interface, Class GenericNamedSelSetList.

class IMeshSelectData

Description:

This class is available in release 2.0 and later only.

When a developer gets the LocalModData from the ModContext of the Mesh Select Modifier or Edit Mesh Modifier, they may cast it to this class and use these methods. They may be used to get/set the vert/face/edge selection state of the modifier. This class also provides access to the named sub-object selection sets.

To get a pointer to this interface given a pointer to a modifier use the following macro (defined in ANIMTBL.H ). Using this macro, given any Animatable, it is easy to ask for the interface.

#define GetMeshSelectDataInterface(anim) ((IMeshSelectData*)anim->GetInterface(I_MESHSELECTDATA))

A plug-in developer may use this macro as follows:

IMeshSelectData *imsd = GetMeshSelectDataInterface(anim);

This return value will either be NULL or a pointer to a valid Mesh Select Data interface.

Methods:

Prototype:

virtual BitArray GetVertSel()=0;

Remarks:

Returns a BitArray that reflects the current vertex selection. There is one bit for each vertex. Bits that are 1 indicate the vertex is selected.

Prototype:

virtual BitArray GetFaceSel()=0;

Remarks:

Returns a BitArray that reflects the current face selection. There is one bit for each face. Bits that are 1 indicate the face is selected.

Prototype:

virtual BitArray GetEdgeSel()=0;

Remarks:

Returns a BitArray that reflects the current edge selection. There is one bit for each edge. Bits that are 1 indicate the edge is selected.

Prototype:

virtual void SetVertSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;

Remarks:

Sets the vertex selection of the modifier.

Parameters:

BitArray &set

There is one bit for each vertex. Bits that are 1 indicate the vertex is selected.

IMeshSelect *imod

This parameter is available in release 3.0 and later only.

Points to the IMeshSelect instance (generally this is a modifier).

TimeValue t

This parameter is available in release 3.0 and later only.

The current time at which the call is made.

Prototype:

virtual void SetFaceSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;

Remarks:

Sets the face selection of the modifier.

Parameters:

BitArray &set

There is one bit for each face. Bits that are 1 indicate the face is selected.

IMeshSelect *imod

This parameter is available in release 3.0 and later only.

Points to the IMeshSelect instance (generally this is a modifier).

TimeValue t

This parameter is available in release 3.0 and later only.

The current time at which the call is made.

Prototype:

virtual void SetEdgeSel(BitArray &set, IMeshSelect *imod, TimeValue t)=0;

Remarks:

Sets the edge selection of the modifier.

Parameters:

BitArray &set

There is one bit for each edge. Bits that are 1 indicate the edge is selected.

IMeshSelect *imod

This parameter is available in release 3.0 and later only.

Points to the IMeshSelect instance (generally this is a modifier).

TimeValue t

This parameter is available in release 3.0 and later only.

The current time at which the call is made.

Prototype:

virtual GenericNamedSelSetList &GetNamedVertSelList()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns a reference to an instance of GenericNamedSelSetList used for storing vertex level named selection sets. This class provides access to and the ability to manipulate a list of named selection sets.

Prototype:

virtual GenericNamedSelSetList &GetNamedEdgeSelList()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns a reference to an instance of GenericNamedSelSetList used for storing edge level named selection sets. This class provides access to and the ability to manipulate a list of named selection sets.

Prototype:

virtual GenericNamedSelSetList &GetNamedFaceSelList()=0;

Remarks:

This method is available in release 3.0 and later only.

Returns a reference to an instance of GenericNamedSelSetList used for storing face level named selection sets. This class provides access to and the ability to manipulate a list of named selection sets.

Prototype:

virtual void GetWeightedVertSel(int nv, float *sel) {};

Remarks:

This method is available in release 3.0 and later only.

Retrieves the weighted vertex selections data (Soft Selection data).

Parameters:

int nv

The number of vertices.

float *sel

An array of floats to store the results.

Default Implementation:

{}

Prototype:

virtual void SetWeightedVertSel(int nv, float *sel, IMeshSelect *imod, TimeValue t);

Remarks:

This method is available in release 3.0 and later only.

Sets the weighted vertex selection data (Soft Selection data) to the values passed.

Parameters:

int nv

The number of vertices.

float *sel

An array of floats with the data.

IMeshSelect *imod

Points to the IMeshSelect object.

TimeValue t

The time at which to set the data.

Default Implementation:

{}