Go to the documentation of this file.00001 #ifndef OPENTISSUE_DYNAMICS_VERSATILE_VERSATILE_NODE_TRAITS_H
00002 #define OPENTISSUE_DYNAMICS_VERSATILE_VERSATILE_NODE_TRAITS_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 namespace OpenTissue
00013 {
00014 namespace versatile
00015 {
00016 namespace detail
00017 {
00018
00019 template <typename versatile_types>
00020 class NodeTraits
00021 {
00022 public:
00023
00024 typedef typename versatile_types::value_traits value_traits;
00025 typedef typename versatile_types::real_type real_type;
00026 typedef typename versatile_types::vector3_type vector3_type;
00027 typedef typename versatile_types::matrix3x3_type matrix3x3_type;
00028
00029 public:
00030
00031 bool m_fixed;
00032 vector3_type m_x0;
00033 vector3_type m_coord;
00034 vector3_type m_v;
00035 real_type m_mass;
00036 vector3_type m_f_ext;
00037 vector3_type m_f_con;
00038 vector3_type m_f_pen;
00039
00040 public:
00041
00042 NodeTraits()
00043 : m_fixed(false)
00044 , m_v( value_traits::zero(), value_traits::zero(), value_traits::zero() )
00045 , m_mass( value_traits::zero() )
00046 , m_f_ext( value_traits::zero(), value_traits::zero(), value_traits::zero() )
00047 , m_f_con( value_traits::zero(), value_traits::zero(), value_traits::zero() )
00048 {}
00049
00050 public:
00051
00052 vector3_type position() const { return m_coord; }
00053
00054 };
00055
00056 }
00057 }
00058 }
00059
00060
00061 #endif