![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <WeldJoint2D.hpp>
Public Member Functions | |
| WeldJoint2D (World2D &worldRef, RigidBody2D &bodyA, RigidBody2D &bodyB, const bool collide) | |
| WeldJoint2D constructor. More... | |
| WeldJoint2D & | setDamping (const float frequency, const float damping) |
| Set new damping values. More... | |
| std::pair< float, float > | getDamping () const |
Public Member Functions inherited from jop::Joint2D | |
| Joint2D (World2D &worldRef, RigidBody2D &bodyA, RigidBody2D &bodyB, const bool collide) | |
| Joint2D constructor. More... | |
| virtual | ~Joint2D ()=0 |
| unsigned int | getID () const |
| Get joint ID. More... | |
| Joint2D & | setID (const unsigned int id) |
| Set new ID for the joint. More... | |
Additional Inherited Members | |
Public Attributes inherited from jop::Joint2D | |
| World2D * | m_worldRef |
| Pointer to the world. More... | |
| RigidBody2D * | m_bodyA |
| Pointer to bodyA. More... | |
| RigidBody2D * | m_bodyB |
| Pointer to bodyB. More... | |
Static Protected Member Functions inherited from jop::Joint2D | |
| static b2Body * | getBody (RigidBody2D &body) |
| Return engine internal pointer to body. More... | |
Protected Attributes inherited from jop::Joint2D | |
| bool | m_collide |
| Should the linked bodies collide. More... | |
| b2Joint * | m_joint |
| Pointer to Box2D joint. More... | |
| unsigned int | m_ID |
| Joint ID. More... | |
Definition at line 37 of file WeldJoint2D.hpp.
| jop::WeldJoint2D::WeldJoint2D | ( | World2D & | worldRef, |
| RigidBody2D & | bodyA, | ||
| RigidBody2D & | bodyB, | ||
| const bool | collide | ||
| ) |
WeldJoint2D constructor.
Welds two bodies together. Moving one body moves the other in similiar way.
| std::pair<float, float> jop::WeldJoint2D::getDamping | ( | ) | const |
| WeldJoint2D& jop::WeldJoint2D::setDamping | ( | const float | frequency, |
| const float | damping | ||
| ) |
Set new damping values.
| frequency | Damping frequency in Hz. |
| damping | Damping ratio. Please use values between 0.f - 1.f. |
1.8.11