#include <command.h>
Inheritance diagram for CommandOrbit:


Public Member Functions | |
| CommandOrbit (double _duration, const Vec3f &axis, float rate) | |
| void | process (ExecutionEnvironment &, double t, double dt) |
Private Attributes | |
| Vec3f | spin |
|
||||||||||||||||
|
Definition at line 369 of file command.cpp. 00369 : 00370 TimedCommand(_duration), 00371 spin(axis * rate) 00372 { 00373 }
|
|
||||||||||||||||
|
Implements Command. Definition at line 375 of file command.cpp. References Vector3< T >::length(), Quaternion< T >::setAxisAngle(), and spin. 00376 {
00377 float v = spin.length();
00378 if (v != 0.0f)
00379 {
00380 Quatf q;
00381 q.setAxisAngle(spin / v, (float) (v * dt));
00382 env.getSimulation()->orbit(q);
00383 }
00384 }
|
|
|
Definition at line 320 of file command.h. Referenced by process(). |
1.4.1