#include <GearJoint.hpp>
|
| GearJoint (World &worldRef, RigidBody &bodyA, RigidBody &bodyB, const bool collide, const glm::vec3 &rotAxisA, const glm::vec3 &rotAxisB, const float ratio=1.f) |
| GearJoint constructor. More...
|
|
glm::vec3 | getAxis (const bool bodyA=true) const |
|
float | getRatio () const |
|
GearJoint & | setAxis (const glm::vec3 &axis, const bool bodyA=true) |
|
GearJoint & | setRatio (const float ratio) |
|
| Joint (World &worldRef, RigidBody &bodyA, RigidBody &bodyB, const bool collide) |
| Joint constructor. More...
|
|
virtual | ~Joint ()=0 |
|
unsigned int | getID () const |
| Get joint ID. More...
|
|
Joint & | setID (const unsigned int id) |
| Set new ID for the joint. More...
|
|
Definition at line 36 of file GearJoint.hpp.
jop::GearJoint::GearJoint |
( |
World & |
worldRef, |
|
|
RigidBody & |
bodyA, |
|
|
RigidBody & |
bodyB, |
|
|
const bool |
collide, |
|
|
const glm::vec3 & |
rotAxisA, |
|
|
const glm::vec3 & |
rotAxisB, |
|
|
const float |
ratio = 1.f |
|
) |
| |
GearJoint constructor.
- Parameters
-
rotAxisA | Local axis of bodyA in which to apply and observe rotation. |
rotAxisB | Local axis of bodyB in which to apply and observe rotation. |
ratio | Ratio between the linked bodies. |
glm::vec3 jop::GearJoint::getAxis |
( |
const bool |
bodyA = true | ) |
const |
- Parameters
-
bodyA | Body which axis to get. True for bodyA, false for bodyB. Default true. |
- Returns
- Returns current target vector
float jop::GearJoint::getRatio |
( |
| ) |
const |
- Returns
- Returns current ratio of the joint.
GearJoint& jop::GearJoint::setAxis |
( |
const glm::vec3 & |
axis, |
|
|
const bool |
bodyA = true |
|
) |
| |
- Parameters
-
axis | Axis to use |
bodyA | Body which axis to get. True for bodyA, false for bodyB. Default true. |
- Returns
- Returns reference to self.
GearJoint& jop::GearJoint::setRatio |
( |
const float |
ratio | ) |
|
- Parameters
-
ratio | New ratio to use in the joint. |
- Returns
- Returns reference to self.
The documentation for this class was generated from the following file: