sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring Class Reference

#include <JointSpringForceField.h>

Collaboration diagram for sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring:

Collaboration graph
[legend]

Public Member Functions

 Spring ()
 constructors
 Spring (int m1, int m2)
 Spring (int m1, int m2, Real softKst, Real hardKst, Real softKsr, Real hardKsr, Real blocKsr, Real axmin, Real axmax, Real aymin, Real aymax, Real azmin, Real azmax, Real kd)
Real getHardStiffnessRotation ()
Real getSoftStiffnessRotation ()
Real getHardStiffnessTranslation ()
Real getSoftStiffnessTranslation ()
Real getBlocStiffnessRotation ()
sofa::defaulttype::Vec< 6, Real > getLimitAngles ()
sofa::defaulttype::Vec< 6, bool > getFreeAxis ()
Vector getInitLength ()
Quat getInitOrientation ()
void setHardStiffnessRotation (Real ksr)
void setSoftStiffnessRotation (Real ksr)
void setHardStiffnessTranslation (Real kst)
void setSoftStiffnessTranslation (Real kst)
void setBlocStiffnessRotation (Real ksb)
void setLimitAngles (const sofa::defaulttype::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 Quat &o)
void setInitOrientation (const Vector &o)
void setFreeAxis (const sofa::defaulttype::Vec< 6, bool > &axis)
void setFreeAxis (bool isFreeTx, bool isFreeTy, bool isFreeTz, bool isFreeRx, bool isFreeRy, bool isFreeRz)
void setDamping (Real _kd)

Data Fields

int m1
int m2
Real kd
 the two extremities of the spring: masses m1 and m2
Vector initTrans
 damping factor
Quat initRot
 rest length of the spring
Quat lawfulTorsion
 rest orientation of the spring
Quat extraTorsion
 general (lawful) torsion of the springs (used to fix a bug with large rotations)
sofa::defaulttype::Vec< 6, bool > freeMovements
 extra (illicit) torsion of the springs (used to fix a bug with large rotations)
Real softStiffnessTrans
 defines the axis where the movements is free. (0,1,2)--> translation axis (3,4,5)-->rotation axis
Real hardStiffnessTrans
 stiffness to apply on axis where the translations are free (default 0.0)
Real softStiffnessRot
 stiffness to apply on axis where the translations are forbidden (default 10000.0)
Real hardStiffnessRot
 stiffness to apply on axis where the rotations are free (default 0.0)
Real blocStiffnessRot
 stiffness to apply on axis where the rotations are forbidden (default 10000.0)
sofa::defaulttype::Vec< 6, Real > limitAngles
 stiffness to apply on axis where the rotations are bloqued (=hardStiffnessRot/100)
Vector bloquage
 limit angles on rotation axis (default no limit)

Friends

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

Detailed Description

template<class DataTypes>
class sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring

Definition at line 72 of file JointSpringForceField.h.


Constructor & Destructor Documentation

template<class DataTypes >
sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::Spring (  )  [inline]

template<class DataTypes >
sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::Spring ( int  m1,
int  m2 
) [inline]

template<class DataTypes >
sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::Spring ( int  m1,
int  m2,
Real  softKst,
Real  hardKst,
Real  softKsr,
Real  hardKsr,
Real  blocKsr,
Real  axmin,
Real  axmax,
Real  aymin,
Real  aymax,
Real  azmin,
Real  azmax,
Real  kd 
) [inline]


Member Function Documentation

template<class DataTypes >
Real sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getBlocStiffnessRotation (  )  [inline]

template<class DataTypes >
sofa::defaulttype::Vec<6,bool> sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getFreeAxis (  )  [inline]

template<class DataTypes >
Real sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getHardStiffnessRotation (  )  [inline]

template<class DataTypes >
Real sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getHardStiffnessTranslation (  )  [inline]

template<class DataTypes >
Vector sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getInitLength (  )  [inline]

template<class DataTypes >
Quat sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getInitOrientation (  )  [inline]

template<class DataTypes >
sofa::defaulttype::Vec<6,Real> sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getLimitAngles (  )  [inline]

template<class DataTypes >
Real sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getSoftStiffnessRotation (  )  [inline]

template<class DataTypes >
Real sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::getSoftStiffnessTranslation (  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setBlocStiffnessRotation ( Real  ksb  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setDamping ( Real  _kd  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setFreeAxis ( bool  isFreeTx,
bool  isFreeTy,
bool  isFreeTz,
bool  isFreeRx,
bool  isFreeRy,
bool  isFreeRz 
) [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setFreeAxis ( const sofa::defaulttype::Vec< 6, bool > &  axis  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setHardStiffnessRotation ( Real  ksr  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setHardStiffnessTranslation ( Real  kst  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setInitLength ( const Vector &  l  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setInitOrientation ( const Vector &  o  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setInitOrientation ( const Quat &  o  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setLimitAngles ( Real  minx,
Real  maxx,
Real  miny,
Real  maxy,
Real  minz,
Real  maxz 
) [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setLimitAngles ( const sofa::defaulttype::Vec< 6, Real > &  lims  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setSoftStiffnessRotation ( Real  ksr  )  [inline]

template<class DataTypes >
void sofa::component::forcefield::JointSpringForceField< DataTypes >::Spring::setSoftStiffnessTranslation ( Real  kst  )  [inline]


Friends And Related Function Documentation

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

Definition at line 229 of file JointSpringForceField.h.

template<class DataTypes >
std::istream& operator>> ( std::istream &  in,
Spring &  s 
) [friend]

Definition at line 171 of file JointSpringForceField.h.


Field Documentation

general (lawful) torsion of the springs (used to fix a bug with large rotations)

Definition at line 80 of file JointSpringForceField.h.

Referenced by sofa::component::forcefield::JointSpringForceField< DataTypes >::addSpringForce().

rest orientation of the spring

Definition at line 79 of file JointSpringForceField.h.

Referenced by sofa::component::forcefield::JointSpringForceField< DataTypes >::addSpringForce().


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

Generated on Sun Nov 23 04:18:45 2008 for Sofa by  doxygen 1.5.7.1