Iris.hpp

00001 #ifndef __FISH_EYE_IRIS_HPP
00002 #define __FISH_EYE_IRIS_HPP
00003 
00004 #include <bone/Fish.hpp>
00005 
00006 #include <GLvish/GLTexture.hpp>
00007 #include <GLvish/VGLRenderContext.hpp>
00008 
00009 #include "fisheyeDllApi.h"
00010 
00011 namespace Wizt
00012 {
00013 
00014 using namespace Fiber;
00015 using namespace Eagle;
00016 
00021 struct  fisheye_API     Iris : public virtual Fish<VObject>
00022                              , public virtual VStateCreatorBase
00023 {
00024         TypedSlot<double>       PointWidth,
00025                                 PointIntensity,
00026                                 PointSpikes; 
00027 
00031         struct  fisheye_API PointShape : GLTexture2D
00032         {
00033                 double  Width,
00034                         I0,
00035                         Spikes;
00036 
00037                 PointShape(int TextureUnit=0);
00038                 ~PointShape();
00039 
00040                 void activate();
00041         };
00042 
00043         Iris();
00044         virtual ~Iris(); 
00045 
00047         RefPtr<PointShape> SetupPointTexture(TextureCreator&TC, double S, double Imax, double Spikes, int TextureUnit,
00048                                              int TextureSize=32) const; 
00049 
00051         RefPtr<PointShape> getIris(VGLRenderContext&Context, int TextureUnit) const; 
00052 
00056         virtual FixedArray<float,4> PSF(double x, double y,
00057                                         double S, double Imax, double Spikes) const;
00058 };
00059 
00060 } // namespace Wizt
00061 
00062 #endif // __FISH_EYE_IRIS_HPP
00063