FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
FieldAnemone.hpp
1#ifndef __FISH_POND_ANEMONEFISH_FieldAnemone_HPP
2#define __FISH_POND_ANEMONEFISH_FieldAnemone_HPP
3
4#include <fish/pond/spine/SkeletonOperator.hpp>
5#include <ocean/Anemonia/VRenderObject.hpp>
6#include <ocean/Anemonia/Seagrass.hpp>
7
8#include <fish/pond/bone/FishSlice.hpp>
9#include <fish/pond/bone/FishField.hpp>
10#include <fish/fiber/baseop/GridField.hpp>
11
12#include "GridAnemone.hpp"
13#include "GridAnemoneState.hpp"
14#include "FieldAnemoneBase.hpp"
15#include "ShaderFields.hpp"
16
17namespace Wizt
18{
19
39{
40public:
42
43 int getTextureUnit(const string&Name) const;
44
45 void setNamedTextures(const Anemone&, const RefPtr<RenderBasin::Program>&) const;
46
48
50 FieldAnemone(const string&name, int RenderCategory, const RefPtr<VCreationPreferences>&VP);
51
54
55
59 virtual string getShaderAttributeName( const TypedSlot<Fiber::Field>&MyField ) const;
60
61 virtual glsl getShaderPrefix(const FieldAnemone::AnemoneCreationContext&ARC,
63
67 bool validateInput(VRequest&R, Fiber::Info<Fiber::Grid>&,
71 string&ValidateInputInfoString) const override;
72
73 /*
74 Validating fields during update(), possibly compute them.
75
76 This function will inspect input type slots of the derived object,
77 retrieve a field from it, and compare it with the field that is
78 currently stored in the FieldAnemoneState.
79
80 The function is called from update().
81
82 If any field has changed, the function will return false.
83
84
85 The default implementation will work off all slots registered
86 in the ShaderFields member variable.
87 */
88 virtual bool validateFields(VRequest&Context, Fiber::Info<Fiber::Grid>&iG,
92 string&ValidateInputInfoString) const;
93
98 bool addSupplementaryData(VRequest&Context, Fiber::Info<Fiber::Grid>&,
102 string&InfoString) override;
103
104
105
109 void requestSupplementaryData(VRenderContext&theContext,
110 const RefPtr<Fiber::FragmentID>&myFragmentID) const override;
111
115 bool isCreatingSupplementaryData(VRenderContext&theContext,
116 const RefPtr<Fiber::FragmentID>&myFragmentID) const override;
117
118
119 /*
120 Add fields to the field list during update(), which means
121 registering the fields for usage in the shader.
122
123 The field may be computed, but probably already has been
124 computed by the validateFields() call which comes first.
125 However, computation in validateFields() might return
126 before checking all fields, whereas in addFields() we now
127 know that all fields are needed.
128
129 The default implementation will work off all slots registered
130 in the ShaderFields member variable.
131 */
132 virtual bool addFields(VRequest&, Fiber::Info<Fiber::Grid>&,
136 string&);
137
142 bool requireNewFieldComputation(const RefPtr<Fiber::Field>&Output,
144 const RefPtr<Fiber::Field>&Input) const;
145
147 createPainter(Anemone&RenderAnemone,
150 const RefPtr<RenderBasin::VertexAttribute>&Vertices) const;
151
152
153 GridAnemone::AnemoneRenderStatus
154 initializeAnemone(Anemone&RenderAnemone, const AnemoneCreationContext&ARC,
155 const RefPtr<AnemoneExplorer>&) const override;
156
157
158 bool isValidAnemone(const Anemone&RenderAnemone,
160 const RefPtr<AnemoneExplorer>&) const override;
161
162
163 virtual bool validateAnemoneData(VRenderContext&theContext,
166 const Fiber::SkeletonID&theSkeletonID) const;
167
168
169}; // end FieldAnemone class
170
171
175template <class FieldType>
177{
178public:
179 typedef FieldType InputTypes;
180
183 {
185 }
186};
187
190
191// note: doesnt include long double
193
195
197
198} // namespace Wizt
199
200#endif // __FISH_POND_ANEMONEFISH_GridAnemone_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
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
Definition ShaderFields.hpp:18
A field Anemone operating on a certain type.
Definition FieldAnemone.hpp:177
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
RenderCategory
Definition FieldAnemoneBase.hpp:17
The context of creating a RenderAnemone.
Definition AnemoneCreationContext.hpp:58
The Anemone Explorer is an object that lives throughout rendering of a set of Anemones.
Definition GridAnemone.hpp:204