SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::component::interactionforcefield::GearSpring< DataTypes > Class Template Reference

#include <GearSpringForceField.h>

Public Attributes

unsigned int m1
 
unsigned int m2
 
unsigned int p1
 the two extremities of the spring: masses m1 and m2 More...
 
unsigned int p2
 
Real previousAngle1
 the two parents of each extremity More...
 
Real previousAngle2
 
Real angle1
 
Real angle2
 
Coord ini1
 
Coord ini2
 
Real kd
 
sofa::defaulttype::Vec< 2, unsigned intfreeAxis
 damping factor More...
 
Real hardStiffnessTrans
 defines the axis where the movements is free. More...
 
Real softStiffnessRot
 stiffness to apply on axis where the translations are forbidden (default 10000.0) More...
 
Real hardStiffnessRot
 stiffness to apply on axis where the rotations are free (default 10000.0) More...
 
Real Ratio
 stiffness to apply on axis where the rotations are forbidden (default 10000.0) More...
 

Public Member Functions

 GearSpring ()
 Gear ratio (default 1) More...
 
 GearSpring (unsigned int m1, unsigned int m2, unsigned int p1, unsigned int p2)
 
 GearSpring (unsigned int m1, unsigned int m2, unsigned int p1, unsigned int p2, Real hardKst, Real softKsr, Real hardKsr, Real kd, Real ratio)
 
Real getHardStiffnessRotation ()
 
Real getSoftStiffnessRotation ()
 
Real getHardStiffnessTranslation ()
 
sofa::defaulttype::Vec< 2, unsigned intgetFreeAxis ()
 
Real getRatio ()
 
void setHardStiffnessRotation (Real ksr)
 
void setSoftStiffnessRotation (Real ksr)
 
void setHardStiffnessTranslation (Real kst)
 
void setRatio (Real ratio)
 
void setFreeAxis (const sofa::defaulttype::Vec< 2, unsigned int > &axis)
 
void setFreeAxis (unsigned int axis1, unsigned int axis2)
 
void setDamping (Real _kd)
 

Friends

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

Attribute details

template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::angle1
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::angle2
template<typename DataTypes >
sofa::defaulttype::Vec<2,unsigned int> sofa::component::interactionforcefield::GearSpring< DataTypes >::freeAxis

damping factor

template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::hardStiffnessRot

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

template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::hardStiffnessTrans

defines the axis where the movements is free.

template<typename DataTypes >
Coord sofa::component::interactionforcefield::GearSpring< DataTypes >::ini1
template<typename DataTypes >
Coord sofa::component::interactionforcefield::GearSpring< DataTypes >::ini2
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::kd
template<typename DataTypes >
unsigned int sofa::component::interactionforcefield::GearSpring< DataTypes >::m1
template<typename DataTypes >
unsigned int sofa::component::interactionforcefield::GearSpring< DataTypes >::m2
template<typename DataTypes >
unsigned int sofa::component::interactionforcefield::GearSpring< DataTypes >::p1

the two extremities of the spring: masses m1 and m2

template<typename DataTypes >
unsigned int sofa::component::interactionforcefield::GearSpring< DataTypes >::p2
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::previousAngle1

the two parents of each extremity

template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::previousAngle2
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::Ratio

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

template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::softStiffnessRot

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

Constructor details

template<class DataTypes >
sofa::component::interactionforcefield::GearSpring< DataTypes >::GearSpring ( )

Gear ratio (default 1)

constructors

template<class DataTypes >
sofa::component::interactionforcefield::GearSpring< DataTypes >::GearSpring ( unsigned int  m1,
unsigned int  m2,
unsigned int  p1,
unsigned int  p2 
)
template<class DataTypes >
sofa::component::interactionforcefield::GearSpring< DataTypes >::GearSpring ( unsigned int  m1,
unsigned int  m2,
unsigned int  p1,
unsigned int  p2,
Real  hardKst,
Real  softKsr,
Real  hardKsr,
Real  kd,
Real  ratio 
)

Function details

template<typename DataTypes >
sofa::defaulttype::Vec<2,unsigned int> sofa::component::interactionforcefield::GearSpring< DataTypes >::getFreeAxis ( )
inline
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::getHardStiffnessRotation ( )
inline
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::getHardStiffnessTranslation ( )
inline
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::getRatio ( )
inline
template<typename DataTypes >
Real sofa::component::interactionforcefield::GearSpring< DataTypes >::getSoftStiffnessRotation ( )
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setDamping ( Real  _kd)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setFreeAxis ( const sofa::defaulttype::Vec< 2, unsigned int > &  axis)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setFreeAxis ( unsigned int  axis1,
unsigned int  axis2 
)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setHardStiffnessRotation ( Real  ksr)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setHardStiffnessTranslation ( Real  kst)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setRatio ( Real  ratio)
inline
template<typename DataTypes >
void sofa::component::interactionforcefield::GearSpring< DataTypes >::setSoftStiffnessRotation ( Real  ksr)
inline

Enum details

template<typename DataTypes >
anonymous enum
Enumerator

Related details

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