OpenBarnyard
 
Loading...
Searching...
No Matches
TKeyframeLibraryInstance Class Reference

#include <TAnimation.h>

Public Member Functions

 TKeyframeLibraryInstance ()
 
TKeyframeLibraryCreate (TKeyframeLibrary *a_pLibrary)
 
TKeyframeLibraryCreateEx (TKeyframeLibrary *a_pLibrary, TINT a_iTKeyCount, TINT a_iQKeyCount, TINT a_iSKeyCount, TINT a_iTBaseIndex, TINT a_iQBaseIndex, TINT a_iSBaseIndex)
 
void Destroy ()
 
TAnimVectorGetT (TINT a_iIndex) const
 
TAnimQuaternionGetQ (TINT a_iIndex) const
 
TAnimScale GetS (TINT a_iIndex) const
 
void SetLibrary (TKeyframeLibrary *a_pLibrary)
 
void SetTCount (TINT a_iTCount)
 
void SetQCount (TINT a_iQCount)
 
void SetSCount (TINT a_iSCount)
 
TKeyframeLibraryGetLibrary () const
 
TINT GetTCount () const
 
TINT GetQCount () const
 
TINT GetSCount () const
 

Detailed Description

Definition at line 154 of file TAnimation.h.

Constructor & Destructor Documentation

◆ TKeyframeLibraryInstance()

TKeyframeLibraryInstance::TKeyframeLibraryInstance ( )

Definition at line 12 of file TKeyframeLibraryInstance.cpp.

13{
14 m_pLibrary = TNULL;
15 m_iTBaseIndex = 0;
16 m_iQBaseIndex = 0;
17 m_iSBaseIndex = 0;
18 m_iTKeyCount = 0;
19 m_iQKeyCount = 0;
20 m_iSKeyCount = 0;
21 m_pTranslations = TNULL;
22 m_pQuaternions = TNULL;
23 m_pScales = TNULL;
24}
#define TNULL
Definition Typedefs.h:23

Member Function Documentation

◆ Create()

TKeyframeLibrary * TKeyframeLibraryInstance::Create ( TKeyframeLibrary * a_pLibrary)

Definition at line 26 of file TKeyframeLibraryInstance.cpp.

27{
28 return CreateEx( a_pLibrary, a_pLibrary->m_iNumTranslations, a_pLibrary->m_iNumQuaternions, a_pLibrary->m_iNumScales, 0, 0, 0 );
29}
TKeyframeLibrary * CreateEx(TKeyframeLibrary *a_pLibrary, TINT a_iTKeyCount, TINT a_iQKeyCount, TINT a_iSKeyCount, TINT a_iTBaseIndex, TINT a_iQBaseIndex, TINT a_iSBaseIndex)

◆ CreateEx()

TKeyframeLibrary * TKeyframeLibraryInstance::CreateEx ( TKeyframeLibrary * a_pLibrary,
TINT a_iTKeyCount,
TINT a_iQKeyCount,
TINT a_iSKeyCount,
TINT a_iTBaseIndex,
TINT a_iQBaseIndex,
TINT a_iSBaseIndex )

Definition at line 32 of file TKeyframeLibraryInstance.cpp.

33{
34 TKeyframeLibrary* pOldLibrary = m_pLibrary;
35
36 Destroy();
37 m_pLibrary = a_pLibrary;
38
39 if ( a_pLibrary != TNULL )
40 {
41 a_pLibrary->IncreaseRefCount();
42
43 m_iTKeyCount = a_iTKeyCount;
44 m_iQKeyCount = a_iQKeyCount;
45 m_iTBaseIndex = a_iTBaseIndex;
46 m_iQBaseIndex = a_iQBaseIndex;
47 m_iSBaseIndex = a_iSBaseIndex;
48 m_iSKeyCount = a_iSKeyCount;
49 m_pTranslations = a_pLibrary->m_pTranslations + a_iTBaseIndex;
50 m_pQuaternions = a_pLibrary->m_pQuaternions + a_iQBaseIndex;
51 m_pScales = a_pLibrary->m_pScales + a_iSBaseIndex;
52 }
53
54 return pOldLibrary;
55}

◆ Destroy()

void TKeyframeLibraryInstance::Destroy ( )

Definition at line 58 of file TKeyframeLibraryInstance.cpp.

59{
60 if ( m_pLibrary != TNULL )
61 {
62 m_pLibrary->DecreaseRefCount();
63 m_pLibrary = TNULL;
64 }
65}

◆ GetLibrary()

TKeyframeLibrary * TKeyframeLibraryInstance::GetLibrary ( ) const
inline

Definition at line 187 of file TAnimation.h.

187{ return m_pLibrary; }

◆ GetQ()

TAnimQuaternion * TKeyframeLibraryInstance::GetQ ( TINT a_iIndex) const
inline

Definition at line 170 of file TAnimation.h.

171 {
172 TASSERT( a_iIndex < m_iQKeyCount );
173 return &m_pQuaternions[ a_iIndex ];
174 }
#define TASSERT(X,...)
Definition Defines.h:138

◆ GetQCount()

TINT TKeyframeLibraryInstance::GetQCount ( ) const
inline

Definition at line 189 of file TAnimation.h.

189{ return m_iQKeyCount; }

◆ GetS()

TAnimScale TKeyframeLibraryInstance::GetS ( TINT a_iIndex) const
inline

Definition at line 176 of file TAnimation.h.

177 {
178 TASSERT( a_iIndex < m_iQKeyCount );
179 return m_pScales[ a_iIndex ];
180 }

◆ GetSCount()

TINT TKeyframeLibraryInstance::GetSCount ( ) const
inline

Definition at line 190 of file TAnimation.h.

190{ return m_iSKeyCount; }

◆ GetT()

TAnimVector * TKeyframeLibraryInstance::GetT ( TINT a_iIndex) const
inline

Definition at line 164 of file TAnimation.h.

165 {
166 TASSERT( a_iIndex < m_iTKeyCount );
167 return &m_pTranslations[ a_iIndex ];
168 }

◆ GetTCount()

TINT TKeyframeLibraryInstance::GetTCount ( ) const
inline

Definition at line 188 of file TAnimation.h.

188{ return m_iTKeyCount; }

◆ SetLibrary()

void TKeyframeLibraryInstance::SetLibrary ( TKeyframeLibrary * a_pLibrary)
inline

Definition at line 182 of file TAnimation.h.

182{ m_pLibrary = a_pLibrary; }

◆ SetQCount()

void TKeyframeLibraryInstance::SetQCount ( TINT a_iQCount)
inline

Definition at line 184 of file TAnimation.h.

184{ m_iQKeyCount = a_iQCount; }

◆ SetSCount()

void TKeyframeLibraryInstance::SetSCount ( TINT a_iSCount)
inline

Definition at line 185 of file TAnimation.h.

185{ m_iSKeyCount = a_iSCount; }

◆ SetTCount()

void TKeyframeLibraryInstance::SetTCount ( TINT a_iTCount)
inline

Definition at line 183 of file TAnimation.h.

183{ m_iTKeyCount = a_iTCount; }

The documentation for this class was generated from the following files: