C++ API Reference
|
falloff context use in a falloff function to get/set information for weight computation. More...
#include <MFnFalloffData.h>
Public Member Functions | |
MFloatArray | getValues (const MBufferIdentifier &bufferId) const |
Get the weight for the given bufferId. More... | |
void | setValue (const MFloatArray &array, const MBufferIdentifier &bufferId) |
copy the value into the buffer addressed by bufferId More... | |
bool | isTopologyDirty () const |
Tells if the geometry topology targeted by this falloff has changed sinced last time it evaluated. More... | |
bool | isSync (int syncId, const MBufferIdentifier &bufferId) const |
isSync is used to quickly bail out of a fallout function, if it is in sync and additional requirement (no topology change) are met then we can return bufferId as Cached. More... | |
void | sync (int syncId, const MBufferIdentifier &bufferId) |
Synchronize the target buffer with a user supplied id. More... | |
MObject | getGeometry (bool originalGeometry=false) |
returns the working indexMapper. More... | |
MIndexMapper | getIndexMapper () const |
returns the working indexMapper. More... | |
~MFalloffContext () | |
MFalloffContext destructor. | |
falloff context use in a falloff function to get/set information for weight computation.
An MFalloffContext is provided to a MFalloffFunction::operator() that user override to create its own weight falloff.
MFloatArray getValues | ( | const MBufferIdentifier & | bufferId | ) | const |
Get the weight for the given bufferId.
[in] | bufferId | tells wich buffer to return. |
void setValue | ( | const MFloatArray & | array, |
const MBufferIdentifier & | bufferId | ||
) |
copy the value into the buffer addressed by bufferId
[in] | array | represent the array of weight to be copied into the buffer |
[in] | bufferId | tells wich buffer to copy the data on. |
bool isTopologyDirty | ( | ) | const |
Tells if the geometry topology targeted by this falloff has changed sinced last time it evaluated.
bool isSync | ( | int | syncId, |
const MBufferIdentifier & | bufferId | ||
) | const |
isSync is used to quickly bail out of a fallout function, if it is in sync and additional requirement (no topology change) are met then we can return bufferId as Cached.
void sync | ( | int | syncId, |
const MBufferIdentifier & | bufferId | ||
) |
Synchronize the target buffer with a user supplied id.
This enable user to check if buffer match the syncId stored on an attribute on the compute object that holdthe falloff data function. This allow to avoid useless computation when the falloff ask to recompute an already computed weight.
[in] | syncId | is provided by the implementor of the falloff function and it track the dirtyness of the buffer based on its input dirtyness. Basically every time a computation of the falloff is trigger this id should change since the weight buffer would potentially change. |
[in] | bufferId | which buffer to synchronized. |
MObject getGeometry | ( | bool | originalGeometry = false | ) |
returns the working indexMapper.
Falloff can be reused for different deformer. The context tells us the information that we need concerning the geometry that we are working on at the moment of the call.
MIndexMapper getIndexMapper | ( | ) | const |
returns the working indexMapper.
Falloff can be reused for different deformer. The context tells us the information that we need concerning the geometry that we are working on at the moment of the call.