SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::solidmechanics::spring::JointSpring< DataTypes > Class Template Reference

#include <JointSpring.h>

JOINTSPRING. More...

Detailed Description

template<typename DataTypes>
class sofa::component::solidmechanics::spring::JointSpring< DataTypes >

JOINTSPRING.

Public Attributes

sofa::Index m1
 Attributes. More...
 
sofa::Index m2
 the two extremities of the spring: masses m1 and m2 More...
 
Real kd
 damping factor More...
 
Vector torsion
 torsion of the springs in axis/angle format More...
 
Vector lawfulTorsion
 projected torsion in allowed angles More...
 
Vector KT
 linear stiffness More...
 
Vector KR
 angular stiffness More...
 
type::Quat< SReal > ref
 referential of the spring (p1) to use it in addSpringDForce() More...
 
Vector initTrans
 offset length of the spring More...
 
type::Quat< SReal > initRot
 offset orientation of the spring More...
 
sofa::type::Vec< 6, boolfreeMovements
 defines the axis where the movements is free. (0,1,2)--> translation axis (3,4,5)-->rotation axis More...
 
Real softStiffnessTrans
 stiffness to apply on axis where the translations are free (default 0.0) More...
 
Real hardStiffnessTrans
 stiffness to apply on axis where the translations are forbidden (default 10000.0) More...
 
Real softStiffnessRot
 stiffness to apply on axis where the rotations are free (default 0.0) More...
 
Real hardStiffnessRot
 stiffness to apply on axis where the rotations are forbidden (default 10000.0) More...
 
Real blocStiffnessRot
 stiffness to apply on axis where the rotations are bloqued (=hardStiffnessRot/100) More...
 
bool needToInitializeTrans
 
bool needToInitializeRot
 
sofa::type::Vec< 6, ReallimitAngles
 limit angles on rotation axis (default no limit) More...
 

Public Member Functions

 JointSpring (sofa::Index m1=0, sofa::Index m2=0, Real softKst=0, Real hardKst=10000, Real softKsr=0, Real hardKsr=10000, Real blocKsr=100, Real axmin=-100000, Real axmax=100000, Real aymin=-100000, Real aymax=100000, Real azmin=-100000, Real azmax=100000, Real kd=0)
 Constructors. More...
 
Real getHardStiffnessRotation ()
 Accessors. More...
 
Real getSoftStiffnessRotation ()
 
Real getHardStiffnessTranslation ()
 
Real getSoftStiffnessTranslation ()
 
Real getBlocStiffnessRotation ()
 
sofa::type::Vec< 6, RealgetLimitAngles ()
 
sofa::type::Vec< 6, boolgetFreeAxis ()
 
Vector getInitLength ()
 
type::Quat< SReal > getInitOrientation ()
 
void setHardStiffnessRotation (Real ksr)
 Affectors. More...
 
void setSoftStiffnessRotation (Real ksr)
 
void setHardStiffnessTranslation (Real kst)
 
void setSoftStiffnessTranslation (Real kst)
 
void setBlocStiffnessRotation (Real ksb)
 
void setLimitAngles (const sofa::type::Vec< 6, Real > &lims)
 
void setLimitAngles (Real minx, Real maxx, Real miny, Real maxy, Real minz, Real maxz)
 
void setInitLength (const Vector &l)
 
void setInitOrientation (const type::Quat< SReal > &o)
 
void setInitOrientation (const Vector &o)
 
void setFreeAxis (const sofa::type::Vec< 6, bool > &axis)
 
void setFreeAxis (bool isFreeTx, bool isFreeTy, bool isFreeTz, bool isFreeRx, bool isFreeRy, bool isFreeRz)
 
void setDamping (Real _kd)
 

Friends

std::istream & operator>> (std::istream &in, JointSpring< DataTypes > &s)
 
std::ostream & operator<< (std::ostream &out, const JointSpring< DataTypes > &s)
 

Attribute details

◆ blocStiffnessRot

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::blocStiffnessRot

stiffness to apply on axis where the rotations are bloqued (=hardStiffnessRot/100)

◆ freeMovements

template<typename DataTypes >
sofa::type::Vec<6,bool> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::freeMovements

defines the axis where the movements is free. (0,1,2)--> translation axis (3,4,5)-->rotation axis

◆ hardStiffnessRot

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::hardStiffnessRot

stiffness to apply on axis where the rotations are forbidden (default 10000.0)

◆ hardStiffnessTrans

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::hardStiffnessTrans

stiffness to apply on axis where the translations are forbidden (default 10000.0)

◆ initRot

template<typename DataTypes >
type::Quat<SReal> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::initRot

offset orientation of the spring

◆ initTrans

template<typename DataTypes >
Vector sofa::component::solidmechanics::spring::JointSpring< DataTypes >::initTrans

offset length of the spring

◆ kd

damping factor

◆ KR

angular stiffness

◆ KT

linear stiffness

◆ lawfulTorsion

template<typename DataTypes >
Vector sofa::component::solidmechanics::spring::JointSpring< DataTypes >::lawfulTorsion

projected torsion in allowed angles

◆ limitAngles

template<typename DataTypes >
sofa::type::Vec<6,Real> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::limitAngles

limit angles on rotation axis (default no limit)

◆ m1

template<typename DataTypes >
sofa::Index sofa::component::solidmechanics::spring::JointSpring< DataTypes >::m1

Attributes.

◆ m2

template<typename DataTypes >
sofa::Index sofa::component::solidmechanics::spring::JointSpring< DataTypes >::m2

the two extremities of the spring: masses m1 and m2

◆ needToInitializeRot

template<typename DataTypes >
bool sofa::component::solidmechanics::spring::JointSpring< DataTypes >::needToInitializeRot

◆ needToInitializeTrans

template<typename DataTypes >
bool sofa::component::solidmechanics::spring::JointSpring< DataTypes >::needToInitializeTrans

◆ ref

template<typename DataTypes >
type::Quat<SReal> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::ref

referential of the spring (p1) to use it in addSpringDForce()

◆ softStiffnessRot

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::softStiffnessRot

stiffness to apply on axis where the rotations are free (default 0.0)

◆ softStiffnessTrans

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::softStiffnessTrans

stiffness to apply on axis where the translations are free (default 0.0)

◆ torsion

template<typename DataTypes >
Vector sofa::component::solidmechanics::spring::JointSpring< DataTypes >::torsion

torsion of the springs in axis/angle format

Constructor details

◆ JointSpring()

template<class DataTypes >
sofa::component::solidmechanics::spring::JointSpring< DataTypes >::JointSpring ( sofa::Index  m1 = 0,
sofa::Index  m2 = 0,
Real  softKst = 0,
Real  hardKst = 10000,
Real  softKsr = 0,
Real  hardKsr = 10000,
Real  blocKsr = 100,
Real  axmin = -100000,
Real  axmax = 100000,
Real  aymin = -100000,
Real  aymax = 100000,
Real  azmin = -100000,
Real  azmax = 100000,
Real  kd = 0 
)

Constructors.

Function details

◆ getBlocStiffnessRotation()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getBlocStiffnessRotation ( )
inline

◆ getFreeAxis()

template<typename DataTypes >
sofa::type::Vec<6,bool> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getFreeAxis ( )
inline

◆ getHardStiffnessRotation()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getHardStiffnessRotation ( )
inline

Accessors.

◆ getHardStiffnessTranslation()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getHardStiffnessTranslation ( )
inline

◆ getInitLength()

template<typename DataTypes >
Vector sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getInitLength ( )
inline

◆ getInitOrientation()

template<typename DataTypes >
type::Quat<SReal> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getInitOrientation ( )
inline

◆ getLimitAngles()

template<typename DataTypes >
sofa::type::Vec<6,Real> sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getLimitAngles ( )
inline

◆ getSoftStiffnessRotation()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getSoftStiffnessRotation ( )
inline

◆ getSoftStiffnessTranslation()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::JointSpring< DataTypes >::getSoftStiffnessTranslation ( )
inline

◆ setBlocStiffnessRotation()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setBlocStiffnessRotation ( Real  ksb)
inline

◆ setDamping()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setDamping ( Real  _kd)
inline

◆ setFreeAxis() [1/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setFreeAxis ( bool  isFreeTx,
bool  isFreeTy,
bool  isFreeTz,
bool  isFreeRx,
bool  isFreeRy,
bool  isFreeRz 
)
inline

◆ setFreeAxis() [2/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setFreeAxis ( const sofa::type::Vec< 6, bool > &  axis)
inline

◆ setHardStiffnessRotation()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setHardStiffnessRotation ( Real  ksr)
inline

Affectors.

◆ setHardStiffnessTranslation()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setHardStiffnessTranslation ( Real  kst)
inline

◆ setInitLength()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setInitLength ( const Vector l)
inline

◆ setInitOrientation() [1/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setInitOrientation ( const type::Quat< SReal > &  o)
inline

◆ setInitOrientation() [2/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setInitOrientation ( const Vector o)
inline

◆ setLimitAngles() [1/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setLimitAngles ( const sofa::type::Vec< 6, Real > &  lims)
inline

◆ setLimitAngles() [2/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setLimitAngles ( Real  minx,
Real  maxx,
Real  miny,
Real  maxy,
Real  minz,
Real  maxz 
)
inline

◆ setSoftStiffnessRotation()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setSoftStiffnessRotation ( Real  ksr)
inline

◆ setSoftStiffnessTranslation()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::JointSpring< DataTypes >::setSoftStiffnessTranslation ( Real  kst)
inline

Enum details

◆ anonymous enum

template<typename DataTypes >
anonymous enum
Enumerator

Related details

◆ operator<<

template<typename DataTypes >
std::ostream& operator<< ( std::ostream &  out,
const JointSpring< DataTypes > &  s 
)
friend

◆ operator>>

template<typename DataTypes >
std::istream& operator>> ( std::istream &  in,
JointSpring< DataTypes > &  s 
)
friend