Revision 2953,
538 bytes
checked in by mattausch, 16 years ago
(diff) |
started different stuff
|
Line | |
---|
1 | #include "MotionPath.h"
|
---|
2 |
|
---|
3 |
|
---|
4 | namespace CHCDemoEngine
|
---|
5 | {
|
---|
6 |
|
---|
7 |
|
---|
8 | MotionPath::MotionPath(const VertexArray &vertices):
|
---|
9 | mVertices(vertices), mCurrentVertexIdx(0)
|
---|
10 | {
|
---|
11 | }
|
---|
12 |
|
---|
13 |
|
---|
14 | void MotionPath::Move(float velocity)
|
---|
15 | {
|
---|
16 | }
|
---|
17 |
|
---|
18 |
|
---|
19 | Vector3 MotionPath::GetCurrentPosition() const
|
---|
20 | {
|
---|
21 | return mT * mVertices[mCurrentVertexIdx] + (1.0f - mT) * mVertices[(mCurrentVertexIdx + 1) % mVertices.size()];
|
---|
22 | }
|
---|
23 |
|
---|
24 |
|
---|
25 | Vector3 MotionPath::GetCurrentDirection() const
|
---|
26 | {
|
---|
27 | return Vector3(1, 0, 0);
|
---|
28 | }
|
---|
29 |
|
---|
30 |
|
---|
31 | void MotionPath::Reset()
|
---|
32 | {
|
---|
33 | mCurrentVertexIdx = 0;
|
---|
34 | }
|
---|
35 |
|
---|
36 |
|
---|
37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.