MCPcopy Create free account
hub / github.com/OGRECave/ogre / processKeyframe

Method processKeyframe

PlugIns/DotScene/src/DotSceneLoader.cpp:962–990  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

960}
961
962void DotSceneLoader::processKeyframe(pugi::xml_node& XMLNode, NodeAnimationTrack* pTrack)
963{
964 // Process node animation keyframe (*)
965 Real time = getAttribReal(XMLNode, "time");
966
967 LogManager::getSingleton().logMessage("[DotSceneLoader] Processing Keyframe: " + StringConverter::toString(time), LML_TRIVIAL);
968
969 auto keyframe = pTrack->createNodeKeyFrame(time);
970
971 // Process translation (?)
972 if (auto pElement = XMLNode.child("position")) {
973 Vector3 translation = parseVector3(pElement);
974 keyframe->setTranslate(translation);
975 }
976
977 // Process rotation (?)
978 //Quaternion rotation = Quaternion::IDENTITY;
979 if (auto pElement = XMLNode.child("rotation")) {
980 Quaternion rotation = parseQuaternion(pElement);
981 keyframe->setRotation(rotation);
982 }
983
984 // Process scale (?)
985 //Vector3 scale = parseVector3(XMLNode.child("scale"));
986 if (auto pElement = XMLNode.child("scale")) {
987 Vector3 scale = parseVector3(pElement);
988 keyframe->setScale(scale);
989 }
990}
991
992void DotSceneLoader::exportScene(SceneNode* rootNode, const String& outFileName)
993{

Callers

nothing calls this directly

Calls 9

getAttribRealFunction · 0.85
createNodeKeyFrameMethod · 0.80
setTranslateMethod · 0.80
setRotationMethod · 0.80
parseVector3Function · 0.70
parseQuaternionFunction · 0.70
toStringFunction · 0.50
logMessageMethod · 0.45
setScaleMethod · 0.45

Tested by

no test coverage detected