Public Member Functions | Protected Member Functions | Protected Attributes

sp::physics::PhysicsJoint Class Reference

#include <spPhysicsJoint.hpp>

Inheritance diagram for sp::physics::PhysicsJoint:
sp::physics::NewtonDynamicsJoint sp::physics::PhysXJoint

List of all members.

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.
PhysicsBaseObjectgetFirstObject () const
 Returns a pointer to the first joint's physics object.
PhysicsBaseObjectgetSecondObject () 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_
PhysicsBaseObjectObjectA_
PhysicsBaseObjectObjectB_

Detailed Description

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.


Constructor & Destructor Documentation

virtual sp::physics::PhysicsJoint::~PhysicsJoint (  )  [virtual]
sp::physics::PhysicsJoint::PhysicsJoint ( const EPhysicsJoints  Type,
PhysicsBaseObject ObjectA,
PhysicsBaseObject ObjectB 
) [protected]

Member Function Documentation

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]
virtual void sp::physics::PhysicsJoint::getLimit ( f32 Min,
f32 Max 
) const [pure virtual]
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]
virtual dim::vector3df sp::physics::PhysicsJoint::getPosition (  )  const [pure virtual]
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]
virtual void sp::physics::PhysicsJoint::setLimit ( bool  Enable  )  [pure virtual]
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.

Parameters:
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.
See also:
getMotor

Implemented in sp::physics::NewtonDynamicsJoint, and sp::physics::PhysXJoint.

virtual void sp::physics::PhysicsJoint::setPosition ( const dim::vector3df Position  )  [pure virtual]
virtual void sp::physics::PhysicsJoint::translate ( const dim::vector3df Direction  )  [virtual]

Member Data Documentation


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines