#include <RopeJoint2D.hpp>
|
| RopeJoint2D (World2D &worldRef, RigidBody2D &bodyA, RigidBody2D &bodyB, const bool collide, const glm::vec2 &anchorA=glm::vec2(0.f, 0.f), const glm::vec2 &anchorB=glm::vec2(0.f, 0.f)) |
| RopeJoint2D constructor. More...
|
|
std::pair< float, float > | getDamping () const |
|
RopeJoint2D & | setDamping (const float frequency, const float damping) |
|
| 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 RopeJoint2D.hpp.
jop::RopeJoint2D::RopeJoint2D |
( |
World2D & |
worldRef, |
|
|
RigidBody2D & |
bodyA, |
|
|
RigidBody2D & |
bodyB, |
|
|
const bool |
collide, |
|
|
const glm::vec2 & |
anchorA = glm::vec2(0.f, 0.f) , |
|
|
const glm::vec2 & |
anchorB = glm::vec2(0.f, 0.f) |
|
) |
| |
RopeJoint2D constructor.
Creates a link / rope between the bodies. For longer ropes, ropes made from several rigidbodies and attached one after another should be used.
- Parameters
-
anchorA | Anchor point in local coordinates. Please use values between -1.f - +1.f. Defaults to the center of the body. |
anchorB | Anchor point in local coordinates. Please use values between -1.f - +1.f. Defaults to the center of the body. |
std::pair<float, float> jop::RopeJoint2D::getDamping |
( |
| ) |
const |
- Returns
- Returns damping values: first = frequency, second = damping.
RopeJoint2D& jop::RopeJoint2D::setDamping |
( |
const float |
frequency, |
|
|
const float |
damping |
|
) |
| |
- Parameters
-
frequency | Damping frequency in Hz. |
damping | Damping ratio. Please use values between 0.f - 1.0f. |
- Returns
- Returns reference to self.
The documentation for this class was generated from the following file: