SOFA API  1a4bb3e7
Open source framework for multi-physics simuation
sofa::component::solidmechanics::spring::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::type::Vec< 2, unsigned int > freeAxis
 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::type::Vec< 2, unsigned int > getFreeAxis ()
 
Real getRatio ()
 
void setHardStiffnessRotation (Real ksr)
 
void setSoftStiffnessRotation (Real ksr)
 
void setHardStiffnessTranslation (Real kst)
 
void setRatio (Real ratio)
 
void setFreeAxis (const sofa::type::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

◆ angle1

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::angle1

◆ angle2

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::angle2

◆ freeAxis

template<typename DataTypes >
sofa::type::Vec<2,unsigned int> sofa::component::solidmechanics::spring::GearSpring< DataTypes >::freeAxis

damping factor

◆ hardStiffnessRot

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

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

◆ hardStiffnessTrans

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

defines the axis where the movements is free.

◆ ini1

◆ ini2

◆ kd

◆ m1

template<typename DataTypes >
unsigned int sofa::component::solidmechanics::spring::GearSpring< DataTypes >::m1

◆ m2

template<typename DataTypes >
unsigned int sofa::component::solidmechanics::spring::GearSpring< DataTypes >::m2

◆ p1

template<typename DataTypes >
unsigned int sofa::component::solidmechanics::spring::GearSpring< DataTypes >::p1

the two extremities of the spring: masses m1 and m2

◆ p2

template<typename DataTypes >
unsigned int sofa::component::solidmechanics::spring::GearSpring< DataTypes >::p2

◆ previousAngle1

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::previousAngle1

the two parents of each extremity

◆ previousAngle2

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::previousAngle2

◆ Ratio

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::Ratio

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

◆ softStiffnessRot

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

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

Constructor details

◆ GearSpring() [1/3]

Gear ratio (default 1)

constructors

◆ GearSpring() [2/3]

template<class DataTypes >
sofa::component::solidmechanics::spring::GearSpring< DataTypes >::GearSpring ( unsigned int  m1,
unsigned int  m2,
unsigned int  p1,
unsigned int  p2 
)

◆ GearSpring() [3/3]

template<class DataTypes >
sofa::component::solidmechanics::spring::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

◆ getFreeAxis()

template<typename DataTypes >
sofa::type::Vec<2,unsigned int> sofa::component::solidmechanics::spring::GearSpring< DataTypes >::getFreeAxis ( )
inline

◆ getHardStiffnessRotation()

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

◆ getHardStiffnessTranslation()

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

◆ getRatio()

template<typename DataTypes >
Real sofa::component::solidmechanics::spring::GearSpring< DataTypes >::getRatio ( )
inline

◆ getSoftStiffnessRotation()

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

◆ setDamping()

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

◆ setFreeAxis() [1/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::GearSpring< DataTypes >::setFreeAxis ( const sofa::type::Vec< 2, unsigned int > &  axis)
inline

◆ setFreeAxis() [2/2]

template<typename DataTypes >
void sofa::component::solidmechanics::spring::GearSpring< DataTypes >::setFreeAxis ( unsigned int  axis1,
unsigned int  axis2 
)
inline

◆ setHardStiffnessRotation()

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

◆ setHardStiffnessTranslation()

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

◆ setRatio()

template<typename DataTypes >
void sofa::component::solidmechanics::spring::GearSpring< DataTypes >::setRatio ( Real  ratio)
inline

◆ setSoftStiffnessRotation()

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

Enum details

◆ anonymous enum

template<typename DataTypes >
anonymous enum
Enumerator

Related details

◆ operator<<

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

◆ operator>>

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