source: GTP/trunk/App/Demos/Vis/FriendlyCulling/src/MotionPath.h @ 2951

Revision 2951, 888 bytes checked in by mattausch, 16 years ago (diff)

strted to implement animation

Line 
1#ifndef __MOTIONPATH_H
2#define __MOTIONPATH_H
3
4
5#include "common.h"
6#include "Vector3.h"
7
8
9namespace CHCDemoEngine
10{
11
12
13/** Represents a vertex track for animation
14*/
15class MotionPath
16{
17public:
18
19        /** Constructor for a vertex path. The first vertex
20                is also the starting point of the motion
21        */
22        MotionPath(const VertexArray &vertices);
23        /** Moves forward using the given velocity
24        */
25        void Move(float velocity);
26        /** Gets current position on track.
27        */
28        Vector3 GetCurrentPosition() const;
29        /** Gets the current direction direction.
30        */
31        Vector3 GetCurrentDirection() const;
32        /** Resets the track to the starting position
33        */
34        void Reset();
35
36
37protected:
38       
39        VertexArray mVertices;
40        /// current position between two verticess curve paramter
41        float mT;
42        /// the current vertex position
43        int mCurrentVertexIdx;
44};
45
46
47}
48
49#endif // __MOTIONPATH_H
Note: See TracBrowser for help on using the repository browser.