#include <Joint.hpp>
Definition at line 43 of file Joint.hpp.
Joint constructor.
- Parameters
-
worldRef | Reference to the current world. Obtained and handled by the engine. |
bodyA | RigidBody where to attach this joint. Received automatically from the calling function. |
bodyB | RigidBody in which to attach the second end of the joint. Given by user as the first argument. |
collide | Boolean whether the linked bodies should collide with each other. |
virtual jop::Joint::~Joint |
( |
| ) |
|
|
pure virtual |
glm::vec3 jop::Joint::computeCenter |
( |
| ) |
const |
|
protected |
Calculates the point in the middle between this' m_bodies.
- Returns
- Returns the point as glm::vec3.
glm::vec3 jop::Joint::defaultCenter |
( |
const glm::vec3 & |
jPos | ) |
const |
|
protected |
Checks if the joint position is default (declared in the function) Returns the current position if not default. Returns the middle between the m_bodies if default.
- Parameters
-
jPos | Current position of the joint. |
- Returns
- Returns the joint position as glm::vec3.
btRigidBody* jop::Joint::getBody |
( |
RigidBody & |
body | ) |
const |
|
protected |
Return engine internal pointer to body.
- Parameters
-
- Returns
- Returns pointer to Box2D body.
unsigned int jop::Joint::getID |
( |
| ) |
const |
Get joint ID.
- Returns
- Returns ID of the joint.
btDiscreteDynamicsWorld& jop::Joint::getWorld |
( |
World & |
world | ) |
const |
|
protected |
Return engine internal pointer to world.
- Parameters
-
- Returns
- Returns reference to Bullet world.
Joint& jop::Joint::setID |
( |
const unsigned int |
id | ) |
|
Set new ID for the joint.
- Parameters
-
- Returns
- Returns reference to self.
Pointer to bodyA.
Definition at line 75 of file Joint.hpp.
Pointer to bodyB.
Definition at line 76 of file Joint.hpp.
bool jop::Joint::m_collide |
|
protected |
unsigned int jop::Joint::m_ID |
|
protected |
std::unique_ptr<btTypedConstraint> jop::Joint::m_joint |
|
protected |
< Should the linked bodies collide.
Pointer to Bullet joint.
Definition at line 113 of file Joint.hpp.
World* jop::Joint::m_worldRef |
Pointer to the world.
Definition at line 74 of file Joint.hpp.
The documentation for this class was generated from the following file: