#include <joint.h>
Inherits TwoAxisJoint.
Inheritance diagram for UniversalJoint:


Public Member Functions | |
| UniversalJoint (Primitive *part1, Primitive *part2, const osg::Vec3 &anchor, const Axis &axis1, const Axis &axis2) | |
| virtual | ~UniversalJoint () |
| virtual void | init (const OdeHandle &odeHandle, const OsgHandle &osgHandle, bool withVisual=true, double visualSize=0.2) |
| initialises (and creates) the joint. | |
| virtual void | update () |
| should syncronise the Ode stuff and the OSG notes (if any) | |
| virtual void | addForce1 (double t1) |
| adds torques to axis 1 and 2 | |
| virtual void | addForce2 (double t2) |
| virtual double | getPosition1 () const |
| virtual double | getPosition2 () const |
| virtual double | getPosition1Rate () const |
| virtual double | getPosition2Rate () const |
| virtual void | setParam (int parameter, double value) |
| sets the ODE joint parameter (see ODE manual) | |
| virtual double | getParam (int parameter) const |
| return the ODE joint parameter (see ODE manual) | |
Protected Attributes | |
| OSGPrimitive * | visual1 |
| OSGPrimitive * | visual2 |
| UniversalJoint | ( | Primitive * | part1, | |
| Primitive * | part2, | |||
| const osg::Vec3 & | anchor, | |||
| const Axis & | axis1, | |||
| const Axis & | axis2 | |||
| ) |
| ~UniversalJoint | ( | ) | [virtual] |
| void addForce1 | ( | double | t1 | ) | [virtual] |
| void addForce2 | ( | double | t2 | ) | [virtual] |
Implements TwoAxisJoint.
| double getParam | ( | int | parameter | ) | const [virtual] |
| double getPosition1 | ( | ) | const [virtual] |
Implements OneAxisJoint.
| double getPosition1Rate | ( | ) | const [virtual] |
Implements OneAxisJoint.
| double getPosition2 | ( | ) | const [virtual] |
Implements TwoAxisJoint.
| double getPosition2Rate | ( | ) | const [virtual] |
Implements TwoAxisJoint.
| void init | ( | const OdeHandle & | odeHandle, | |
| const OsgHandle & | osgHandle, | |||
| bool | withVisual = true, |
|||
| double | visualSize = 0.2 | |||
| ) | [virtual] |
initialises (and creates) the joint.
If visual is true then axix1 and axis2 of the joints is also drawn as a slim cylinder. visualSize is the length of the cylinder.
Reimplemented from Joint.
| void setParam | ( | int | parameter, | |
| double | value | |||
| ) | [virtual] |
| void update | ( | ) | [virtual] |
OSGPrimitive* visual1 [protected] |
OSGPrimitive* visual2 [protected] |
1.4.7