Revision 2953,
538 bytes
checked in by mattausch, 16 years ago
(diff) |
started different stuff
|
Rev | Line | |
---|
[2951] | 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 | {
|
---|
[2953] | 21 | return mT * mVertices[mCurrentVertexIdx] + (1.0f - mT) * mVertices[(mCurrentVertexIdx + 1) % mVertices.size()];
|
---|
[2951] | 22 | }
|
---|
| 23 |
|
---|
| 24 |
|
---|
| 25 | Vector3 MotionPath::GetCurrentDirection() const
|
---|
| 26 | {
|
---|
[2953] | 27 | return Vector3(1, 0, 0);
|
---|
[2951] | 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.