Class VDataDelta
See Also: Class Mesh, Class PerData, Class MeshDelta.
class VDataDelta
Description:
This class is available in release 3.0 and later only.
VDataDelta is a way for a MeshDelta to keep track of per-vertex information. Like vertex selection, this information is explicitly set after all topological changes performed by the MeshDelta, so any active vertex data channels are always set to the size outVNum() for the related MeshDelta.
An example of this being used is in Edit Mesh, where you can assign or modify vertex weights. All these changes and assignments are stored in the Edit Mesh's main MeshDelta.
Data Members:
public:
PerData *out;
This is where the output vertex data is kept, if the given vertex data channel has been activated.
Methods:
public:
Prototype:
VDataDelta();
Remarks:
Constructor. The data member out is set to NULL.
Prototype:
~VDataDelta();
Remarks:
Destructor. If out is allocated it is deleted.
Prototype:
void SetVNum(int nv, BOOL keep=FALSE);
Remarks:
Sets the size of the output vertex data to the value specified.
Parameters:
int nv
The number of elements to allocate.
BOOL keep=FALSE
If TRUE previous values are kept (copied to the new storage); otherwise they are discarded.
Prototype:
void Activate(int vnum, int vdID);
Remarks:
If the output vertex data has not been allocated this method allocates it with the specified number of elements.
Parameters:
int vnum
The number of elements to allocate.
int vdID
The channel to allocate. One of the following values:
VDATA_SELECT
VDATA_WEIGHT
Prototype:
void Set(int where, void *data, int num=1);
Remarks:
Sets the specified number of elements of vertex data at the location passed.
Parameters:
int where
The zero based index of the destination in the out array.
void *data
The source data.
int num=1
The number of elements to set.