• Main Page
  • Related Pages
  • Modules
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

/home/hauberg/Dokumenter/Capture/humim-tracker-0.1/src/OpenTissue/OpenTissue/core/containers/t4mesh/t4mesh_default_point_container.h

Go to the documentation of this file.
00001 #ifndef OPENTISSUE_CORE_CONTAINERS_T4MESH_T4MESH_DEFAULT_POINT_CONTAINER_H
00002 #define OPENTISSUE_CORE_CONTAINERS_T4MESH_T4MESH_DEFAULT_POINT_CONTAINER_H
00003 //
00004 // OpenTissue Template Library
00005 // - A generic toolbox for physics-based modeling and simulation.
00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen.
00007 //
00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php
00009 //
00010 #include <OpenTissue/configuration.h>
00011 
00012 namespace OpenTissue
00013 {
00014   namespace t4mesh
00015   {
00016 
00039     template<typename M>
00040     struct default_point_container
00041     {
00042       typedef          M                          mesh_type;
00043       typedef typename mesh_type::math_types      math_types;
00044       typedef typename math_types::vector3_type   value_type;
00045 
00046       mesh_type * m_mesh;
00047 
00048       default_point_container(mesh_type * mesh) : m_mesh(mesh) {}
00049 
00050       value_type & operator[] (unsigned int const & idx)
00051       {
00052         return m_mesh->node(idx)->m_coord;
00053       }
00054 
00055       value_type const & operator[] (unsigned int const & idx)const
00056       {
00057         return m_mesh->node(idx)->m_coord;
00058       }
00059 
00060       void clear(){}
00061       size_t size() const {return m_mesh->size_nodes();}
00062       void resize(size_t){}
00063     };
00064 
00065 
00066   } // namespace t4mesh
00067 } // namespace OpenTissue
00068 
00069 //OPENTISSUE_CORE_CONTAINERS_T4MESH_T4MESH_DEFAULT_POINT_CONTAINER_H
00070 #endif

Generated on Thu Dec 1 2011 12:51:22 for HUMIM Tracker by  doxygen 1.7.1