4#define cos_angle(angle) cos(double(angle * 3.1415926f / 180.0))
5#define sin_angle(angle) sin(double(angle * 3.1415926f / 180.0))
6#define radian(x) x * 3.1415926f / 180.0
12 template<
typename TDataType>
32 template<
typename TDataType>
39 template<
typename TDataType>
77 return translation * scaling * rotation_x * rotation_y * rotation_z;
81 template<
typename TDataType>
86 if(this->
parent !=
nullptr)
102 template<
typename TDataType>
111 this->
GlT = this->
GlT + this->
GlS * this->
GlR * t * this->
GlR.conjugate();
112 this->
GlS = this->
GlS * S;
113 this->
GlR = this->
GlR * (q_x * q_y * q_z);
128 template<
typename TDataType>
131 if(this->
parent !=
nullptr)
153 template<
typename TDataType>
160 template<
typename TDataType>
168 template<
typename TDataType>
175 template<
typename TDataType>
178 this->
id = jointTree.
id;
188 this->
GlT = jointTree.
GlT;
189 this->
GlR = jointTree.
GlR;
190 this->
GlS = jointTree.
GlS;
196 template<
typename TDataType>
202 template<
typename TDataType>
208 template<
typename TDataType>
211 cur = anim->getCurveValueAll(ptime);
215 template<
typename TDataType>
230#ifdef PRECISION_FLOAT
#define IMPLEMENT_TCLASS(name, T1)
A JointTree(Skeleton) represents a hierarchical tree structure of joints.
Mat getTransform(Coord &T, Coord &R, Coord &S)
void applyAnimationAll(Real ptime)
std::shared_ptr< AnimationCurve< TDataType > > AnimTranslation
void applyAnimationByOne(Coord &init, Coord &cur, std::shared_ptr< AnimationCurve< TDataType > > &anim, Real ptime)
std::shared_ptr< AnimationCurve< TDataType > > AnimScaling
Coord getCoordByMatrix(Coord X)
void getQuat(Coord &T, Coord &R, float &S)
std::vector< std::shared_ptr< JointTree > > children
Coord getCoordByQuat(Coord X)
void getGlobalTransform()
std::shared_ptr< AnimationCurve< TDataType > > AnimRotation
void copyFrom(JointTree< TDataType > jointTree)
std::shared_ptr< JointTree > parent
This is an implementation of AdditiveCCD based on peridyno.