00001 #ifndef __FISHEYE_TEXTURED_QUAD
00002 #define __FISHEYE_TEXTURED_QUAD
00003
00004 #include "Orientation.hpp"
00005 #include <field/MemArray.hpp>
00006 #include <ocean/eagle/PhysicalSpace.hpp>
00007
00008 #include <ocean/GLvish/GLTexture.hpp>
00009
00010 #include <GL/fiberGL.hpp>
00011 #include <ocean/shrimp/Range.hpp>
00012
00013 #include "Quad.hpp"
00014
00015 namespace Wizt
00016 {
00017
00018 using namespace Fiber;
00019 using namespace Eagle;
00020
00021 struct fisheye_API TexturedQuad : Quad
00022 {
00023 typedef MemArray<2, float> TextureSliceF_t;
00024 typedef MemArray<2, unsigned char> TextureSliceB_t;
00025
00026 RefPtr<CreativeArrayBase> MyCreator;
00027 int H, W;
00028 GridOrientation3 MyOrientation;
00029 int MySlice;
00030
00031 int refinement_level;
00032 string ID;
00033
00034 const Range MyFunctor;
00035
00039 TexturedQuad(const Range&F, int RefinementLevel, const string&name);
00040
00041 ~TexturedQuad();
00042
00049 virtual void renderQuad(const RefPtr<GLTexture2D>&TXT, const Quad::Functor&f);
00050
00051
00055 void render(TextureCreator&TCrec, bool interp, const Ageable*ColormapAge, int bits, const Quad::Functor&f);
00056
00062 void render(TextureCreator&TCrec, bool interp, const Ageable&ColormapAge, int bits, const Quad::Functor&f)
00063 {
00064 render(TCrec, interp, &ColormapAge, bits, f);
00065 }
00066
00073 void render(TextureCreator&TCrec, bool interp, const Quad::Functor&f)
00074 {
00075 render(TCrec, interp, 0, 8, f);
00076 }
00077
00078 bool extract(const RefPtr<CreativeArrayBase>&DataCrec,
00079 const GridOrientation3&O,
00080 index_t slice);
00081 };
00082
00083 }
00084
00085 #endif // __FISHEYE_TEXTURED_QUAD