void getBlendNodeTransform(AppNode * node, AppNode * parent, AffineParts & child0, AffineParts & parent0, const AppTime & time, const AppTime & referenceTime, Quaternion & rot, Point3D & trans, Quaternion & srot, Point3D & scale) { Matrix<4,4,F32> m1, invm1, m2, retMat; getLocalNodeMatrix(node, parent, referenceTime, m1, child0, parent0); getLocalNodeMatrix(node, parent, time, m2, child0, parent0); invm1 = m1.inverse(); retMat = invm1 * m2; convertToTransform(retMat, rot,trans,srot,scale); }
void TSShapeLoader::generateNodeTransform(AppNode* node, F32 t, bool blend, F32 referenceTime, QuatF& rot, Point3F& trans, QuatF& srot, Point3F& scale) { MatrixF m1 = getLocalNodeMatrix(node, t); if (blend) { MatrixF m0 = getLocalNodeMatrix(node, referenceTime); m1 = m0.inverse() * m1; } rot.set(m1); trans = m1.getPosition(); srot.identity(); //@todo: srot not supported yet scale = m1.getScale(); }
void getLocalNodeTransform(AppNode * node, AppNode * parent, AffineParts & child0, AffineParts & parent0, const AppTime & time, Quaternion & rot, Point3D & trans, Quaternion & srot, Point3D & scale) { Matrix<4,4,F32> localMat; getLocalNodeMatrix(node,parent,time,localMat,child0,parent0); convertToTransform(localMat,rot,trans,srot,scale); }