MCPcopy Create free account
hub / github.com/GarageGames/Torque3D / getNodeKeyframe

Method getNodeKeyframe

Engine/source/ts/tsShapeEdit.cpp:1975–1999  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1973}
1974
1975void TSShape::getNodeKeyframe(S32 nodeIndex, const TSShape::Sequence& seq, S32 keyframe, MatrixF* mat) const
1976{
1977 // Get the node rotation and translation
1978 QuatF rot;
1979 if (seq.rotationMatters.test(nodeIndex))
1980 {
1981 S32 index = seq.rotationMatters.count(nodeIndex) * seq.numKeyframes + keyframe;
1982 nodeRotations[seq.baseRotation + index].getQuatF(&rot);
1983 }
1984 else
1985 defaultRotations[nodeIndex].getQuatF(&rot);
1986
1987 Point3F trans;
1988 if (seq.translationMatters.test(nodeIndex))
1989 {
1990 S32 index = seq.translationMatters.count(nodeIndex) * seq.numKeyframes + keyframe;
1991 trans = nodeTranslations[seq.baseTranslation + index];
1992 }
1993 else
1994 trans = defaultTranslations[nodeIndex];
1995
1996 // Set the keyframe matrix
1997 rot.setMatrix(mat);
1998 mat->setPosition(trans);
1999}
2000
2001bool TSShape::setSequenceBlend(const String& seqName, bool blend, const String& blendRefSeqName, S32 blendRefFrame)
2002{

Callers

nothing calls this directly

Calls 5

getQuatFMethod · 0.80
testMethod · 0.45
countMethod · 0.45
setMatrixMethod · 0.45
setPositionMethod · 0.45

Tested by

no test coverage detected