Public Types | Public Member Functions | Protected Attributes

OpenTissue::psys::Stick< types > Class Template Reference

#include <psys_stick.h>

Inheritance diagram for OpenTissue::psys::Stick< types >:
OpenTissue::psys::Constraint< types > OpenTissue::psys::ConnectorFacade< types >

List of all members.

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_typeA ()
particle_typeB ()
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_typem_A
 Pointer to one of the affected particles.
particle_typem_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.

template<typename types>
class OpenTissue::psys::Stick< types >


Member Typedef Documentation

template<typename types >
typedef types::math_types OpenTissue::psys::Stick< types >::math_types
template<typename types >
typedef types::particle_type OpenTissue::psys::Stick< types >::particle_type
template<typename types >
typedef math_types::real_type OpenTissue::psys::Stick< types >::real_type
template<typename types >
typedef math_types::vector3_type OpenTissue::psys::Stick< types >::vector3_type

Constructor & Destructor Documentation

template<typename types >
OpenTissue::psys::Stick< types >::Stick (  )  [inline]
template<typename types >
virtual OpenTissue::psys::Stick< types >::~Stick (  )  [inline, virtual]

Member Function Documentation

template<typename types >
particle_type* OpenTissue::psys::Stick< types >::A (  )  [inline]
template<typename types >
particle_type const* OpenTissue::psys::Stick< types >::A (  )  const [inline]
template<typename types >
particle_type* OpenTissue::psys::Stick< types >::B (  )  [inline]
template<typename types >
particle_type const* OpenTissue::psys::Stick< types >::B (  )  const [inline]
template<typename types >
unsigned int& OpenTissue::psys::Stick< types >::choice (  )  [inline]
template<typename types >
unsigned int const& OpenTissue::psys::Stick< types >::choice (  )  const [inline]
template<typename types >
void OpenTissue::psys::Stick< types >::init ( particle_type A,
particle_type B 
) [inline]

Init Stick.

Parameters:
A 
B 
template<typename types >
real_type const& OpenTissue::psys::Stick< types >::rest_length (  )  const [inline]
template<typename types >
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 >.

template<typename types >
void OpenTissue::psys::Stick< types >::satisfy_type1 (  )  [inline]

Satisfy Constraint. Normal way of satisfying a stick constraint

template<typename types >
void OpenTissue::psys::Stick< types >::satisfy_type2 (  )  [inline]

Satisfy Constraint. Using square root approximation for satisfying stick constraint

template<typename types >
void OpenTissue::psys::Stick< types >::satisfy_type3 (  )  [inline]

Satisfy Constraint. Like normal way for satisfying stick constraint, but respecting masses.

template<typename types >
void OpenTissue::psys::Stick< types >::set_rest_length ( real_type  l  )  [inline]

Set Rest Length.

Parameters:
length 

Member Data Documentation

template<typename types >
particle_type* OpenTissue::psys::Stick< types >::m_A [protected]

Pointer to one of the affected particles.

template<typename types >
particle_type* OpenTissue::psys::Stick< types >::m_B [protected]

Pointer to one other affected particle.

template<typename types >
unsigned int OpenTissue::psys::Stick< types >::m_choice [protected]

Member indicating which satisfy type that is used (1,2,3,...?) default 2.

template<typename types >
real_type OpenTissue::psys::Stick< types >::m_length [protected]

Rest length between the two particles.

template<typename types >
real_type OpenTissue::psys::Stick< types >::m_length_sqr [protected]

Rest length squared.


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