#include <psys_stick.h>
Public Types | |
typedef types::math_types | math_types |
typedef math_types::real_type | real_type |
typedef math_types::vector3_type | vector3_type |
typedef types::particle_type | particle_type |
Public Member Functions | |
particle_type * | A () |
particle_type * | B () |
particle_type const * | A () const |
particle_type const * | B () const |
real_type const & | rest_length () const |
unsigned int & | choice () |
unsigned int const & | choice () const |
Stick () | |
virtual | ~Stick () |
void | init (particle_type *A, particle_type *B) |
void | set_rest_length (real_type l) |
void | satisfy () |
void | satisfy_type1 () |
void | satisfy_type2 () |
void | satisfy_type3 () |
Protected Attributes | |
particle_type * | m_A |
Pointer to one of the affected particles. | |
particle_type * | m_B |
Pointer to one other affected particle. | |
real_type | m_length |
Rest length between the two particles. | |
real_type | m_length_sqr |
Rest length squared. | |
unsigned int | m_choice |
Member indicating which satisfy type that is used (1,2,3,...?) default 2. |
typedef types::math_types OpenTissue::psys::Stick< types >::math_types |
typedef types::particle_type OpenTissue::psys::Stick< types >::particle_type |
typedef math_types::real_type OpenTissue::psys::Stick< types >::real_type |
typedef math_types::vector3_type OpenTissue::psys::Stick< types >::vector3_type |
OpenTissue::psys::Stick< types >::Stick | ( | ) | [inline] |
virtual OpenTissue::psys::Stick< types >::~Stick | ( | ) | [inline, virtual] |
particle_type* OpenTissue::psys::Stick< types >::A | ( | ) | [inline] |
particle_type const* OpenTissue::psys::Stick< types >::A | ( | ) | const [inline] |
particle_type* OpenTissue::psys::Stick< types >::B | ( | ) | [inline] |
particle_type const* OpenTissue::psys::Stick< types >::B | ( | ) | const [inline] |
unsigned int& OpenTissue::psys::Stick< types >::choice | ( | ) | [inline] |
unsigned int const& OpenTissue::psys::Stick< types >::choice | ( | ) | const [inline] |
void OpenTissue::psys::Stick< types >::init | ( | particle_type * | A, | |
particle_type * | B | |||
) | [inline] |
Init Stick.
A | ||
B |
real_type const& OpenTissue::psys::Stick< types >::rest_length | ( | ) | const [inline] |
void OpenTissue::psys::Stick< types >::satisfy | ( | ) | [inline, virtual] |
Satisfy Constraint. This method is invoked by caller.
The method is responsible for relaxing the constraint on all affected particles, that is it should adjust the positions of all affected particles in a way such that they fulfill the constraint.
Reimplemented from OpenTissue::psys::Constraint< types >.
void OpenTissue::psys::Stick< types >::satisfy_type1 | ( | ) | [inline] |
Satisfy Constraint. Normal way of satisfying a stick constraint
void OpenTissue::psys::Stick< types >::satisfy_type2 | ( | ) | [inline] |
Satisfy Constraint. Using square root approximation for satisfying stick constraint
void OpenTissue::psys::Stick< types >::satisfy_type3 | ( | ) | [inline] |
Satisfy Constraint. Like normal way for satisfying stick constraint, but respecting masses.
void OpenTissue::psys::Stick< types >::set_rest_length | ( | real_type | l | ) | [inline] |
Set Rest Length.
length |
particle_type* OpenTissue::psys::Stick< types >::m_A [protected] |
Pointer to one of the affected particles.
particle_type* OpenTissue::psys::Stick< types >::m_B [protected] |
Pointer to one other affected particle.
unsigned int OpenTissue::psys::Stick< types >::m_choice [protected] |
Member indicating which satisfy type that is used (1,2,3,...?) default 2.
real_type OpenTissue::psys::Stick< types >::m_length [protected] |
Rest length between the two particles.
real_type OpenTissue::psys::Stick< types >::m_length_sqr [protected] |
Rest length squared.