Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

CommandOrbit Class Reference

#include <command.h>

Inheritance diagram for CommandOrbit:

Inheritance graph
Collaboration diagram for CommandOrbit:

Collaboration graph
List of all members.

Public Member Functions

 CommandOrbit (double _duration, const Vec3f &axis, float rate)
void process (ExecutionEnvironment &, double t, double dt)

Private Attributes

Vec3f spin

Constructor & Destructor Documentation

CommandOrbit::CommandOrbit double  _duration,
const Vec3f axis,
float  rate
 

Definition at line 369 of file command.cpp.

00369                                                                           :
00370     TimedCommand(_duration),
00371     spin(axis * rate)
00372 {
00373 }


Member Function Documentation

void CommandOrbit::process ExecutionEnvironment ,
double  t,
double  dt
[virtual]
 

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 }


Member Data Documentation

Vec3f CommandOrbit::spin [private]
 

Definition at line 320 of file command.h.

Referenced by process().


The documentation for this class was generated from the following files:
Generated on Sat Jan 14 22:33:13 2006 for Celestia by  doxygen 1.4.1