BrainTrain
|
#include <AnimationCreater.h>
Public Member Functions | |
double | getAngleRad (osg::Vec3 pointA, osg::Vec3 pointB) |
Creator of the Animation Path for the Train-Simulation. More... | |
osg::AnimationPath * | createAnimationPath (float time) |
Creates the animation path. More... | |
Definition at line 5 of file AnimationCreater.h.
osg::AnimationPath * AnimationCreator::createAnimationPath | ( | float | time | ) |
Creates the animation path.
The Method creates the Train AnimationPath. Each vector will be included in the AnimationPath, together with the correct rotation between two points.
time | is the time that the train will take between two vectors, low time = fast train. |
Definition at line 40 of file AnimationCreater.cpp.
double AnimationCreator::getAngleRad | ( | osg::Vec3 | pointA, |
osg::Vec3 | pointB | ||
) |
Creator of the Animation Path for the Train-Simulation.
The Method calculates the dotproduct between two vectors and devides it with the length of both vectors. ( vectorA * vectorB ) / ( |vectorA| * |vectorB| )
pointA | the starting Vector |
pointB | the end Vector |
Definition at line 16 of file AnimationCreater.cpp.