BrainTrain
 All Classes Namespaces Files Functions Variables Macros Pages
AnimationCreator Class Reference

#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...
 

Detailed Description

Definition at line 5 of file AnimationCreater.h.

Member Function Documentation

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.

Parameters
timeis the time that the train will take between two vectors, low time = fast train.
Returns
the complete AnimationPath for the 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.

Author
Philip Sauer
Version
1.0
Date
2014 Calculate the angle between two Vectors

The Method calculates the dotproduct between two vectors and devides it with the length of both vectors. ( vectorA * vectorB ) / ( |vectorA| * |vectorB| )

Parameters
pointAthe starting Vector
pointBthe end Vector
Returns
the angle in radian

Definition at line 16 of file AnimationCreater.cpp.


The documentation for this class was generated from the following files: