FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
RecursiveSeaBed.hpp
1#ifndef __FISH_POND_ANEMONEFISH_RecursiveSeabed_HPP
2#define __FISH_POND_ANEMONEFISH_RecursiveSeabed_HPP
3
4#include <functional>
5#include <fiber/grid/Skeleton.hpp>
6#include <fiber/grid/RepresentationReference.hpp>
7#include <aerie/BoundingBox.hpp>
8
9#include <grid/types/RefinedFragmentSkeleton.hpp>
10
11#include "GridAnemone.hpp"
12#include "SeaBed.hpp"
13
14namespace Wizt
15{
16
17
19{
20 SeaBed&mySeaBed;
21
22// const GridAnemone::FragmentSorter& myFragmentSorter;
23 pRegionOfInterest myRegionOfInterest;
24
25#ifdef SUPPORT_MULTIROOT_LEVELS
27#endif
28 RefPtr<CellTensorFunctor> myCellTensorFunctor;
29 double CellsizeThreshold;
30
31#ifdef SUPPORT_MULTIROOT_LEVELS
33
34 void SortRootLevel()
35 {
36 SortedFragmentMap.clear();
37 for(size_t i = 0; i<RootLevel.size(); i++)
38 {
39 const RefPtr<FragmentID>&fID = RootLevel[i].myFragmentID();
40 const Fiber::SkeletonID &SID = RootLevel[i].LevelID;
41 double SortValue = myFragmentSorter.getSortCriteria(SID, fID);
42
43 SortedFragmentMap.emplace( SortValue, i );
44 }
45 }
46#endif
47
48 const VCamera &CurrentCameraSettings() const
49 {
50 return mySeaBed.myCamera;
51 }
52
53 double ApparentCellSize2_Threshold() const;
54
55 bool checkIfFragmentIsTooDetailedOrInvisible(const Fiber::SkeletonID&LevelID ,
61 bool&isInside,
62 bool&isInvisible) const;
63
64 /*
65 @param theFragmentID A fragment ID for the given Representation.
66 */
67 bool checkIfVertexFragmentIsTooDetailedOrInvisible(const Fiber::SkeletonID&LevelID ,
71 bool&isInside,
72 bool&isInvisible) const;
73
74 bool checkIfVertexCompatibleFragmentIsTooDetailedOrInvisible(const Fiber::SkeletonID&LevelID ,
78 bool&isInside,
79 bool&isInvisible) const;
80
81 bool checkIfFragmentIsTooDetailedOrInvisible(const GridAnemone::SkeletonSet::const_iterator&S,
84 bool&isInside,
85 bool&isInvisible) const;
86
87 mutable map<index_t, int> Statistics;
88 mutable index_t HighestUsedLevel = 0;
89
90 int MaxCollectedFragsPerLevel() const
91 {
92 int i = 0;
93 for(const auto&L : Statistics)
94 {
95 if (L.second>i) i = L.second;
96 }
97 return i;
98 }
99
100 void includeInStatistics(const SkeletonID&ID) const
101 {
102 Statistics[ ID.getHomogeneousLevel() ]++;
103 if (ID.getHomogeneousLevel()>HighestUsedLevel)
104 HighestUsedLevel = ID.getHomogeneousLevel();
105 }
106
107
108static constexpr bool SortFragments = false;
109
110 void prepareFragment(const GridAnemone::SkeletonSet::const_iterator&S,
112 bool TerminalFragment) const;
113 // TODO: check how to optimize the get inside information, since it already has been computed by the caller
121
122 void recurseLevelFragment(const GridAnemone::SkeletonSet::const_iterator&S,
124
128 void recurseLevel(const GridAnemone::SkeletonSet::const_iterator&S);
129
130 /*
131 Recursion over a connectivity fragment
132 */
133 void renderRefinedConnectivityFragment(const RefinedFragmentSkeleton&Refinement,
139
141 );
142
143 void renderRecursiveConnectivityFragment(const SkeletonID&CurrentConnectivityID,
148
149 void renderConnectivity(const SkeletonID&CurrentConnectivityID,
152
153 void ShowStatistics() const;
154
155// RecursiveSeaBed(SeaBed&theSeaBed, const GridAnemone::FragmentSorter&FS, const VCamera&TheCameraSettings,
156
159
160};
161
162
163
164} // namespace
165
166#endif // __FISH_POND_ANEMONEFISH_RecursiveSeabed_HPP
An iterator with an optional DataCreator, which is just a class to intercept creation of data along a...
Definition CreativeIterator.hpp:34
A Field is a collection of CreativeArrayBase reference pointers which are accessed via FragmentID obj...
Definition Field.hpp:245
A relative representation from the fragments of one one Skeleton to the fragments of another Skeleton...
Definition RefinedFragmentSkeleton.hpp:19
Identifier for Skeletons within a Grid.
Definition SkeletonID.hpp:24
index_t getHomogeneousLevel() const
IF this skeleton ID refers to a refinement level that is same in all dimensions, return that single i...
Definition SkeletonID.hpp:189
A Skeleton is a set of Representation object, each of them accessed by an Representer object.
Definition Skeleton.hpp:102
note: cannot derive from FloatingSkeletonRenderer as long as independent base class TriangleRenderer ...
Definition RecursiveSeaBed.hpp:19
int isInside(const Skeleton &VertexSkeleton, const RefPtr< FragmentID > &theFragmentID) const
Definition RecursiveSeaBed.cpp:333
void recurseLevel(const GridAnemone::SkeletonSet::const_iterator &S)
Recursion over vertices.
Definition RecursiveSeaBed.cpp:550
Definition SeaBed.hpp:36