Use this class to compute a local cell index and fragment ID (if neccessary) of any coordinate field on a given slice and grid.
More...
#include <LocalFromWorldPoint.hpp>
List of all members.
Classes
- class BBSelectorBase
- Method used to select the next candidate when doing a search in the point in the fragments.
- class BBSelectorMemoryTree
- Select fragment candidates out of all the candidates by doing a query into the KDTree and provide a method to step through the candidates. More...
- class FindCell
- Base class for finding the cell containing the point in a fragment. More...
- class HexaHedralCellNewton
- Finds a cell containing a world point by using the UniGridMapper. More...
- struct MyIterator
- Iterator over fragments.
Public Member Functions
-
bool rayTriangleIntersect (const point orig, const tvector dir, const point vert0, const point vert1, const point vert2, double &t, double &u, double &v, point &intersection)
-
bool rayQuaderIntersect (const point orig, const tvector dir, Vertexlist_t &QV, double &t, double &u, double &v, point &intersection, bivector &normal, unsigned &face)
- LocalFromWorldPoint (Slice &SourceSliceP, const RefPtr< Grid > &SourceGridP, const string &Gridname, const RefPtr< Field > &SourceCoordsP, double res_scale=1.0, double prec_scale=0.1)
- Constructor does some initialization, like iterating over the fragments to build a KDTree if not already found in the Field's intercube and storing fragmentids and bounding boxes back into the grids' bundle.
-
~LocalFromWorldPoint ()
- Destructor.
- bool get (const point position, pair< point, string > &data)
- Get the local index coordinates of a world point and the fragment id of the fragment it is contained in.
-
void setBlockBoundaryEpsilon (const double block_epsilonP)
- int numberOfBordersOfCell (const pair< point, string > localdata, int &hint1, int &hint2)
- returns the number of bordersurfaces of the given cell
- bool getBorderIntersectionNormal (const point worldposition, const pair< point, string > localpoint, const tvector direction, point &intersection, bivector &normal)
- Some helper function that returns the point where the cell is left and the normal of the cells face.
Public Attributes
-
FixedArray< FixedArray< int, 3 >, 12 > Facelist
-
double block_epsilon
-
double res_scale
-
double prec_scale
-
int MaxListSize
Detailed Description
Use this class to compute a local cell index and fragment ID (if neccessary) of any coordinate field on a given slice and grid.
The reason this is encapulated in a class rather in a function is that there are several things done in the constructor once for initialisation once thus speeding up the get function. Also some inner classes are encapsulated and hidden for the user.
Constructor & Destructor Documentation
Fiber::LocalFromWorldPoint::LocalFromWorldPoint |
( |
Slice & |
SourceSliceP, |
|
|
const RefPtr< Grid > & |
SourceGridP, |
|
|
const string & |
Gridname, |
|
|
const RefPtr< Field > & |
SourceCoordsP, |
|
|
double |
res_scale = 1.0 , |
|
|
double |
prec_scale = 0.1 | |
|
) |
| | |
Constructor does some initialization, like iterating over the fragments to build a KDTree if not already found in the Field's intercube and storing fragmentids and bounding boxes back into the grids' bundle.
UniGridMappers are stored for each fragment in a separate grid object either at the provided slice or at the provided uniGrid pointer.
- Parameters:
-
| sliceP | actual time slice |
| SourceGridP | the grid of the coordinates |
| SourceCoordsP | the field that contains the coordinates |
References Fiber::PointSearch::FragmentBoxes.
Member Function Documentation
bool Fiber::LocalFromWorldPoint::get |
( |
const point |
position, |
|
|
pair< point, string > & |
data | |
|
) |
| | |
Get the local index coordinates of a world point and the fragment id of the fragment it is contained in.
- Parameters:
-
| position | world point |
| data | return float index (local position) and fragment name, which can be used to create a FragmentID object |
- Returns:
- true if a point can be found, false if the world point is not contained in the coordinate space of the data. In the point (0,0,0) and an emtpy string if returned via the pair.
- Todo:
should just return a pair<> here as return value, and rather use a fragment ID itself instead of a string
CHECK WHETHER PARAMETERS REALLY NEED TO BE COPIED HERE
bool Fiber::LocalFromWorldPoint::getBorderIntersectionNormal |
( |
const point |
worldposition, |
|
|
const pair< point, string > |
localpoint, |
|
|
const tvector |
direction, |
|
|
point & |
intersection, |
|
|
bivector & |
normal | |
|
) |
| | |
Some helper function that returns the point where the cell is left and the normal of the cells face.
A direction and a position (in world and local positions).
- Todo:
- CHECK WHETHER PARAMETERS REALLY NEED TO BE COPIED HERE
References numberOfBordersOfCell().
int Fiber::LocalFromWorldPoint::numberOfBordersOfCell |
( |
const pair< point, string > |
localdata, |
|
|
int & |
hint1, |
|
|
int & |
hint2 | |
|
) |
| | |