Definition at line 8 of file JointComponent.h.
◆ JointComponent()
Definition at line 11 of file JointComponent.cpp.
12 m_animatedMatrix = src.m_animatedMatrix;
13 m_id = src.m_id;
14 m_inverseTransformMatrix = src.m_inverseTransformMatrix;
15}
◆ calcInverseBindTransform()
void JointComponent::calcInverseBindTransform |
( |
const mat4 & |
parentTransform | ) |
|
Definition at line 36 of file JointComponent.cpp.
36 {
37 mat4 bindTransform = m_localBindMatrix * parentTransform;
38 m_inverseTransformMatrix = mat4::Invert(bindTransform);
39
40 auto children = gameObject->GetChildren();
41 for (const auto& child : children) {
43
44 if(child_comp == nullptr) continue;
45
46 child_comp->calcInverseBindTransform(bindTransform);
47 }
48}
◆ Clone()
Reimplemented from CSE::SComponent.
Definition at line 50 of file JointComponent.cpp.
50 {
52
53 clone->m_inverseTransformMatrix =
mat4(m_inverseTransformMatrix);
54 clone->m_animatedMatrix =
mat4(m_animatedMatrix);
55 clone->m_localBindMatrix =
mat4(m_localBindMatrix);
56 clone->m_id = m_id;
57 clone->m_animationJointId = m_animationJointId;
58
59 return clone;
60}
◆ Exterminate()
void JointComponent::Exterminate |
( |
| ) |
|
|
overridevirtual |
◆ GetAnimationJointId()
int CSE::JointComponent::GetAnimationJointId |
( |
| ) |
const |
|
inline |
◆ GetAnimationMatrix()
mat4 CSE::JointComponent::GetAnimationMatrix |
( |
| ) |
const |
|
inline |
◆ GetID()
int CSE::JointComponent::GetID |
( |
| ) |
const |
|
inline |
◆ GetInverseTransformMatrix()
mat4 CSE::JointComponent::GetInverseTransformMatrix |
( |
| ) |
const |
|
inline |
Definition at line 50 of file JointComponent.h.
50 {
51 return m_inverseTransformMatrix;
52 }
◆ Init()
void JointComponent::Init |
( |
| ) |
|
|
overridevirtual |
◆ PrintValue()
std::string JointComponent::PrintValue |
( |
| ) |
const |
|
overridevirtual |
Implements CSE::VariableBinder.
Definition at line 78 of file JointComponent.cpp.
78 {
79 PRINT_START("component");
80
81 PRINT_VALUE_MAT4(m_inverseTransformMatrix);
82 PRINT_VALUE_MAT4(m_animatedMatrix);
83 PRINT_VALUE_MAT4(m_localBindMatrix);
84
85 PRINT_END("component");
86}
◆ SetAnimationJointId()
void CSE::JointComponent::SetAnimationJointId |
( |
int |
animation_joint_id | ) |
|
|
inline |
Definition at line 46 of file JointComponent.h.
46 {
47 m_animationJointId = animation_joint_id;
48 }
◆ SetAnimationMatrix()
void JointComponent::SetAnimationMatrix |
( |
mat4 && |
animation | ) |
|
◆ SetBindLocalMatrix()
void JointComponent::SetBindLocalMatrix |
( |
const mat4 & |
mat | ) |
|
◆ SetID()
void CSE::JointComponent::SetID |
( |
int |
id | ) |
|
|
inline |
◆ SetValue()
void JointComponent::SetValue |
( |
std::string |
name_str, |
|
|
VariableBinder::Arguments |
value |
|
) |
| |
|
overridevirtual |
Implements CSE::VariableBinder.
Definition at line 66 of file JointComponent.cpp.
66 {
67 if(name_str == "m_inverseTransformMatrix") {
68 SET_MAT4(m_inverseTransformMatrix)
69 }
70 else if(name_str == "m_animatedMatrix") {
71 SET_MAT4(m_animatedMatrix)
72 }
73 else if(name_str == "m_localBindMatrix") {
74 SET_MAT4(m_localBindMatrix)
75 }
76}
◆ Tick()
void JointComponent::Tick |
( |
float |
elapsedTime | ) |
|
|
overridevirtual |
The documentation for this class was generated from the following files: