00001 
00002 
00003 #ifndef _VIEW_HPP
00004 #define _VIEW_HPP
00005 
00006 #include "kernel/jafarException.hpp"
00007 #include "jmath/jblas.hpp"
00008 
00009 namespace jafar {
00010 
00011   namespace bundler {
00017     class View {
00018 
00019       private:
00023       int imgIndex; 
00024       jblas::vec2 pixel;
00025       jblas::vec3 position;
00026       jblas::vec3 direction;
00027       jblas::vec2 size;
00028       float area;
00029       
00030       public:
00031       
00032       View();
00033       View(const int& _imgIndex, 
00034            const jblas::vec2& _pixel,
00035            const jblas::vec3& _position, 
00036            const jblas::vec3& _direction,
00037            const jblas::vec2& _size=jblas::zero_vec (2), 
00038            const float& _area=-1);
00039       View(const View& view);
00040       ~View();
00041       
00042             
00043       inline int getImgIndex() {return imgIndex;};
00044       inline jblas::vec2 getPixel() {return pixel;};
00045       inline jblas::vec3 getPosition() {return position;};
00046       inline jblas::vec3 getDirection() {return direction;};
00047       inline jblas::vec2 getSize() {return size;};
00048       inline float getArea() {return area;};
00049       
00050 
00051       
00053       void setImgIndex(const int& _index);
00055       void setPixel(const jblas::vec2& _pixel);
00057       void setPosition(const jblas::vec3& _position);
00059       void setDirection(const jblas::vec3& _direction);
00061       void setSize(const jblas::vec2& _size);
00063       void setArea(const float& _area);
00064 
00065 
00066       friend class ViewsManager;
00067       friend std::ostream& operator <<(std::ostream& s, const View& v);
00068     };
00069     std::ostream& operator <<(std::ostream& s, const View& v);
00070   }
00071 
00072 }
00073 #endif