NW4F G3d
Loading...
Searching...
No Matches
nw::g3d::SkeletalAnimBlender Class Reference

#include <g3d_SkeletalAnimObj.h>

Classes

class  Impl
class  InitArg
class  Sizer

Public Types

enum  BlendMode { BLEND_INTERPOLATE , BLEND_ADD }
enum  Alignment { BUFFER_ALIGNMENT = LL_CACHE_FETCH_SIZE }

Public Member Functions

 SkeletalAnimBlender ()
bool Init (const InitArg &arg, void *pBuffer, size_t bufferSize)
void ClearResult ()
void Blend (SkeletalAnimObj *pAnimObj, float weight)
void ApplyTo (SkeletonObj *pSkeletonObj) const
void * GetBufferPtr ()
void SetBoneCount (int count)
int GetBoneCount () const
int GetMaxBoneCount () const
void SetBlendMode (BlendMode mode)
BlendMode GetBlendMode () const
void EnableSlerp ()
void DisableSlerp ()
bool IsSlerpEnabled () const
BoneAnimBlendResultGetResultArray ()
const BoneAnimBlendResultGetResultArray () const
BoneAnimBlendResultGetResultArrayMutable () const
size_t CalcLCSize () const
size_t LCMount (void *pLC, size_t size, bool load)
void LCUnmount (bool store)
bool IsResultOnCache () const

Static Public Member Functions

static size_t CalcBufferSize (const InitArg &arg)

Protected Types

enum  Flag {
  BLEND_MASK = 0x1 , USE_SLERP = 0x1 << 1 , NORMALIZED = 0x1 << 2 , CACHE_RESULT = 0x1 << 3 ,
  INVALID_RESULT = 0x1 << 4 , MASK_RESULT = CACHE_RESULT | INVALID_RESULT
}

Protected Member Functions

template<typename ConvRot, BlendMode mode>
void ApplyToImpl (SkeletonObj *pSkeletonObj) const

Private Member Functions

 NW_G3D_DISALLOW_COPY_AND_ASSIGN (SkeletalAnimBlender)

Private Attributes

void * m_pResultBuffer
u16 m_MaxBone
u16 m_NumBone
bit32 m_Flag
void * m_pMemResultBuffer
void * m_pBufferPtr

Member Enumeration Documentation

◆ BlendMode

Enumerator
BLEND_INTERPOLATE 
BLEND_ADD 

◆ Alignment

Enumerator
BUFFER_ALIGNMENT 

◆ Flag

Enumerator
BLEND_MASK 
USE_SLERP 
NORMALIZED 
CACHE_RESULT 
INVALID_RESULT 
MASK_RESULT 

Constructor & Destructor Documentation

◆ SkeletalAnimBlender()

nw::g3d::SkeletalAnimBlender::SkeletalAnimBlender ( )
inline

Member Function Documentation

◆ Init()

bool nw::g3d::SkeletalAnimBlender::Init ( const InitArg & arg,
void * pBuffer,
size_t bufferSize )

◆ CalcBufferSize()

size_t nw::g3d::SkeletalAnimBlender::CalcBufferSize ( const InitArg & arg)
static

◆ ClearResult()

void nw::g3d::SkeletalAnimBlender::ClearResult ( )

◆ Blend()

void nw::g3d::SkeletalAnimBlender::Blend ( SkeletalAnimObj * pAnimObj,
float weight )

◆ ApplyTo()

void nw::g3d::SkeletalAnimBlender::ApplyTo ( SkeletonObj * pSkeletonObj) const

◆ GetBufferPtr()

void * nw::g3d::SkeletalAnimBlender::GetBufferPtr ( )
inline

◆ SetBoneCount()

void nw::g3d::SkeletalAnimBlender::SetBoneCount ( int count)
inline

◆ GetBoneCount()

int nw::g3d::SkeletalAnimBlender::GetBoneCount ( ) const
inline

◆ GetMaxBoneCount()

int nw::g3d::SkeletalAnimBlender::GetMaxBoneCount ( ) const
inline

◆ SetBlendMode()

void nw::g3d::SkeletalAnimBlender::SetBlendMode ( BlendMode mode)
inline

◆ GetBlendMode()

BlendMode nw::g3d::SkeletalAnimBlender::GetBlendMode ( ) const
inline

◆ EnableSlerp()

void nw::g3d::SkeletalAnimBlender::EnableSlerp ( )
inline

◆ DisableSlerp()

void nw::g3d::SkeletalAnimBlender::DisableSlerp ( )
inline

◆ IsSlerpEnabled()

bool nw::g3d::SkeletalAnimBlender::IsSlerpEnabled ( ) const
inline

◆ GetResultArray() [1/2]

BoneAnimBlendResult * nw::g3d::SkeletalAnimBlender::GetResultArray ( )
inline

◆ GetResultArray() [2/2]

const BoneAnimBlendResult * nw::g3d::SkeletalAnimBlender::GetResultArray ( ) const
inline

◆ GetResultArrayMutable()

BoneAnimBlendResult * nw::g3d::SkeletalAnimBlender::GetResultArrayMutable ( ) const
inline

◆ CalcLCSize()

size_t nw::g3d::SkeletalAnimBlender::CalcLCSize ( ) const
inline

◆ LCMount()

size_t nw::g3d::SkeletalAnimBlender::LCMount ( void * pLC,
size_t size,
bool load )

◆ LCUnmount()

void nw::g3d::SkeletalAnimBlender::LCUnmount ( bool store)

◆ IsResultOnCache()

bool nw::g3d::SkeletalAnimBlender::IsResultOnCache ( ) const
inline

◆ ApplyToImpl()

template<typename ConvRot, SkeletalAnimBlender::BlendMode mode>
void nw::g3d::SkeletalAnimBlender::ApplyToImpl ( SkeletonObj * pSkeletonObj) const
protected

◆ NW_G3D_DISALLOW_COPY_AND_ASSIGN()

nw::g3d::SkeletalAnimBlender::NW_G3D_DISALLOW_COPY_AND_ASSIGN ( SkeletalAnimBlender )
private

Member Data Documentation

◆ m_pResultBuffer

void* nw::g3d::SkeletalAnimBlender::m_pResultBuffer
private

◆ m_MaxBone

u16 nw::g3d::SkeletalAnimBlender::m_MaxBone
private

◆ m_NumBone

u16 nw::g3d::SkeletalAnimBlender::m_NumBone
private

◆ m_Flag

bit32 nw::g3d::SkeletalAnimBlender::m_Flag
mutableprivate

◆ m_pMemResultBuffer

void* nw::g3d::SkeletalAnimBlender::m_pMemResultBuffer
private

◆ m_pBufferPtr

void* nw::g3d::SkeletalAnimBlender::m_pBufferPtr
private