#include <angularmotor.h>
Inherits AngularMotor.
Inheritance diagram for AngularMotor2Axis:
Public Member Functions | |
AngularMotor2Axis (const OdeHandle &odeHandle, TwoAxisJoint *joint, double power1, double power2) | |
Constuct a motor attached to a TwoAxisJoint. | |
virtual | ~AngularMotor2Axis () |
virtual int | getNumberOfAxes () |
returns the number of Axis of this Motor | |
virtual void | set (int axisNumber, double velocity) |
sets the desired speed of the motor at the given axis. | |
virtual double | get (int axisNumber) |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range | |
virtual void | setPower (double power) |
sets the maximal force the motor has | |
virtual void | setPower (double power1, double power2) |
virtual double | getPower2 () |
return the maximal force | |
virtual Joint * | getJoint () |
returns the joint to which this motor is attached | |
Protected Attributes | |
TwoAxisJoint * | joint |
AngularMotor2Axis | ( | const OdeHandle & | odeHandle, | |
TwoAxisJoint * | joint, | |||
double | power1, | |||
double | power2 | |||
) |
Constuct a motor attached to a TwoAxisJoint.
It will its two axis of course.
power | The maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) turns off the motor. |
virtual ~AngularMotor2Axis | ( | ) | [inline, virtual] |
double get | ( | int | axisNumber | ) | [virtual] |
returns the speed (PositionRate) at the given axis, or zero if the axis is out of range
Implements AngularMotor.
virtual Joint* getJoint | ( | ) | [inline, virtual] |
virtual int getNumberOfAxes | ( | ) | [inline, virtual] |
double getPower2 | ( | ) | [virtual] |
return the maximal force
void set | ( | int | axisNumber, | |
double | velocity | |||
) | [virtual] |
sets the desired speed of the motor at the given axis.
axisNumber | either 0 or 1 | |
velocity | Desired motor velocity (this will be an angular or linear velocity). |
Implements AngularMotor.
void setPower | ( | double | power1, | |
double | power2 | |||
) | [virtual] |
void setPower | ( | double | power | ) | [virtual] |
TwoAxisJoint* joint [protected] |