FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
anemonefish/FieldSlice.hpp
1#ifndef __FISH_ANEMONEFISH_FIELDSLICE_HPP
2#define __FISH_ANEMONEFISH_FIELDSLICE_HPP
3
4#include <ocean/Anemonia/FloatOrigin.hpp>
5
6#include <pond/spine/XYZOrientation.hpp>
7#include <fiber/bundle/BundleProperty.hpp>
8#include <fiber/baseop/SlicerBase.hpp>
9#include <ocean/shrimp/PhysicalSpace.hpp>
10
11#include <bone/FragmentSelector.hpp>
12
13#include <memcore/RefMap.hpp>
14
15#include "FieldAnemone.hpp"
16
17namespace Wizt
18{
19
23{
25
26 inout<double> inCoordinateValue;
27// in<Eagle::point3> inCoordinateLocation;
28
29 in<VBoundingBox> inPlacement;
30
31 in<Eagle::point3> inP00, inP01, inP11, inP10;
32
33 TypedSlot<Fiber::FragmentSelector> inFragmentSelector;
34
35// TypedSlot<double> dS;
36// TypedSlot<int> Multiplicity;
37// TypedSlot<double> tsEpsilon;
38
63
65 struct CoordinateSliceData : map<int, LevelData>
66 {
67 double myCoordinateSliceValue;
68 };
69
71 struct SliceData : ReferenceBase<SliceData>
72 , map<int, CoordinateSliceData>
73 {
74 int myOrientation;
75
76 SliceData()
78 {}
79 };
80
81 struct SliceDataInterface : Interface<SliceDataInterface>
82 , map<FieldSlice*, RefPtr<SliceData> >
83 {
84 };
85
87 {
88 FieldSlice*that;
89
90 list<WeakPtr<SliceDataInterface> > SliceInterfacesOnData;
91 WeakPtr<SliceData> CurrentSlice;
92
94 };
95
96 RefPtr<State> newState() const override;
98 FieldSlice(const string&name, int RenderCategory, const RefPtr<VCreationPreferences>&VP);
99
101 ~FieldSlice();
102
104 double getSliceCoordinate(const RefPtr<ValuePool>&Context) const;
105
109 RefPtr<BoundingBox> transformBBox(const RefPtr<ValuePool>&Context, const RefPtr<BoundingBox>&DataBBox) const override;
110
111 bool validateInput(VRequest&Context, Fiber::Info<Fiber::Grid>&iG,
115 string&ValidateInputInfoString) const override;
116
124 getSlicer(const string&FieldIDName,
126 int o, double theCoordinateValue) const = 0;
127
128 virtual bool requireNewSlicing(VRequest&Context, const LevelData&myLevelData) const;
129
130 virtual void postSlicing(VRequest&Context, const LevelData&myLevelData) const;
131
132
134 makeQuadTextureCoords(size_t SliceDimsX, size_t SliceDimsY,
135 bool QuadStrip);
136
138 create2DTexture(VRenderContext&Context,
140 RenderBasin::TextureFormat TF,
141 int TextureUnit,
143 TSF = RenderBasin::AutomaticTexture() ) const;
144
145 bool validateFields(VRequest&Context, Fiber::Info<Fiber::Grid>&iG,
149 string&ValidateInputInfoString) const override;
150
155 string&ValidateInputInfoString) override;
156
157
158 bool environment_render(VRenderContext&Context) const override;
159
160 virtual bool updateFieldSliceAnemone(VRenderContext&Context,
164 const RefPtr<Fiber::FragmentID> &Fid) const;
165
166 virtual bool addRenderVertices(VRenderContext&Context,
168 const RefPtr<Fiber::Field> &Positions,
170 const Eagle::tvector3&TranslationVector) const;
171
172 virtual bool addRenderFragment(VRenderContext&Context,
177 const LevelData::FieldList_t &theOutputFields) const = 0;
178
179 bool renderFragment(VRenderContext&Context,
182 const RefPtr<Fiber::FragmentID>&Fid) const;
183
184
185 memsize_t computeGPUMemsize(VRenderContext&Context) const;
186
187};
188
189} // namespace Wizt
190
191#endif // __FISH_ANEMONEFISH_FIELDSLICE_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Base class for objects that render information given on a Field.
Definition FieldAnemone.hpp:39
Definition GridAnemoneState.hpp:46
Handling a hierarchy of fields.
Definition RenderFields.hpp:21
MemSizeConfig< sizeof(void *)>::memsize_t memsize_t
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
RenderCategory
refinementlevel --> LevelData
Definition anemonefish/FieldSlice.hpp:66
The 2D field data extracted from the 3D data, including object-local data transformations.
Definition anemonefish/FieldSlice.hpp:44
RefMap< std::string, Fiber::Field > FieldList_t
Mapping shader attributes to strong field references Fields are kept alive locally here in this State...
Definition anemonefish/FieldSlice.hpp:53
FieldList_t OutputFields
The output data of the 2D slice.
Definition anemonefish/FieldSlice.hpp:56
WeakPtr< Fiber::Field > InputCoordinates
The input coordinates of the source data.
Definition anemonefish/FieldSlice.hpp:46
RefPtr< Fiber::Field > OutputCoordinates
The output coordinates of the 2D slice.
Definition anemonefish/FieldSlice.hpp:49
Definition anemonefish/FieldSlice.hpp:87
Definition anemonefish/FieldSlice.hpp:83
slicenumber --> coordinateslicedata
Definition anemonefish/FieldSlice.hpp:73
Definition anemonefish/FieldSlice.hpp:23
virtual RefPtr< Fiber::SlicerBase > getSlicer(const string &FieldIDName, VRequest &Context, int o, double theCoordinateValue) const =0
Implement the actual data slicing operation.
Convenience class to provide an input slot for selection a coordinate orientation along the X,...
Definition XYZOrientation.hpp:17