Go to the documentation of this file.00001 #ifndef OPENTISSUE_DYNAMICS_VERSATILE_GL_DRAW_VERSATILE_H
00002 #define OPENTISSUE_DYNAMICS_VERSATILE_GL_DRAW_VERSATILE_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/utility/gl/gl_util.h>
00013
00014 namespace OpenTissue
00015 {
00016 namespace gl
00017 {
00018
00019 template<typename versatile_mesh>
00020 inline void DrawVersatilePenaltyForces(versatile_mesh & mesh)
00021 {
00022 typename versatile_mesh::node_iterator begin = mesh.node_begin();
00023 typename versatile_mesh::node_iterator end = mesh.node_end();
00024 typename versatile_mesh::node_iterator node;
00025
00026 for(node=begin;node!=end;++node)
00027 {
00028 OpenTissue::gl::DrawVector(node->m_coord,node->m_f_pen);
00029 }
00030 }
00031
00032 template<typename versatile_mesh>
00033 inline void DrawVersatileInternalForces(versatile_mesh & mesh)
00034 {
00035 typename versatile_mesh::node_iterator begin = mesh.node_begin();
00036 typename versatile_mesh::node_iterator end = mesh.node_end();
00037 typename versatile_mesh::node_iterator node;
00038
00039 for(node=begin;node!=end;++node)
00040 {
00041 OpenTissue::gl::DrawVector(node->m_coord,node->m_f_con);
00042 }
00043 }
00044
00045
00046 template<typename versatile_mesh>
00047 inline void DrawVersatileExternalForces(versatile_mesh & mesh)
00048 {
00049 typename versatile_mesh::node_iterator begin = mesh.node_begin();
00050 typename versatile_mesh::node_iterator end = mesh.node_end();
00051 typename versatile_mesh::node_iterator node;
00052
00053 for(node=begin;node!=end;++node)
00054 {
00055 OpenTissue::gl::DrawVector(node->m_coord,node->m_f_ext);
00056 }
00057 }
00058
00059 }
00060 }
00061
00062
00063 #endif