SOFA API  014b24ea
Open source framework for multi-physics simuation
sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring Class Reference

#include <FrameSpringForceField.h>

Public Attributes

int m1
 
int m2
 
VecN vec1
 the two extremities of the spring: masses m1 and m2 ( indexes of the DOFs) More...
 
VecN vec2
 
Real kd
 
Real stiffnessTrans
 damping factor More...
 
Real stiffnessRot
 stiffness to apply on axis where the translations are free (default 0.0) More...
 

Public Member Functions

 Spring (int m1=0, int m2=0, Real softKst=0, Real softKsr=0, Real kd=0)
 stiffness to apply on axis where the rotations are free (default 0.0) More...
 
Real getStiffnessRotation ()
 
Real getStiffnessTranslation ()
 
VecN getInitVec1 ()
 
void setStiffnessRotation (Real ksr)
 
void setStiffnessTranslation (Real kst)
 
void setInitVec1 (const VecN &l)
 
void setInitVec2 (const VecN &l)
 
void setDamping (Real _kd)
 

Friends

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

Attribute details

template<class DataTypes >
Real sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::stiffnessRot

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

template<class DataTypes >
Real sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::stiffnessTrans

damping factor

the two extremities of the spring: masses m1 and m2 ( indexes of the DOFs)

Constructor details

template<class DataTypes >
sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::Spring ( int  m1 = 0,
int  m2 = 0,
Real  softKst = 0,
Real  softKsr = 0,
Real  kd = 0 
)
inline

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

constructors

Function details

template<class DataTypes >
VecN sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::getInitVec1 ( )
inline
template<class DataTypes >
Real sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::getStiffnessRotation ( )
inline
template<class DataTypes >
Real sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::getStiffnessTranslation ( )
inline
template<class DataTypes >
void sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::setDamping ( Real  _kd)
inline
template<class DataTypes >
void sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::setInitVec1 ( const VecN l)
inline
template<class DataTypes >
void sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::setInitVec2 ( const VecN l)
inline
template<class DataTypes >
void sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::setStiffnessRotation ( Real  ksr)
inline
template<class DataTypes >
void sofa::component::interactionforcefield::FrameSpringForceField< DataTypes >::Spring::setStiffnessTranslation ( Real  kst)
inline

Related details

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