Jafar
|
00001 /* $Id$ */ 00002 00003 #ifndef _SHAPER_HPP 00004 #define _SHAPER_HPP 00005 00006 #include "kernel/jafarException.hpp" 00007 #include "jmath/jblas.hpp" 00008 #include "geom/Point.hpp" 00009 #include "geom/BoundingBox.hpp" 00010 #include "geom/Declarations.hpp" 00011 00012 namespace jafar { 00013 00014 namespace premodeler { 00020 class Shaper { 00021 00022 /* 00023 * private attributes and methodes 00024 */ 00025 private: 00026 std::list<geom::Point3D> points; 00027 geom::BoundingBox3D m_box; 00028 jblas::mat33 m_inertia; 00029 jblas::vec3 m_barycenter; 00030 jblas::vec3 xAxis, yAxis, zAxis; 00031 geom::Repere<3> *m_local; 00032 const geom::Repere<3> *m_global; 00033 double m_size; 00034 bool isInertiaMatrixComputed; 00035 bool isBarycenterComputed; 00036 bool isBoundingBoxComputed; 00037 bool isReferenceComputed; 00038 public: 00042 Shaper(); 00047 Shaper(const std::list<geom::Point3D>& _pointsList); 00052 void setPoints(const std::list<geom::Point3D>& _pointsList); 00057 void setPoints(const std::map<int, geom::Point3D>& _pointsMap); 00061 void computeBoundingBox(); 00065 void computeInertiaMatrix(); 00069 void computeBarycenter(); 00073 void computeReference(); 00077 geom::BoundingBox3D boundingBox(); 00081 jblas::mat33 inertiaMatrix(); 00085 jblas::vec3 barycenter(); 00089 geom::Repere<3>* reference(); 00093 std::list<geom::Point3D> pointsList(); 00098 static void fillPointsList(std::map<int, geom::Point3D> _pointsMap, 00099 std::list<geom::Point3D>& _pointsList); 00100 };//class Shaper 00101 00102 }//namespace premodeler 00103 00104 }//namespace jafar 00105 00106 #endif
Generated on Wed Oct 15 2014 00:37:25 for Jafar by doxygen 1.7.6.1 |