#include <spPhysicsJoint.hpp>
Public Member Functions | |
| virtual | ~PhysicsJoint () |
| virtual void | setPosition (const dim::vector3df &Position)=0 |
| virtual dim::vector3df | getPosition () const =0 |
| virtual void | translate (const dim::vector3df &Direction) |
| virtual void | setLimit (bool Enable)=0 |
| virtual bool | getLimit () const =0 |
| virtual void | setLimit (f32 Min, f32 Max, bool Enable=true)=0 |
| Sets the limitation values. This can be either an angle or linear value. | |
| virtual void | getLimit (f32 &Min, f32 &Max) const =0 |
| virtual void | setMotor (bool Enable, f32 MotorPower=100.0f)=0 |
| virtual bool | getMotor () const =0 |
| virtual void | runMotor (f32 Velocity)=0 |
| virtual f32 | getLinearValue () const =0 |
| Returns the joint linear value. This can also be an angle (for a hinge-joint). | |
| EPhysicsJoints | getType () const |
| Returns the type of this joint. | |
| PhysicsBaseObject * | getFirstObject () const |
| Returns a pointer to the first joint's physics object. | |
| PhysicsBaseObject * | getSecondObject () const |
| Returns a pointer to the second joint's physics object. | |
Protected Member Functions | |
| PhysicsJoint (const EPhysicsJoints Type, PhysicsBaseObject *ObjectA, PhysicsBaseObject *ObjectB) | |
Protected Attributes | |
| EPhysicsJoints | Type_ |
| PhysicsBaseObject * | ObjectA_ |
| PhysicsBaseObject * | ObjectB_ |
This is the physics joint class. In some physics engines this is called a "constraint". This class represents any kind of physics joints, i.e. ball, hinge, slider etc. e.g. a hinge can be used for doors or wheels.
| virtual sp::physics::PhysicsJoint::~PhysicsJoint | ( | ) | [virtual] |
| sp::physics::PhysicsJoint::PhysicsJoint | ( | const EPhysicsJoints | Type, | |
| PhysicsBaseObject * | ObjectA, | |||
| PhysicsBaseObject * | ObjectB | |||
| ) | [protected] |
| PhysicsBaseObject* sp::physics::PhysicsJoint::getFirstObject | ( | ) | const [inline] |
Returns a pointer to the first joint's physics object.
| virtual bool sp::physics::PhysicsJoint::getLimit | ( | ) | const [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual f32 sp::physics::PhysicsJoint::getLinearValue | ( | ) | const [pure virtual] |
Returns the joint linear value. This can also be an angle (for a hinge-joint).
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual bool sp::physics::PhysicsJoint::getMotor | ( | ) | const [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual dim::vector3df sp::physics::PhysicsJoint::getPosition | ( | ) | const [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| PhysicsBaseObject* sp::physics::PhysicsJoint::getSecondObject | ( | ) | const [inline] |
Returns a pointer to the second joint's physics object.
| EPhysicsJoints sp::physics::PhysicsJoint::getType | ( | ) | const [inline] |
Returns the type of this joint.
| virtual void sp::physics::PhysicsJoint::runMotor | ( | f32 | Velocity | ) | [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual void sp::physics::PhysicsJoint::setLimit | ( | bool | Enable | ) | [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual void sp::physics::PhysicsJoint::setLimit | ( | f32 | Min, | |
| f32 | Max, | |||
| bool | Enable = true | |||
| ) | [pure virtual] |
Sets the limitation values. This can be either an angle or linear value.
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual void sp::physics::PhysicsJoint::setMotor | ( | bool | Enable, | |
| f32 | MotorPower = 100.0f | |||
| ) | [pure virtual] |
Activates the motor interaction.
| Enable,: | Specifies whether the hinge motor is to be enabled or disabled. By default disabled. Once the motor is enabled it runs until it will be disabled. | |
| MotorPower,: | Specifies the power of the motor. This should be at least the mass of the heaviest rigid body which is connected to this joint. |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual void sp::physics::PhysicsJoint::setPosition | ( | const dim::vector3df & | Position | ) | [pure virtual] |
Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.
| virtual void sp::physics::PhysicsJoint::translate | ( | const dim::vector3df & | Direction | ) | [virtual] |
PhysicsBaseObject* sp::physics::PhysicsJoint::ObjectA_ [protected] |
PhysicsBaseObject* sp::physics::PhysicsJoint::ObjectB_ [protected] |
EPhysicsJoints sp::physics::PhysicsJoint::Type_ [protected] |
1.7.1