#include <DualQuatSkinDeformer.h>
Inherits EMotionFX::MeshDeformer.
Classes | |
struct | BoneInfo |
Public Types | |
enum | { TYPE_ID = 0x00000003 } |
enum | { SUBTYPE_ID = 0x00000002 } |
Public Member Functions | |
void | Update (ActorInstance *actorInstance, Node *node, float timeDelta) override |
void | Reinitialize (Actor *actor, Node *node, size_t lodLevel, uint16 highestJointIndex) override |
MeshDeformer * | Clone (Mesh *mesh) const override |
uint32 | GetType () const override |
uint32 | GetSubType () const override |
MCORE_INLINE size_t | GetNumLocalBones () const |
MCORE_INLINE size_t | GetLocalBone (size_t index) const |
MCORE_INLINE void | ReserveLocalBones (size_t numBones) |
Public Member Functions inherited from EMotionFX::MeshDeformer | |
virtual void | Update (ActorInstance *actorInstance, Node *node, float timeDelta)=0 |
virtual void | Reinitialize (Actor *actor, Node *node, size_t lodLevel, uint16 highestJointIndex) |
virtual MeshDeformer * | Clone (Mesh *mesh) const =0 |
virtual uint32 | GetType () const =0 |
virtual uint32 | GetSubType () const =0 |
bool | GetIsEnabled () const |
void | SetIsEnabled (bool enabled) |
Public Member Functions inherited from EMotionFX::BaseObject | |
BaseObject () | |
virtual | ~BaseObject () |
Public Member Functions inherited from MCore::MemoryObject | |
MemoryObject () | |
virtual | ~MemoryObject () |
void | IncreaseReferenceCount () |
void | DecreaseReferenceCount () |
void | Destroy () |
uint32 | GetReferenceCount () const |
Static Public Member Functions | |
static DualQuatSkinDeformer * | Create (Mesh *mesh) |
Protected Member Functions | |
DualQuatSkinDeformer (Mesh *mesh) | |
virtual | ~DualQuatSkinDeformer () |
Protected Member Functions inherited from EMotionFX::MeshDeformer | |
MeshDeformer (Mesh *mesh) | |
virtual | ~MeshDeformer () |
Protected Member Functions inherited from EMotionFX::BaseObject | |
void | Delete () override |
virtual void | Delete () |
Static Protected Member Functions | |
static void | SkinRange (Mesh *mesh, AZ::u32 startVertex, AZ::u32 endVertex, const AZStd::vector< BoneInfo > &boneInfos) |
Protected Attributes | |
AZStd::vector< BoneInfo > | m_bones |
AZ::TaskGraph | m_taskGraph { "DualQuatSkinDeformer" } |
bool | m_useTaskGraph = false |
Protected Attributes inherited from EMotionFX::MeshDeformer | |
Mesh * | m_mesh |
bool | m_isEnabled |
Static Protected Attributes | |
static constexpr AZ::u32 | s_numVerticesPerBatch = 10000 |
Number of vertices per batch/job used for multi-threaded software skinning. | |
The soft skinning mesh deformer 'base' class. The calculations will be done on the CPU, however there will also be specialized versions of this class, so which are inherited from this class. These other classes will be a special soft skinning deformer for the Intel Pentium 4 and one for the AMD Athlon. However, this class will work on all CPUs, but will be slower as the natively optimized ones.
|
protected |
Default constructor.
mesh | A pointer to the mesh to deform. |
|
protectedvirtual |
Destructor.
|
overridevirtual |
Creates an exact clone (copy) of this deformer, and returns a pointer to it.
mesh | The mesh to apply the deformer on. |
Implements EMotionFX::MeshDeformer.
|
static |
Creation method.
mesh | A pointer to the mesh to deform. |
|
inline |
Get the node number of a given local bone.
index | The local bone number, which must be in range of [0..GetNumLocalBones()-1]. |
|
inline |
Get the number of bones used by this deformer. This is the number of different bones that the skinning information of the mesh where this deformer works on uses.
|
overridevirtual |
Returns the unique subtype ID of this deformer. A subtype identifies the specialization type of the given deformer. A cplus plus version of a deformer could have a sub type of 0, while the SSE assembly optimized version would have a sub type of 1 for example.
Implements EMotionFX::MeshDeformer.
|
overridevirtual |
Returns the unique type ID of the deformer.
Implements EMotionFX::MeshDeformer.
|
overridevirtual |
Reinitialize the mesh deformer. Updates the the array of bone information used for precalculation.
actor | The actor to to initialize the deformer for. |
node | The node where the mesh belongs to during this initialization. |
lodLevel | The LOD level of the mesh the mesh deformer works on. |
Reimplemented from EMotionFX::MeshDeformer.
|
inline |
Pre-allocate space for a given number of local bones. This does not alter the value returned by GetNumLocalBones().
numBones | The number of bones to pre-allocate space for. |
|
staticprotected |
Skin a part of the mesh.
mesh | The mesh to be skinned. |
startVertex | The start vertex index to start skinning. |
endVertex | The end vertex index for the range to be skinned. |
boneInfos | The pre-calculated skinning matrices shared across the skinning process. |
|
overridevirtual |
Update the mesh deformer.
actorInstance | The actor instance to use for the update. So the actor where the mesh belongs to during this update. |
node | The node to use for the update, so the node where the mesh belongs to during this update. |
timeDelta | The time (in seconds) passed since the last call. |
Implements EMotionFX::MeshDeformer.
|
protected |
The array of bone information used for pre-calculation.