FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
ShaderFields.hpp
1#ifndef __FISH_POND_ANEMONEFISH_ShaderFields_HPP
2#define __FISH_POND_ANEMONEFISH_ShaderFields_HPP
3
4#include <pond/bone/FishField.hpp>
5#include <ocean/Anemonia/RenderNamespace.hpp>
6
7#include <map>
8#include <unordered_map>
9#include <forward_list>
10
11#include "anemonefishDllApi.h"
12#include "RenderFields.hpp"
13
14namespace Wizt
15{
16
18{
19public:
20
25
53
54 VObject::in<bool> inAllowImplicitFields;
55
57
58
59
60
69static const char define_ATTRIBUTE_INDEX_LOCATION[];
70
75
76 std::unordered_set<std::string> MandatoryShaderAttributes;
77
79 const string&AllowImplicitFieldsSlotName = "AllowImplicitFields",
81
83
84 string_set getShaderDefaultFields(const string&Shaderfield) const;
85
86 bool isNewerThan(const Ageable&A) const;
87
88 using getSkeletonFieldsResults_t = map<string, RefPtr<Fiber::Field> >::value_type;
89
95static getSkeletonFieldsResults_t
98 const FieldSelector&FS,
101
102 getSkeletonFieldsResults_t
103 getSkeletonField(const RefPtr<Fiber::Skeleton>&DestVertexSkeleton,
105 const string&ShaderfieldName,
107 const FieldSelector&FS) const;
108
109
110 using FieldValidator_t = std::function<
112
113 virtual bool validateFragment(const RefPtr<ValuePool>&Context,
114 const RenderNamespace::glsl&FieldID,
117
118 bool validateFields(VRequest&Context, //Fiber::Info<Fiber::Grid>&DestinationGrid,
121 const FieldValidator_t&FV,
122 string&ValidateInputInfoString) const;
123
129 bool isMandatoryShaderAttribute(const string&AttributeName) const;
130
131
135 bool addField(VRequest&Context, //Fiber::Info<Fiber::Grid>&DestinationGrid,
139 const RenderNamespace::glsl&AttributeName,
141 string&InfoString);
142
148 bool addFields(VRequest&Context, //Fiber::Info<Fiber::Grid>&DestinationGrid,
152 string&InfoString);
153
154 RenderNamespace::glsl
155 getShaderDefinitions(const RefPtr<ValuePool>&Context,
156 const RenderNamespace::glsl&FieldID,
157 const Fiber::Field&F,
160
169static RenderNamespace::glsl
170 getPositionsShaderFunction(const Fiber::CreativeArrayBase&theCoordinateFragment);
171
172 RenderNamespace::glsl
173 getFieldsShaderDefinitions(const RefPtr<ValuePool>&Context,
177 const RenderFields&RF) const;
178
179 RenderNamespace::glsl
180 getFieldsShaderPrefix(const RefPtr<ValuePool>&Context,
183 Fiber::CreativeArrayBase&myPrimaryDataFragment,
184 const RenderFields&RF) const;
185
186};
187
188} // namespace Wizt
189
190#endif // __FISH_POND_ANEMONEFISH_ShaderFields_HPP
Base class for multidimensional arrays that employ deferred storage, i.e.
Definition CreativeArrayBase.hpp:75
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
Identifier for Fields within a Grid.
Definition FieldID.hpp:53
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
Handling a hierarchy of fields.
Definition RenderFields.hpp:21
Definition ShaderFields.hpp:18
static getSkeletonFieldsResults_t getSkeletonField(const RefPtr< Fiber::Skeleton > &DestVertexSkeleton, const RefPtr< Fiber::Chart > &chart, const FieldSelector &FS, const string_set &ImplicitFieldNames, bool AllowImplicitFields)
Provide a field on a skeleton, considering possibly given implicit field names, i....
ShaderFields_t myShaderFields
Map from names used in the GLSL code to input field slots.
Definition ShaderFields.hpp:52
std::unordered_map< string, string_set > myShaderDefaultFields
For each shader field optionally provide a name for the field on the Grid.
Definition ShaderFields.hpp:74
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Definition fs/init.hpp:20