CSEngine
Loading...
Searching...
No Matches
CSE::Skeleton Class Reference
Inheritance diagram for CSE::Skeleton:
CSE::SResource CSE::SObject CSE::VariableBinder CSE::ReflectionObject

Public Member Functions

 RESOURCE_DEFINE_CONSTRUCTOR (Skeleton)
 
 Skeleton (int jointCount, Joint *headJoint)
 
void SetJoint (int jointCount, Joint *headJoint)
 
int getJointCount () const
 
void setJointCount (int jointCount)
 
JointgetHeadJoint () const
 
void setHeadJoint (Joint *headJoint)
 
void Exterminate () override
 
void SetValue (std::string name_str, Arguments value) override
 
std::string PrintValue () const override
 
- Public Member Functions inherited from CSE::SResource
 SResource (std::string classType)
 
 SResource (const SResource *resource, bool isRegister)
 
void SetName (std::string name)
 
void SetAbsoluteID (std::string id)
 
std::string GetName () const
 
std::string GetAbsoluteID () const
 
AssetMgr::AssetReferenceGetAssetReference (std::string hash="") const
 
void LinkResource (AssetMgr::AssetReference *asset)
 
void LinkResource (std::string name)
 
void SetHash (std::string &hash) override
 
- Public Member Functions inherited from CSE::SObject
 SObject (bool isRegister)
 
virtual void SetUndestroyable (bool enable)
 
virtual void Destroy ()
 
std::string GetHash () const
 
- Public Member Functions inherited from CSE::VariableBinder
- Public Member Functions inherited from CSE::ReflectionObject
 ReflectionObject (std::string type)
 
void SetClassType (std::string type)
 
const char * GetClassType () const
 
bool IsSameClass (const char *classType) const
 

Protected Member Functions

void Init (const AssetMgr::AssetReference *asset) override
 
- Protected Member Functions inherited from CSE::SResource
- Protected Member Functions inherited from CSE::VariableBinder

Additional Inherited Members

- Static Public Member Functions inherited from CSE::SResource
template<class T >
static T * Create (const std::string &name)
 
static SResourceCreate (const std::string &name, const std::string &classType)
 
template<class T >
static T * Create (const AssetMgr::AssetReference *asset)
 
static SResourceCreate (const AssetMgr::AssetReference *asset, const std::string &classType)
 
template<class T >
static T * Get (std::string name)
 
static SResourceGet (std::string &name)
 
- Static Public Member Functions inherited from CSE::ReflectionObject
static ReflectionObjectNewObject (const std::string &name)
 
- Protected Types inherited from CSE::VariableBinder
typedef std::vector< std::string > Arguments
 
- Protected Attributes inherited from CSE::SObject
std::string m_hash
 
- Protected Attributes inherited from CSE::ReflectionObject
std::string m_class
 

Detailed Description

Definition at line 12 of file Skeleton.h.

Constructor & Destructor Documentation

◆ Skeleton()

CSE::Skeleton::Skeleton ( int jointCount,
Joint * headJoint )
inline

Definition at line 16 of file Skeleton.h.

16 : m_jointCount(jointCount), m_headJoint(headJoint),
17 SResource("Skeleton") {
18 SetUndestroyable(true);
19 }

◆ ~Skeleton()

CSE::Skeleton::~Skeleton ( )
inlineoverride

Definition at line 21 of file Skeleton.h.

21 {
22 Exterminate();
23 }

Member Function Documentation

◆ Exterminate()

void CSE::Skeleton::Exterminate ( )
inlineoverridevirtual

Implements CSE::SObject.

Definition at line 49 of file Skeleton.h.

49 {
50 SAFE_DELETE(m_headJoint);
51 }

◆ getHeadJoint()

Joint * CSE::Skeleton::getHeadJoint ( ) const
inline

Definition at line 40 of file Skeleton.h.

40 {
41 if (!isLoaded()) return nullptr;
42 return m_headJoint;
43 }

◆ getJointCount()

int CSE::Skeleton::getJointCount ( ) const
inline

Definition at line 31 of file Skeleton.h.

31 {
32 if (!isLoaded()) return -1;
33 return m_jointCount;
34 }

◆ Init()

void CSE::Skeleton::Init ( const AssetMgr::AssetReference * asset)
inlineoverrideprotectedvirtual

Implements CSE::SResource.

Definition at line 58 of file Skeleton.h.

58 {
59 return;
60 }

◆ PrintValue()

std::string CSE::Skeleton::PrintValue ( ) const
overridevirtual

Implements CSE::VariableBinder.

Definition at line 10 of file Skeleton.cpp.

10 {
11 return {};
12}

◆ setHeadJoint()

void CSE::Skeleton::setHeadJoint ( Joint * headJoint)
inline

Definition at line 45 of file Skeleton.h.

45 {
46 Skeleton::m_headJoint = headJoint;
47 }

◆ SetJoint()

void CSE::Skeleton::SetJoint ( int jointCount,
Joint * headJoint )
inline

Definition at line 25 of file Skeleton.h.

25 {
26 m_jointCount = jointCount;
27 m_headJoint = headJoint;
28 }

◆ setJointCount()

void CSE::Skeleton::setJointCount ( int jointCount)
inline

Definition at line 36 of file Skeleton.h.

36 {
37 Skeleton::m_jointCount = jointCount;
38 }

◆ SetValue()

void CSE::Skeleton::SetValue ( std::string name_str,
Arguments value )
overridevirtual

Used to get serialized values. All classes that inherit from VariableBinder will unconditionally call this function first during initialization.

Parameters
name_strName of values
valueSerialized values

Implements CSE::VariableBinder.

Definition at line 7 of file Skeleton.cpp.

7 {
8}

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