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


Public Member Functions | |
| CommandRotate (double _duration, const Vec3f &axis, float rate) | |
| void | process (ExecutionEnvironment &, double t, double dt) |
Private Attributes | |
| Vec3f | spin |
|
||||||||||||||||
|
Definition at line 387 of file command.cpp. 00387 : 00388 TimedCommand(_duration), 00389 spin(axis * rate) 00390 { 00391 }
|
|
||||||||||||||||
|
Implements Command. Definition at line 393 of file command.cpp. References Vector3< T >::length(), Quaternion< T >::rotate(), Quaternion< T >::setAxisAngle(), and spin. 00394 {
00395 float v = spin.length();
00396 if (v != 0.0f)
00397 {
00398 Quatf q;
00399 q.setAxisAngle(spin / v, (float) (v * dt));
00400 env.getSimulation()->rotate(q);
00401 }
00402 }
|
|
|
Definition at line 331 of file command.h. Referenced by process(). |
1.4.1