46 strModelPath.
Format(
"%s%s",
"data\\models\\", strObjModel.
GetString() );
51 AModelRepos* pModelRepos = AModelRepos::GetSingleton();
54 m_pAModel = pModelRepos->
GetModel( strPooledModelPath );
65 LoadAnimationSet( it->GetValue()->GetProperties() );
66 bLoadedAnimationSet =
TTRUE;
70 SetAnimController( it->GetValue()->GetProperties() );
74 SetSkins( it->GetValue()->GetProperties() );
79 if ( !bLoadedAnimationSet )
80 LoadAnimationSet(
TNULL );
92 strModelPath.
Format(
"%s%s",
"data\\models\\", m_strName.GetString() );
97 AModelRepos* pModelRepos = AModelRepos::GetSingleton();
100 m_pAModel = pModelRepos->
GetModel( strPooledModelPath );
103 LoadAnimationSet(
TNULL );
115 m_vecAnimationSets.Clear();
116 m_llAnimControllerTypes.DeleteAll();
120 AModelRepos::GetSingleton()->UnloadModel( m_pAModel->GetName(),
TFALSE );
135 for (
TINT i = 0; i < m_vecAnimationSets.Size(); i++ )
137 if ( m_vecAnimationSets[ i ]->
GetName() == a_rcName )
139 return m_vecAnimationSets[ i ];
151 if ( m_vecAnimationSets[ a_iIndex ].Get() )
152 return m_vecAnimationSets[ a_iIndex ];
165 return m_vecAnimationSets.Size();
170 return AModelRepos::GetSingleton()->InstantiateModel(
GetModel() );
174TBOOL AAnimatableObjectType::LoadAnimationSet(
const PBProperties* a_pProperties )
191 if ( !pAnimationSet.Get() )
195 m_vecAnimationSets.PushBack( pAnimationSet );
202 return pAnimationSet->CreateFromProperties( a_pProperties, pSkeleton );
210TBOOL AAnimatableObjectType::SetAnimController(
const PBProperties* a_pProperties )
227 m_llAnimControllerTypes.PushBack( pControllerType );
229 return pControllerType->
Create( a_pProperties );
#define TSTATICCAST(POINTERTYPE, VALUE)
#define TOSHI_NAMESPACE_USING
#define T2_FOREACH(vecName, iteratorName)
#define TPSTRING8_DECLARE(STR)
Toshi::TRef< ANamedAnimationSet > ANamedAnimationSetRef
TBOOL GetOptionalPropertyValue(T &a_rOutValue, const TCHAR *a_szName) const
static TINT Compare(const TCHAR *str1, const TCHAR *str2, TSIZE size=-1)
class TObject * CreateObject() const
static TClass * Find(const TCHAR *name, TClass *parent=TNULL)
TFORCEINLINE const TCHAR * GetString() const
TString8 & Format(const TCHAR *a_pcFormat,...)
const TCHAR * GetString(TINT a_iIndex=0) const
AModelInstance * Instantiate()
const Toshi::TPString8 & GetName() const
ANamedAnimationSetRef GetDefaultAnimationSet() const
ANamedAnimationSetRef FindAnimationSet(const Toshi::TPString8 &a_rcName) const
static constexpr TSIZE MAX_ANIMATION_SETS
ANamedAnimationSetRef GetAnimationSet(TINT a_iIndex) const
AModel * GetModel() const
virtual TBOOL Create(const Toshi::TPString8 &a_rcName)
virtual TBOOL CreateFromProperties(const PBProperties *a_pProperties, const Toshi::TPString8 &a_rcName)
TINT GetNumAnimationSets() const
virtual void OnAnimatableObjectCreated(AAnimatableObject *a_pAnimatableObject)
virtual ~AAnimatableObjectType()
virtual TBOOL Create(const PBProperties *a_pProperties)
Toshi::TSkeleton * GetSkeleton() const
void LoadModel(const Toshi::TPString8 &a_rcName, Toshi::TTRB *a_pTRB)
AModel * GetModel(const Toshi::TPString8 &a_rcName)
static Toshi::TMemory::MemBlock * GetMemBlock(POOL a_ePool)