00001 // Copyright (C) 2011 Soren Hauberg 00002 // 00003 // This program is free software; you can redistribute it and/or 00004 // modify it under the terms of the GNU General Public License 00005 // as published by the Free Software Foundation; either version 3 00006 // of the License, or (at your option) any later version. 00007 // 00008 // This program is distributed in the hope that it will be useful, but 00009 // WITHOUT ANY WARRANTY; without even the implied warranty of 00010 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 // General Public License for more details. 00012 // 00013 // You should have received a copy of the GNU General Public License 00014 // along with this program; if not, see <http://www.gnu.org/licenses/>. 00015 00016 #ifndef BONE_APPEARANCE_H 00017 #define BONE_APPEARANCE_H 00018 00019 #include <OpenTissue/kinematics/skeleton/skeleton_types.h> 00020 00021 // Bunch of typedefs because OpenTissue _really_ likes namespaces (XXX: move these to a separate file (typedefs.h) ?) 00022 typedef OpenTissue::math::default_math_types math_types; 00023 typedef OpenTissue::skeleton::DefaultBoneTraits <math_types> default_bone_traits; 00024 00028 class bone_appearance : public default_bone_traits 00029 { 00030 public: 00031 // Constructor 00032 bone_appearance (); 00033 00034 // Accessor 00044 void set_size (const double _width, const double _length); 00045 00050 double get_width () const; 00051 00056 double get_length () const; 00057 00062 double get_length2 () const; 00063 00064 private: 00065 // Data 00066 double width, length2; 00067 }; 00068 #endif // BONE_APPEARANCE_H