FieldSlice.hpp

00001 #ifndef __FIELDSLICE_HPP
00002 #define __FIELDSLICE_HPP
00003 
00004 #include <ocean/plankton/VValue.hpp>
00005 #include <field/Field.hpp>
00006 #include "Quad.hpp"
00007 #include <memcore/Functor.hpp>
00008 
00009 namespace Wizt
00010 {
00011 
00012          
00013 class   fisheye_API FieldSlice : FragmentIterator
00014 {
00015 public:
00016 
00017         typedef Eagle::point3   point;
00018 
00019         GridOrientation3        SliceOrientation;
00020         double                  SliceCoords,
00021                                 minslice,
00022                                 maxslice;
00023 
00024         RefPtr<Field>           Coords; 
00025 
00026         FieldSlice();
00027         ~FieldSlice();
00028 
00035         void    reset(const TypedSlot<double>&SliceLocation, 
00036                       const Orientation&Orienter, const RefPtr<ValuePool>&Context);
00037 
00038         override bool apply(const RefPtr<FragmentID>&f, const RefPtr<CreativeArrayBase>&);
00039 
00044         virtual RefPtr<Quad> extract(const RefPtr<FragmentID>&f,
00045                                      const MultiIndex<3>&Dims,
00046                                      const RefPtr<CreativeArrayBase>&DataCrec, index_t Slice) = 0; 
00047 
00048         virtual bool IrregularFragment(const RefPtr<FragmentID>&f, const RefPtr<CreativeArrayBase>&DC);
00049 
00050         void iterate(const RefPtr<Field>&Coords, const RefPtr<Field>&Data);
00051 
00056         void adjustSliceRange(TypedSlot<double>&SliceLocation) const;
00057 };
00058 
00059 
00060 } // Wizt
00061 
00062 #endif //  __FIELDSLICE_HPP