Quad.hpp

00001 #ifndef __FISHEYE_QUAD_HPP
00002 #define __FISHEYE_QUAD_HPP
00003 
00004 #include "Orientation.hpp"
00005 #include <field/MemArray.hpp>
00006 #include <ocean/eagle/PhysicalSpace.hpp>
00007 #include <GL/fiberGL.hpp>
00008 #include <field/Field.hpp>
00009 
00010 
00011 namespace Wizt
00012 {
00013 
00014 using namespace Fiber;
00015 using namespace Eagle;
00016 
00017 struct fisheye_API QuadIndices
00018 {
00019         MultiIndex<3> P00, P01, P11, P10;
00020 
00021         bool    setup(const GridOrientation3&O, const MultiIndex<3>&Dims, index_t slice);
00022 };
00023 
00024 
00025 
00026 struct fisheye_API Quad : ReferenceBase<Quad>
00027 {
00028         Eagle::point3           P00, P01, P11, P10; 
00029 
00030         struct  fisheye_API Functor
00031         {
00032                 virtual Eagle::point3 func(const Eagle::point3&) const; 
00033 
00034                 virtual ~Functor() = 0;
00035         };
00036 
00037         Quad()
00038         : ReferenceBase<Quad>(this)
00039         {}
00040 
00041         virtual ~Quad();
00042 
00043         bool    computeCorners(const QuadIndices&QI, const RefPtr<Field>&Coords, const RefPtr<FragmentID>&f); 
00044 
00045         void    render() const;
00046         void    render(const Functor&) const;
00047 };
00048 
00049 } // namespace Wizt
00050 
00051 #endif // __FISHEYE_QUAD_HPP