Image Component Library (ICL)
Public Member Functions | Private Attributes | List of all members
icl::physics::Object2PointConstraint Class Reference

This constraint binds an object to a point with a spring. More...

#include <Object2PointConstraint.h>

Inheritance diagram for icl::physics::Object2PointConstraint:
icl::physics::Constraint icl::utils::Uncopyable

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

RigidObjectanchor
 

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
 

Detailed Description

This constraint binds an object to a point with a spring.

Constructor & Destructor Documentation

◆ Object2PointConstraint()

icl::physics::Object2PointConstraint::Object2PointConstraint ( RigidObject obj,
const geom::Vec localOffset,
const geom::Vec point,
float  stiffness,
float  damping 
)

Constructor that takes all arguments.

◆ ~Object2PointConstraint()

virtual icl::physics::Object2PointConstraint::~Object2PointConstraint ( )
virtual

Destructor.

Member Function Documentation

◆ setDamping()

void icl::physics::Object2PointConstraint::setDamping ( float  newDamping)

Sets the dampening of the joint.

◆ setLocalOffset()

void icl::physics::Object2PointConstraint::setLocalOffset ( const geom::Vec newLocalOffset)

Sets the offset of the constraint in local coordinates of the object.

◆ setPoint()

void icl::physics::Object2PointConstraint::setPoint ( const geom::Vec newPoint)

Sets the Point to which the object will be bound.

◆ setStiffness()

void icl::physics::Object2PointConstraint::setStiffness ( float  newStiffness)

Sets the stiffness of the joint.

Member Data Documentation

◆ anchor

RigidObject* icl::physics::Object2PointConstraint::anchor
private

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