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

Method getNodeKeyframe

Engine/source/ts/tsShapeEdit.cpp:1992–2016  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1990}
1991
1992void TSShape::getNodeKeyframe(S32 nodeIndex, const TSShape::Sequence& seq, S32 keyframe, MatrixF* mat) const
1993{
1994 // Get the node rotation and translation
1995 QuatF rot;
1996 if (seq.rotationMatters.test(nodeIndex))
1997 {
1998 S32 index = seq.rotationMatters.count(nodeIndex) * seq.numKeyframes + keyframe;
1999 nodeRotations[seq.baseRotation + index].getQuatF(&rot);
2000 }
2001 else
2002 defaultRotations[nodeIndex].getQuatF(&rot);
2003
2004 Point3F trans;
2005 if (seq.translationMatters.test(nodeIndex))
2006 {
2007 S32 index = seq.translationMatters.count(nodeIndex) * seq.numKeyframes + keyframe;
2008 trans = nodeTranslations[seq.baseTranslation + index];
2009 }
2010 else
2011 trans = defaultTranslations[nodeIndex];
2012
2013 // Set the keyframe matrix
2014 rot.setMatrix(mat);
2015 mat->setPosition(trans);
2016}
2017
2018bool TSShape::setSequenceBlend(const String& seqName, bool blend, const String& blendRefSeqName, S32 blendRefFrame)
2019{

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