FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
SortedFragmentIterator.hpp
1#ifndef __FISHEYE_SortedFragmentIterator_HPP
2#define __FISHEYE_SortedFragmentIterator_HPP
3
4#include "fisheyeDllApi.h"
5#include <field/Field.hpp>
6#include <grid/Representation.hpp>
7#include <GL/fiberGL.hpp>
8#include <ocean/shrimp/VCamera.hpp>
9#include <aerie/BoundingBox.hpp>
10
11namespace Wizt
12{
13
14using namespace Fiber;
15using namespace Eagle;
16
17
23{
24 const VCamera &myCamera;
25 RefPtr<Representation> myRepresentation;
26
27 RefPtr<Field> Coords() const
28 {
29 return myRepresentation->getPositions();
30 }
31
34 : myCamera(Cam)
35 , myRepresentation(theRepresentation)
36 {}
37
39
57
58protected:
59
61
62 FragmentMap_t FragmentMap;
63
69
70public:
72 int emitFragments();
73
78 virtual bool apply(const SpatialFragment&VF) = 0;
79
85 void emit(const RefPtr<Field>&theField)
86 {
87 if (theField)
88 {
89 theField->iterate(*this);
90 emitFragments();
91 }
92 }
93};
94
95
96} // namespace Wizt
97
98#endif // __FISHEYE_SortedFragmentIterator_HPP
99
100
101
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp __func(_Tp)) const
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 iterators over the fragments of a field.
Definition FragmentID.hpp:249
std::map< string, RefPtr< CreativeArrayBase > > FragmentMap_t
Mapping of arbitary names to field fragments.
Definition Fragment.hpp:12
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 ...
Definition CreativeIterator.hpp:84
Definition SortedFragmentIterator.hpp:41
An iterator over field fragments that traverses the fragments in back-to-front order as seen from the...
Definition SortedFragmentIterator.hpp:23
void emit(const RefPtr< Field > &theField)
Iterate over the fragments of the field and call the virtual apply() function for each fragment,...
Definition SortedFragmentIterator.hpp:85
virtual bool apply(const SpatialFragment &VF)=0
The virtual apply function, which would perform some rendering of the current spatial fragment.