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

This is a generic constraint that allows to free configuration of the limits on all 6 degrees of freedom. More...

#include <SixDOFConstraint.h>

Inheritance diagram for icl::physics::SixDOFConstraint:
icl::physics::Constraint icl::utils::Uncopyable icl::physics::BallSocketConstraint icl::physics::SliderConstraint icl::physics::HingeConstraint

Public Member Functions

 SixDOFConstraint (RigidObject *a, RigidObject *b, const geom::Mat &frameInA, const geom::Mat &frameInB, const bool useLinearReferenceFrameA=true)
 The frames describe the position and orientation of the pivot in the objectspaces of the 2 objects. More...
 
 SixDOFConstraint (RigidObject *a, RigidObject *b, const geom::Vec &pivotInA, const geom::Vec &pivotInB, bool useLinearReferenceFrameA=true)
 
 SixDOFConstraint (RigidObject *a, RigidObject *b, const bool useLinearReferenceFrameA=true)
 This constructor uses the identity geom::Matrices as frames. More...
 
void setFrames (const geom::Mat &frameA, const geom::Mat &frameB)
 The frames describe the position and orientation of the constraint pivot in the objectspace of the 2 objects. More...
 
void setPivot (const geom::Vec &pivotInA, const geom::Vec &pivotInB)
 
void setLinearLowerLimit (const geom::Vec &lower)
 
void setLinearUpperLimit (const geom::Vec &upper)
 
geom::Vec getLinearLowerLimit ()
 Return the lower linear limit. More...
 
geom::Vec getLinearUpperLimit ()
 Return the upper linear limit. More...
 
float getAngle (int index)
 
void setAngularLowerLimit (const geom::Vec &lower)
 
void setAngularUpperLimit (const geom::Vec &upper)
 
geom::Vec getAngularLowerLimit ()
 Return the lower angular limit. More...
 
geom::Vec getAngularUpperLimit ()
 Return the upper angular limit. More...
 
void setLinearMotor (int index, bool enableMotor, float targetVelocity, float maxMotorForce, bool force_activation=false)
 Set the angular motor settings. More...
 
void setAngularMotor (int index, bool enableMotor, float targetVelocity, float maxMotorForce, bool force_activation=false)
 Set the linear motor settings. 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 Member Functions

void init (RigidObject *a, RigidObject *b, const geom::Mat &frameInA, const geom::Mat &frameInB, const bool useLinearReferenceFrameA)
 

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 is a generic constraint that allows to free configuration of the limits on all 6 degrees of freedom.

Constructor & Destructor Documentation

◆ SixDOFConstraint() [1/3]

icl::physics::SixDOFConstraint::SixDOFConstraint ( RigidObject a,
RigidObject b,
const geom::Mat frameInA,
const geom::Mat frameInB,
const bool  useLinearReferenceFrameA = true 
)

The frames describe the position and orientation of the pivot in the objectspaces of the 2 objects.

◆ SixDOFConstraint() [2/3]

icl::physics::SixDOFConstraint::SixDOFConstraint ( RigidObject a,
RigidObject b,
const geom::Vec pivotInA,
const geom::Vec pivotInB,
bool  useLinearReferenceFrameA = true 
)

◆ SixDOFConstraint() [3/3]

icl::physics::SixDOFConstraint::SixDOFConstraint ( RigidObject a,
RigidObject b,
const bool  useLinearReferenceFrameA = true 
)

This constructor uses the identity geom::Matrices as frames.

Member Function Documentation

◆ getAngle()

float icl::physics::SixDOFConstraint::getAngle ( int  index)

◆ getAngularLowerLimit()

geom::Vec icl::physics::SixDOFConstraint::getAngularLowerLimit ( )

Return the lower angular limit.

◆ getAngularUpperLimit()

geom::Vec icl::physics::SixDOFConstraint::getAngularUpperLimit ( )

Return the upper angular limit.

◆ getLinearLowerLimit()

geom::Vec icl::physics::SixDOFConstraint::getLinearLowerLimit ( )

Return the lower linear limit.

◆ getLinearUpperLimit()

geom::Vec icl::physics::SixDOFConstraint::getLinearUpperLimit ( )

Return the upper linear limit.

◆ init()

void icl::physics::SixDOFConstraint::init ( RigidObject a,
RigidObject b,
const geom::Mat frameInA,
const geom::Mat frameInB,
const bool  useLinearReferenceFrameA 
)
private

◆ setAngularLowerLimit()

void icl::physics::SixDOFConstraint::setAngularLowerLimit ( const geom::Vec lower)

◆ setAngularMotor()

void icl::physics::SixDOFConstraint::setAngularMotor ( int  index,
bool  enableMotor,
float  targetVelocity,
float  maxMotorForce,
bool  force_activation = false 
)

Set the linear motor settings.

◆ setAngularUpperLimit()

void icl::physics::SixDOFConstraint::setAngularUpperLimit ( const geom::Vec upper)

◆ setFrames()

void icl::physics::SixDOFConstraint::setFrames ( const geom::Mat frameA,
const geom::Mat frameB 
)

The frames describe the position and orientation of the constraint pivot in the objectspace of the 2 objects.

◆ setLinearLowerLimit()

void icl::physics::SixDOFConstraint::setLinearLowerLimit ( const geom::Vec lower)

◆ setLinearMotor()

void icl::physics::SixDOFConstraint::setLinearMotor ( int  index,
bool  enableMotor,
float  targetVelocity,
float  maxMotorForce,
bool  force_activation = false 
)

Set the angular motor settings.

◆ setLinearUpperLimit()

void icl::physics::SixDOFConstraint::setLinearUpperLimit ( const geom::Vec upper)

◆ setPivot()

void icl::physics::SixDOFConstraint::setPivot ( const geom::Vec pivotInA,
const geom::Vec pivotInB 
)

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