Jafar
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
spheroid.hpp
00001 /* $Id$ */
00002 
00003 #ifndef _SPHEROID_HPP
00004 #define _SPHEROID_HPP
00005 
00006 #include "premodeler/shootPoint.hpp"
00007 #include "kernel/jafarException.hpp"
00008 #include "jmath/jblas.hpp"
00009 #include <cmath>
00010 
00011 namespace jafar {
00012   
00013   namespace premodeler {
00014 
00016     typedef std::vector<ShootPoint> ShootPoints;
00017     typedef ShootPoints::iterator spIterator;
00018 
00019     /* Class Spheroid computes the shoot points necessary for an efficient object learning.
00020      * Points computation is based an a parametric sphere's equation.
00021      * \image html "
00022      */
00023     class Spheroid {
00024       public :
00025       enum Axis{X,Y,Z};
00026 
00027 
00028       private :
00029       double ray, angle, u, v;
00030       jblas::vec3 origin;
00031       ShootPoints points;
00032 
00033       public :
00034       Spheroid(const double& _ray, 
00035                const jblas::vec3& _origin,
00036                const double& _angle=(M_PI/4));
00037 
00038       ~Spheroid();
00039 
00045       void calculateShootPoints();
00046 
00048       void truncateFromAxis(const Spheroid::Axis& axis, 
00049                             const double& minValue, 
00050                             const double& maxValue);
00051 
00053       void removeValueFromAxis(const Spheroid::Axis& axis, 
00054                                const double& value);
00056       void cleanShootPoints();
00057 
00058       void setShootPointsIds(const int& startIndex, 
00059                              const int& lastIndex, 
00060                              const int& step);
00062       ShootPoints getShootPoints();
00064       ShootPoint getShootPoint(const int& _id);
00066       ShootPoint getShootPoint(const ShootPoint::Faces& _face);
00067       std::vector<int> getFacesIndexes();
00068       void writeCenter(const std::string& fileName = "centroide.txt");
00069       void printShootPoints();
00070       void writeShootPoints(const std::string& fileName = "sphericos4Xav.txt");
00071     };//class Spheroid
00072   }//namespace premodeler
00073 
00074 }//namespace jafar
00075 
00076 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

Generated on Wed Oct 15 2014 00:37:25 for Jafar by doxygen 1.7.6.1
LAAS-CNRS