CSEngine
Loading...
Searching...
No Matches
CSE::DrawableSkinnedMeshComponent Class Reference
Inheritance diagram for CSE::DrawableSkinnedMeshComponent:
CSE::DrawableStaticMeshComponent CSE::SComponent CSE::SObject CSE::SISComponent CSE::VariableBinder

Public Member Functions

 COMPONENT_DEFINE_CONSTRUCTOR (DrawableSkinnedMeshComponent)
 
SComponentClone (SGameObject *object) override
 
void CopyReference (SComponent *src, std::map< SGameObject *, SGameObject * > lists_obj, std::map< SComponent *, SComponent * > lists_comp) override
 
void SetRootJoint (SGameObject *joint_object, int joint_size)
 
JointComponentGetRootJoint ()
 
std::vector< mat4GetJointMatrix () const
 
bool SetMesh (const SISurface &meshSurface) override
 
- Public Member Functions inherited from CSE::DrawableStaticMeshComponent
 COMPONENT_DEFINE_CONSTRUCTOR (DrawableStaticMeshComponent)
 
void Init () override
 
void Tick (float elapsedTime) override
 
void Exterminate () override
 
SComponentClone (SGameObject *object) override
 
const GLMeshIDGetMeshID () const
 
- Public Member Functions inherited from CSE::SComponent
 SComponent (std::string classType, SGameObject *gameObject)
 
 SComponent (const SComponent &src)
 
void Start () override
 
virtual auto GetComponent () -> SObject *
 
void SetValue (std::string name_str, Arguments value) override
 
std::string PrintValue () const override
 
void SetGameObject (SGameObject *object)
 
virtual SGameObjectGetGameObject () const
 
virtual bool GetIsEnable () const
 
virtual void SetIsEnable (bool is_enable)
 
std::string GetClassType () const
 
void SetClassType (std::string type)
 
- Public Member Functions inherited from CSE::SObject
 SObject (bool isRegister)
 
virtual void SetUndestroyable (bool enable)
 
virtual void Destroy ()
 
virtual void __FORCE_DESTROY__ ()
 
virtual std::string GenerateMeta ()
 
std::string GetHash () const
 
virtual void SetHash (std::string &hash)
 
- Public Member Functions inherited from CSE::SISComponent
 SISComponent (const SISComponent &src)=default
 

Additional Inherited Members

- Protected Types inherited from CSE::VariableBinder
typedef std::vector< std::string > Arguments
 
- Protected Member Functions inherited from CSE::DrawableStaticMeshComponent
virtual void CreateMeshBuffers (const SISurface &surface)
 
- Protected Attributes inherited from CSE::DrawableStaticMeshComponent
GLMeshID m_meshId
 
- Protected Attributes inherited from CSE::SComponent
SGameObjectgameObject = nullptr
 
bool isEnable = true
 
std::string m_classType
 
- Protected Attributes inherited from CSE::SObject
std::string m_hash
 

Detailed Description

Definition at line 8 of file DrawableSkinnedMeshComponent.h.

Member Function Documentation

◆ Clone()

SComponent * DrawableSkinnedMeshComponent::Clone ( SGameObject object)
overridevirtual

Reimplemented from CSE::SComponent.

Definition at line 65 of file DrawableSkinnedMeshComponent.cpp.

65 {
66 INIT_COMPONENT_CLONE(DrawableSkinnedMeshComponent, clone);
67
68 clone->m_meshId = m_meshId;
69 clone->m_jointSize = m_jointSize;
70
71 return clone;
72}

◆ CopyReference()

void DrawableSkinnedMeshComponent::CopyReference ( SComponent src,
std::map< SGameObject *, SGameObject * >  lists_obj,
std::map< SComponent *, SComponent * >  lists_comp 
)
overridevirtual

Reimplemented from CSE::SComponent.

Definition at line 74 of file DrawableSkinnedMeshComponent.cpp.

75 {
76 if (src == nullptr) return;
77 auto* convert = static_cast<DrawableSkinnedMeshComponent*>(src);
78
79 //Copy Components
80 FIND_COMP_REFERENCE(m_jointRoot, convert, JointComponent);
81}

◆ GetJointMatrix()

std::vector< mat4 > DrawableSkinnedMeshComponent::GetJointMatrix ( ) const

Definition at line 28 of file DrawableSkinnedMeshComponent.cpp.

28 {
29 std::vector<mat4> jointMatrices;
30
31 if (m_jointRoot == nullptr) return jointMatrices;
32
33 jointMatrices.resize(m_jointSize);
34 addJointsToVector(m_jointRoot, jointMatrices);
35 return jointMatrices;
36}

◆ GetRootJoint()

JointComponent * DrawableSkinnedMeshComponent::GetRootJoint ( )

Definition at line 23 of file DrawableSkinnedMeshComponent.cpp.

23 {
24 return m_jointRoot;
25}

◆ SetMesh()

bool DrawableSkinnedMeshComponent::SetMesh ( const SISurface meshSurface)
overridevirtual

Reimplemented from CSE::DrawableStaticMeshComponent.

Definition at line 61 of file DrawableSkinnedMeshComponent.cpp.

61 {
62 return DrawableStaticMeshComponent::SetMesh(meshSurface);
63}

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