1#ifndef __FIBER_BASEOP_EXPANDBBOX_HPP
2#define __FIBER_BASEOP_EXPANDBBOX_HPP
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"
10#include "fish/fiber/field/RegularlyFragmentedField.hpp"
22RefPtr<BoundingBox>
ComputeBBox(
const RefPtr<MemBase>&CoordBase);
77extern gridop_API RefPtr<BoundingBox> getFragmentBBox(
const RefPtr<FragmentID>&fid,
78 const RefPtr<CreativeArrayBase>&FragmentDataCreator,
86extern gridop_API RefPtr<BoundingBox> getBoundingBox(Field&Coords);
88extern gridop_API RefPtr<BoundingBox> getBoundingBox(
const RefPtr<Field>& Coords );
92inline RefPtr<BoundingBox> getBoundingBox(
const RefPtr<RegularlyFragmentedField<N>>&Coords )
97 return getBoundingBox( *Coords );
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);
104extern gridop_API RefPtr<BoundingBox> getBoundingBox(
const Grid&G,
const RefPtr<Fiber::Chart>&chart =
nullptr);
118class gridop_API BBoxExpander : Field::Iterator
120 RefPtr<BoundingBox> BBox;
126 BBoxExpander(
const RefPtr<BoundingBox>&BBox =
NullPtr() );
128 BBoxExpander(
const RefPtr<BoundingBall>&BBall);
137 BBoxExpander(Field&Coords);
164 bool expand(Field&Coords, RefPtr<BoundingBox>&theBox);
174 bool apply(
const RefPtr<FragmentID>&f,
const RefPtr<CreativeArrayBase>&CAB)
override;
177 friend RefPtr<BoundingBox> getBoundingBox(Field&Coords);
180 friend RefPtr<BoundingBox> getBoundingBox(
const Grid&G,
const RefPtr<Fiber::Chart>&chart );
186 friend bool expandBoundingBox(
const RefPtr<Field>&Coords, RefPtr<BoundingBox>&theBox);
196 friend bool expandBoundingBox(RefPtr<BoundingBox>&theBox,
const RefPtr<Field>&Coords);
_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
StrongPtr< Object, ObjectBase > RefPtr