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

Revision 3078, 920 bytes checked in by mattausch, 16 years ago (diff)
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        Matrix4x4 GetOrientation();
37
38
39protected:
40       
41        VertexArray mVertices;
42        /// current position between two verticess curve paramter
43        float mT;
44        /// the current vertex position
45        int mCurrentVertexIdx;
46};
47
48
49}
50
51#endif // __MOTIONPATH_H
Note: See TracBrowser for help on using the repository browser.