/** * Sets the local skeleton's transforms back to the initial pose */ void AnimationSource::Reset() { // Copy the initial pose bones back into the local skeleton for(Node::const_flattreemap::const_iterator it = InitialBones().begin(); it != InitialBones().end(); it++) { skeletonTable[it->first]->LocalTransform() = it->second->LocalTransform(); } }
/** * Performs an update of the animation source * @param delta the elapsed time since the previous frame * @param now the current simulated time */ void AnimationSource::Update(double delta, double now) { // Copy the from source's skeleton into the local skeleton for(Node::flattreemap::iterator it = skeletonTable.begin(); it != skeletonTable.end(); it++) { it->second->LocalTransform() = InitialBones().find(it->first)->second->LocalTransform(); } }