#include <angularmotor.h>
Inheritance diagram for oxygen::AngularMotor:
Public Types | |
enum | EMotorMode { MM_USER = dAMotorUser, MM_EULER = dAMotorEuler } |
enum | EAxisAnchor { AA_GLOBAL = 0, AA_FIRSTBODY = 1, AA_SECONDBODY = 2 } |
Public Member Functions | |
AngularMotor () | |
virtual | ~AngularMotor () |
void | SetMode (EMotorMode mode) |
sets the motor mode. | |
EMotorMode | GetMode () |
returns the current motor mode | |
void | SetNumAxes (int num) |
sets the number of angular axes that will be controlled by the angular motor. | |
int | GetNumAxes () |
returns the number of angular axes that are controlled by the angular motor | |
void | SetMotorAxis (EAxisIndex idx, EAxisAnchor anchor, const salt::Vector3f &axis) |
sets one of the motor axis. | |
salt::Vector3f | GetMotorAxis (EAxisIndex idx) |
returns the motor axis | |
EAxisAnchor | GetAxisAnchor (EAxisIndex idx) |
returns the relative anchor mode of the motor axis | |
void | SetAxisAngle (EAxisIndex idx, float degAngle) |
sets the current angle along axis | |
float | GetAxisAngle (EAxisIndex idx) |
returns the current angle in degrees for axis idx. | |
float | GetAxisAngleRate (EAxisIndex idx) |
Return the current angle rate for axis anum. | |
Protected Member Functions | |
virtual void | OnLink () |
creates a new angularmotor joint | |
virtual void | SetParameter (int parameter, float value) |
sets a joint parameter value | |
virtual float | GetParameter (int parameter) |
returns a joint parameter value |
The angular velocity can be controlled on up to three axes, allowing torque motors and stops to be set for rotation about those axes.
Definition at line 34 of file angularmotor.h.
|
Definition at line 43 of file angularmotor.h. |
|
Definition at line 37 of file angularmotor.h. |
|
Definition at line 27 of file angularmotor.cpp. |
|
Definition at line 31 of file angularmotor.cpp. |
|
returns the relative anchor mode of the motor axis
Definition at line 82 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
returns the current angle in degrees for axis idx. In 'user' mode this is simply the value that was previoulsy set with SetAxisAngle(). In 'euler' mode this is the corresponding euler angle. Definition at line 99 of file angularmotor.cpp. References salt::gRadToDeg(), and oxygen::Joint::mODEJoint. Here is the call graph for this function: ![]() |
|
Return the current angle rate for axis anum. In dAMotorUser mode this is always zero, as not enough information is available. In dAMotorEuler mode this is the corresponding euler angle rate. Definition at line 104 of file angularmotor.cpp. References salt::gRadToDeg(), and oxygen::Joint::mODEJoint. Here is the call graph for this function: ![]() |
|
returns the current motor mode
Definition at line 51 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
returns the motor axis
Definition at line 87 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
returns the number of angular axes that are controlled by the angular motor
Definition at line 69 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
returns a joint parameter value
Implements oxygen::Joint. Definition at line 114 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
creates a new angularmotor joint
Reimplemented from oxygen::Joint. Definition at line 35 of file angularmotor.cpp. References oxygen::ODEObject::GetWorldID(), and oxygen::Joint::mODEJoint. Here is the call graph for this function: ![]() |
|
sets the current angle along axis
Definition at line 94 of file angularmotor.cpp. References salt::gDegToRad(), and oxygen::Joint::mODEJoint. Here is the call graph for this function: ![]() |
|
sets the motor mode. The angular motor can be used in different modes. In 'user' mode (the default mode), the user directly sets the axes that the angular motor controls. In 'euler' mode, it computes the euler angles corresponding to the relative rotation, allowing euler angle torque motors and stops to be set. Definition at line 46 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
sets one of the motor axis.
Definition at line 74 of file angularmotor.cpp. References oxygen::BaseNode::GetWorldTransform(), and oxygen::Joint::mODEJoint. Here is the call graph for this function: ![]() |
|
sets the number of angular axes that will be controlled by the angular motor.
Definition at line 56 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |
|
sets a joint parameter value
Implements oxygen::Joint. Definition at line 109 of file angularmotor.cpp. References oxygen::Joint::mODEJoint. |