#include <WheelJoint2D.hpp>
|
| WheelJoint2D (World2D &worldRef, RigidBody2D &bodyA, RigidBody2D &bodyB, const bool collide, const glm::vec2 &axis, const glm::vec2 &localAnchorA, const glm::vec2 &localAnchorB=glm::vec2(0.f, 0.f)) |
| WheelJoint2D constructor. More...
|
|
WheelJoint2D & | setDamping (const float frequency, const float damping) |
|
std::pair< float, float > | getDamping () const |
|
| 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...
|
|
Definition at line 38 of file WheelJoint2D.hpp.
jop::WheelJoint2D::WheelJoint2D |
( |
World2D & |
worldRef, |
|
|
RigidBody2D & |
bodyA, |
|
|
RigidBody2D & |
bodyB, |
|
|
const bool |
collide, |
|
|
const glm::vec2 & |
axis, |
|
|
const glm::vec2 & |
localAnchorA, |
|
|
const glm::vec2 & |
localAnchorB = glm::vec2(0.f, 0.f) |
|
) |
| |
WheelJoint2D constructor.
Used to create rotating wheels.
- Parameters
-
axis | Single axis where movement is allowed. |
localAnchorA | Given in world units in relation to the target body center. |
localAnchorB | Given in local units. Defaults to the center of the wheel. Should be left empty unless user wants funny wheels. |
std::pair<float, float> jop::WheelJoint2D::getDamping |
( |
| ) |
const |
- Returns
- Returns current damping values: first = frequency, second = damping.
WheelJoint2D& jop::WheelJoint2D::setDamping |
( |
const float |
frequency, |
|
|
const float |
damping |
|
) |
| |
Set new damping values.
- Parameters
-
frequency | Damping frequency in Hz. |
damping | Damping value. Please use values between 0.f - 1.f. |
- Returns
- Returns reference to self.
The documentation for this class was generated from the following file: