Image Component Library (ICL)
|
This constraint binds an object to a point with a spring. More...
#include <Object2PointConstraint.h>
Public Member Functions | |
Object2PointConstraint (RigidObject *obj, const geom::Vec &localOffset, const geom::Vec &point, float stiffness, float damping) | |
Constructor that takes all arguments. More... | |
virtual | ~Object2PointConstraint () |
Destructor. More... | |
void | setPoint (const geom::Vec &newPoint) |
Sets the Point to which the object will be bound. More... | |
void | setLocalOffset (const geom::Vec &newLocalOffset) |
Sets the offset of the constraint in local coordinates of the object. More... | |
void | setStiffness (float newStiffness) |
Sets the stiffness of the joint. More... | |
void | setDamping (float newDamping) |
Sets the dampening of the joint. More... | |
Public Member Functions inherited from icl::physics::Constraint | |
Constraint () | |
Base cosntructor. More... | |
virtual | ~Constraint () |
Destructor. More... | |
btTypedConstraint * | getConstraint () |
Getter for the internal constraint. More... | |
std::vector< RigidObject * > & | getObjects () |
Getter for the objects involved in the constraint. More... | |
Private Attributes | |
RigidObject * | anchor |
Additional Inherited Members | |
Protected Member Functions inherited from icl::physics::Constraint | |
void | initUserPointer () |
Protected Member Functions inherited from icl::utils::Uncopyable | |
Uncopyable () | |
Empty base constructor. More... | |
Protected Attributes inherited from icl::physics::Constraint | |
btTypedConstraint * | m_constraint |
internal constraint More... | |
std::vector< RigidObject * > | m_objects |
bool | m_collide |
This constraint binds an object to a point with a spring.
icl::physics::Object2PointConstraint::Object2PointConstraint | ( | RigidObject * | obj, |
const geom::Vec & | localOffset, | ||
const geom::Vec & | point, | ||
float | stiffness, | ||
float | damping | ||
) |
Constructor that takes all arguments.
|
virtual |
Destructor.
void icl::physics::Object2PointConstraint::setDamping | ( | float | newDamping | ) |
Sets the dampening of the joint.
void icl::physics::Object2PointConstraint::setLocalOffset | ( | const geom::Vec & | newLocalOffset | ) |
Sets the offset of the constraint in local coordinates of the object.
void icl::physics::Object2PointConstraint::setPoint | ( | const geom::Vec & | newPoint | ) |
Sets the Point to which the object will be bound.
void icl::physics::Object2PointConstraint::setStiffness | ( | float | newStiffness | ) |
Sets the stiffness of the joint.
|
private |