FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
IntegralFace.hpp
1#ifndef __FISH_CEPHALUS_LINEINTEGRATOR_HPP
2#define __FISH_CEPHALUS_LINEINTEGRATOR_HPP
3
4#include <eagle/PhysicalSpace.hpp>
5#include <eagle/STA.hpp>
6
7#include <ocean/shrimp/VObjectStatus.hpp>
8#include <ocean/shrimp/VEnum.hpp>
9#include <ocean/shrimp/EaglePhysicalSpaceTVector.hpp>
10#include <ocean/shrimp/EaglePhysicalSpacePoint.hpp>
11
12
13#include <fish/fiber/baseop/ExpandBBox.hpp>
14#include <grid/types/LineSet.hpp>
15
16#include <bone/FishField.hpp>
17#include <bone/FishSaver.hpp>
18#include <bone/Fish.hpp>
19
20#include <bone/SurfaceRefinementCriterion.hpp>
21
22#include <ocean/shrimp/Options.hpp>
23
24#include "fishintegratorDllApi.h"
25
26namespace Wizt
27{
28
29 using namespace Fiber;
30
31
32
34 public virtual Fish<Field>,
35 public FishGridSavable,
36 public StatusIndicator
37{
38public:
39 typedef Eagle::PhysicalSpace::tvector tvector;
40
47
48 // Equip Modul with all neccessary in and outputs and steering parameters
49
50 // Either the input grid or the input field should be connected.
51 // If it is sufficient to have a Grid object for defining the start points of the
52 // Lines connect to grid.
53 // Otherwise connect to the field. The start positions are then extracted from the
54 // Grid underlying the Field.
55 TypedSlot<Grid> StartGrid;
56 TypedSlot<Field> StartField;
59
61 TypedSlot<double> MaxSteps;
63
65
66 TypedSlot<Enum> Ipol;
67// TypedSlot<Enum> IncludeData;
68// TypedSlot<Enum> IncludeMagnitude;
69// TypedSlot<Enum> UseDop853;
70
71 TypedSlot<int> InternalEmissionSeedPoints;
72
73 TypedSlot<Eagle::point3> m_query_scale; // should be a tvector, but no dirct input widget available
74
75 TypedSlot<Options> SomeOptions;
76
78
79 VOutput<int> CurviCellsPerUniCell;
80
82 IntegralFace(const string&name, int p, const RefPtr<VCreationPreferences>&VP);
83
85
86 bool errorMsg(VRequest&Context,const string&text) const
87 {
88 string tmp = "IntegralLine::" + text;
89#ifdef VERBOSE
90 puts( tmp.c_str() );fflush(stdout);
91#endif
92 return setStatusError(Context, text, false);
93 }
94
95 bool infoMsg(VRequest&Context,const string&text) const
96 {
97 string tmp = "IntegratlLine::" + text;
98
99 puts( tmp.c_str() );fflush(stdout);
100 return setStatusInfo(Context, text);
101 }
102
104 {
105 GridSelector& EmitterGS;
106 FieldSelector& EmitterFS;
107 double Time;
108 bool IsField;
109 size_t Size;
110
112 : EmitterGS(EmitterGSP)
113 , EmitterFS(EmitterFSP)
114 , Time(TimeP)
115 , IsField( false )
116 , Size(0)
117 {}
118 };
119
120 // note that this is not a member function of the above class because it uses functions
121 // and operator of the integralface class.
124
125
127 {
128 RefPtr<Grid> EmitterGrid;
129 RefPtr<Field> EmitterCoordinates;
131 GridSelector& GS;
132 RefPtr<Field>& InputToIntegrateField;
133 double time;
134 string grid_name;
135
138 : EmitterCoordinates(EmitterCoordinatesP)
140 , GS(GSP)
141 , InputToIntegrateField(InputToIntegrateFieldP)
142 , time(timeP)
143 , grid_name(grid_nameP)
144 {}
145
148 : EmitterGrid(EmitterGridP)
150 , GS(GSP)
151 , InputToIntegrateField(InputToIntegrateFieldP)
152 , time(timeP)
153 , grid_name(grid_nameP)
154 {}
155
156
157 };
158
159 // note that this is not a member function of the above class because it uses functions
160 // and operator of the integralface class.
161 bool needUpdate( VRequest&Context, UpdateCheckData&UCD );
162
163 /*
164 This is a strange class, why are the constructor parameters
165 non-const refptrs and the bounding box a reference to a refptr
166 as the only class member??
167 Why is there a boolean flag which seems to redundantly be
168 the same as the EmitterCoordinates??
169 */
171 {
172 RefPtr<Field> EmitterCoordinates;
173 RefPtr<Grid> EmitterGrid;
174 RefPtr<Bundle> BPtr;
175 RefPtr<BoundingBox>& ToIntegratefieldBBox;
176 int nSeeds;
177 bool isField;
178
180 : EmitterCoordinates(EmitterCoordinatesP)
181 , ToIntegratefieldBBox(ToIntegratefieldBBoxP)
182 , nSeeds(nSeedsP)
183 , isField(true)
184 {}
185
187 : EmitterGrid(EmitterGridP)
188 , BPtr(BPtrP)
189 , ToIntegratefieldBBox(ToIntegratefieldBBoxP)
190 , nSeeds(nSeedsP)
191 , isField(false)
192 {}
193
194
195 };
196
197 // note that this is not a member function of the above class because it uses functions
198 // and operator of the integralface class.
199 void setDefaultEmissionPoints( VRequest& Context, AutoEmitterData& AED );
200};
201
202}
203
204
205#endif // __FISH_CEPHALUS_LINEINTEGRATOR_HPP
206
207
208
209
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
An abstract selection of fields, that is given by names of fields and possible types for each field.
Definition FieldSelection.hpp:23
An internal class that stores a couple of textual names.
Definition FieldSelector.hpp:18
Context information to select a grid from within a bundle.
Definition GridSelector.hpp:26
Convenience class for objects that provide a Grid that may be saved.
Definition FishSaver.hpp:127
Definition IntegralFace.hpp:37
VOutput< Grid > myIntegralLines
Output is provided as a grid object.
Definition IntegralFace.hpp:77
TypedSlot< double > MinLineLength
maximum length of integration line
Definition IntegralFace.hpp:60
TypedSlot< double > UniMapperScalator
Unimapper grid scale factor.
Definition IntegralFace.hpp:64
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Compute the step size of a curve.
Definition CurveOperators.hpp:95
Definition IntegralFace.hpp:171
Definition IntegralFace.hpp:104
Definition IntegralFace.hpp:127