5 Turtle::Turtle() : state(Vector3(0, 4,0))
13 void Turtle::up(float value
)
15 state
= state
+ ( state
.upVector() * value
);
18 void Turtle::left(float value
)
20 state
= state
+ ( state
.leftVector() * value
);
23 void Turtle::forward(float value
)
25 state
= state
+ ( state
.lookVector() * -value
);
28 void Turtle::pitch(float value
)
30 CoordinateFrame
pitch(Matrix3::fromAxisAngle(state
.leftVector(), value
));
31 state
= state
* pitch
;
34 void Turtle::roll(float value
)
36 CoordinateFrame
pitch(Matrix3::fromAxisAngle(state
.lookVector(), value
));
37 state
= state
* pitch
;
40 void Turtle::yaw(float value
)
42 CoordinateFrame
pitch(Matrix3::fromAxisAngle(state
.upVector(), value
));
43 state
= state
* pitch
;
46 void Turtle::onGraphics(RenderDevice
*rd
)
48 Draw::axes(state
, rd
);
51 void Turtle::onConsoleCommand(TurtleCommand tc
, float arg
)