FiberVISH 0.2
Fish - The Fiber Bundle API for the Vish Visualization Shell
ExpandBBox.hpp
1#ifndef __FIBER_BASEOP_EXPANDBBOX_HPP
2#define __FIBER_BASEOP_EXPANDBBOX_HPP
3
4#include "gridopDllApi.h"
5#include "elementary/aerie/BoundingBox.hpp"
6#include "fish/fiber/field/CreativeArray.hpp"
7#include "fish/fiber/field/Field.hpp"
8#include "fish/fiber/grid/Grid.hpp"
9
10#include "fish/fiber/field/RegularlyFragmentedField.hpp"
11
12namespace Fiber
13{
14
17
21extern gridop_API
22RefPtr<BoundingBox> ComputeBBox(const RefPtr<MemBase>&CoordBase);
23
44
60extern gridop_API bool ExpandBBox(RefPtr<BoundingBox>&BBox, CreativeArrayBase&CAB, DataCreationMode theDataCreationMode = AlwaysCreate);
61
62
77extern gridop_API RefPtr<BoundingBox> getFragmentBBox(const RefPtr<FragmentID>&fid,
78 const RefPtr<CreativeArrayBase>&FragmentDataCreator,
79 const Field&Coords);
80
86extern gridop_API RefPtr<BoundingBox> getBoundingBox(Field&Coords);
87
88extern gridop_API RefPtr<BoundingBox> getBoundingBox( const RefPtr<Field>& Coords );
89
90
91template <int N>
92inline RefPtr<BoundingBox> getBoundingBox( const RefPtr<RegularlyFragmentedField<N>>&Coords )
93{
94 if (!Coords)
95 return nullptr;
96
97 return getBoundingBox( *Coords );
98}
99
100extern gridop_API RefPtr<BoundingBox> getBoundingBox(const RefPtr<Representation>&Vertices);
101extern gridop_API RefPtr<BoundingBox> getBoundingBox(const RefPtr<Skeleton>&Vertices,
102 const RefPtr<Fiber::Chart>&chart);
103
104extern gridop_API RefPtr<BoundingBox> getBoundingBox(const Grid&G, const RefPtr<Fiber::Chart>&chart = nullptr);
105
106/*
107extern gridop_API bool expandBoundingBox(const RefPtr<Field>&Coords, RefPtr<BoundingBox>&theBox);
108extern gridop_API bool expandBoundingBox(RefPtr<BoundingBox>&theBox, const RefPtr<Field>&Coords);
109*/
110
111#if 0
112
113RETIRED
114
118class gridop_API BBoxExpander : Field::Iterator
119{
120 RefPtr<BoundingBox> BBox;
121
122public:
123
126 BBoxExpander(const RefPtr<BoundingBox>&BBox = NullPtr() );
127
128 BBoxExpander(const RefPtr<BoundingBall>&BBall);
129
137 BBoxExpander(Field&Coords);
138
164 bool expand(Field&Coords, RefPtr<BoundingBox>&theBox);
165
174 bool apply(const RefPtr<FragmentID>&f, const RefPtr<CreativeArrayBase>&CAB) override;
175
177 friend RefPtr<BoundingBox> getBoundingBox(Field&Coords);
178
180 friend RefPtr<BoundingBox> getBoundingBox(const Grid&G, const RefPtr<Fiber::Chart>&chart );
181
186 friend bool expandBoundingBox(const RefPtr<Field>&Coords, RefPtr<BoundingBox>&theBox);
187
196 friend bool expandBoundingBox(RefPtr<BoundingBox>&theBox, const RefPtr<Field>&Coords);
197
198};
199#endif
200
201
202} // end namespace Fiber
203
204#endif // __FIBER_BASEOP_EXPANDBBOX_HPP
_Expr< _ValFunClos< _ValArray, _Tp >, _Tp > apply(_Tp __func(_Tp)) const
Given a fragmented field of curvilinear coordinates, (3D array of coordinates), build a uniform Grid ...
Definition FAQ.dox:2
DataCreationMode
Under which conditions to create data when calling ExpandBBox().
Definition ExpandBBox.hpp:28
@ AlwaysCreate
Always create data and even scan, if needed.
Definition ExpandBBox.hpp:30
@ ComputeOrRequest
Compute bounding box only when data exists in memory, otherwise request them for a subsequent call.
Definition ExpandBBox.hpp:36
@ ComputeOnlyIfAvailable
Compute bounding box only when data exists in memory, otherwise don't even request them.
Definition ExpandBBox.hpp:42
RefPtr< BoundingBox > ComputeBBox(const RefPtr< MemBase > &CoordBase)
Compute the bounding box from a given mem array of coordinates.
Definition ExpandBBox.cpp:27
bool ExpandBBox(RefPtr< BoundingBox > &BBox, CreativeArrayBase &CAB, DataCreationMode theDataCreationMode)
Expand a given bounding box by the given data array.
Definition ExpandBBox.cpp:68
std::nullptr_t NullPtr
StrongPtr< Object, ObjectBase > RefPtr