Jopnal Engine  alpha 0.4
Simple Component Based 2D/3D Game Engine
Public Member Functions | List of all members
jop::RotationJoint Class Reference

#include <RotationJoint.hpp>

Inheritance diagram for jop::RotationJoint:
jop::Joint

Public Member Functions

 RotationJoint (World &worldRef, RigidBody &bodyA, RigidBody &bodyB, const bool collide, const glm::vec3 &anchor=glm::vec3(0.f, 0.f, FLT_MAX))
 RotationJoint constructor. More...
 
glm::vec3 getAngLimits (const bool lower) const
 
RotationJointsetAngLimits (const bool lower, const glm::vec3 &limits)
 
- Public Member Functions inherited from jop::Joint
 Joint (World &worldRef, RigidBody &bodyA, RigidBody &bodyB, const bool collide)
 Joint constructor. More...
 
virtual ~Joint ()=0
 
unsigned int getID () const
 Get joint ID. More...
 
JointsetID (const unsigned int id)
 Set new ID for the joint. More...
 

Additional Inherited Members

- Public Attributes inherited from jop::Joint
Worldm_worldRef
 Pointer to the world. More...
 
RigidBodym_bodyA
 Pointer to bodyA. More...
 
RigidBodym_bodyB
 Pointer to bodyB. More...
 
- Protected Member Functions inherited from jop::Joint
btRigidBody * getBody (RigidBody &body) const
 Return engine internal pointer to body. More...
 
btDiscreteDynamicsWorld & getWorld (World &world) const
 Return engine internal pointer to world. More...
 
glm::vec3 defaultCenter (const glm::vec3 &jPos) const
 
glm::vec3 computeCenter () const
 Calculates the point in the middle between this' m_bodies. More...
 
- Protected Attributes inherited from jop::Joint
bool m_collide
 
std::unique_ptr< btTypedConstraint > m_joint
 < Should the linked bodies collide. More...
 
unsigned int m_ID
 Joint ID. More...
 

Detailed Description

Definition at line 35 of file RotationJoint.hpp.

Constructor & Destructor Documentation

jop::RotationJoint::RotationJoint ( World worldRef,
RigidBody bodyA,
RigidBody bodyB,
const bool  collide,
const glm::vec3 &  anchor = glm::vec3(0.f, 0.f, FLT_MAX) 
)

RotationJoint constructor.

Parameters
anchorPosition of the joint in world coordinates. Default in the middle between the bodies.

Member Function Documentation

glm::vec3 jop::RotationJoint::getAngLimits ( const bool  lower) const
Parameters
lowerTrue = return lower limits. False = return upper limits.
Returns
Returns desired limits of the joint.
RotationJoint& jop::RotationJoint::setAngLimits ( const bool  lower,
const glm::vec3 &  limits 
)

Set new rotational limits for the joint in radians.

Parameters
lowerTrue = set lower limits. False = set upper limits.
limitsNew limits to set to the joint.
Returns
Returns reference to self.

The documentation for this class was generated from the following file: