Public Member Functions | Public Attributes

VDataDelta Class Reference

Search for all occurrences

Detailed Description

See also:
Class Mesh, Class PerData, Class MeshDelta.

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:
PerData *out;

This is where the output vertex data is kept, if the given vertex data channel has been activated.

#include <meshdelta.h>

Inheritance diagram for VDataDelta:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  VDataDelta ()
DllExport  ~VDataDelta ()
void  SetVNum (int nv, BOOL keep=FALSE)
DllExport void  Activate (int vnum, int vdID)
DllExport void  Set (int where, void *data, int num=1)

Public Attributes

PerData out

Constructor & Destructor Documentation

VDataDelta ( ) [inline]
Remarks:
Constructor. The data member out is set to NULL.
{ out=NULL; }
DllExport ~VDataDelta ( )
Remarks:
Destructor. If out is allocated it is deleted.

Member Function Documentation

void SetVNum ( int  nv,
BOOL  keep = FALSE 
) [inline]
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.
{ if (out) out->SetCount(nv,keep); }
DllExport 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
DllExport 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.

Member Data Documentation


VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta
VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta VDataDelta