class for handling the geometry == rectangular grids organized in vertices and cells More...
#include <FlowGeometry.h>
Public Member Functions | |
FlowGeometry () | |
~FlowGeometry () | |
deletes the allocated geometry storage | |
bool | getInterpolationAt (vec3 pos, int *vtxID, float *coef) |
Returns true if inside. Stores the vertex indices and interpolation weights for the given position in the arrays. | |
bool | readFromFile (char *header, FILE *fp, bool bigEndian) |
reads the geometry gris data from a file | |
int | getDimX () |
returns the number of vertices in X dimension | |
int | getDimY () |
returns the number of vertices in Y dimension | |
int | getDimZ () |
returns the number of vertices in Z dimension, is always 1 | |
float | getMinX () |
returns the minimum in the X dimension | |
float | getMaxX () |
returns the maximum in the X dimension | |
float | getMinY () |
returns the minimum in the Y dimension | |
float | getMaxY () |
returns the maximum in the Y dimension | |
int | getLeftUpperVtx (vec3 pos, int top, int bottom, int left, int right) |
int | getRightNeigh (int vtxID) |
returns the vertex ID of the neighbour on its right | |
int | getTopNeigh (int vtxID) |
returns the vertex ID of the neighbour on its top | |
int | getLeftNeigh (int vtxID) |
returns the vertex ID of the neighbour on its left | |
int | getBottomNeigh (int vtxID) |
returns the vertex ID of the neighbour on its bottom | |
vec3 | normalizeCoords (vec3 pos) |
compression of coordinates in each dimension separately, returns values scaled to <0,1> | |
vec3 | unNormalizeCoords (vec3 pos) |
inverts the compression. From values of <0,1> it restores the real geometrical coordinates | |
bool | getIsFlipped () |
Friends | |
class | FlowData |
class for handling the geometry == rectangular grids organized in vertices and cells
FlowGeometry::FlowGeometry | ( | ) |
FlowGeometry::~FlowGeometry | ( | ) |
deletes the allocated geometry storage
int FlowGeometry::getBottomNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its bottom
int FlowGeometry::getDimX | ( | ) | [inline] |
returns the number of vertices in X dimension
int FlowGeometry::getDimY | ( | ) | [inline] |
returns the number of vertices in Y dimension
int FlowGeometry::getDimZ | ( | ) | [inline] |
returns the number of vertices in Z dimension, is always 1
bool FlowGeometry::getInterpolationAt | ( | vec3 | pos, |
int * | vtxID, | ||
float * | coef | ||
) |
Returns true if inside. Stores the vertex indices and interpolation weights for the given position in the arrays.
Stores the indexes and weights of vertices surrounding the given position. This information can be used later on for interpolation of channel values.
pos | geometrical position for the lookup |
vtxID | list of surrounding vertices (given by vertex ID) |
coef | list of surrounding vertex weights (sum == 1.0) |
bool FlowGeometry::getIsFlipped | ( | ) |
int FlowGeometry::getLeftNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its left
int FlowGeometry::getLeftUpperVtx | ( | vec3 | pos, |
int | top, | ||
int | bottom, | ||
int | left, | ||
int | right | ||
) |
float FlowGeometry::getMaxX | ( | ) |
returns the maximum in the X dimension
float FlowGeometry::getMaxY | ( | ) |
returns the maximum in the Y dimension
float FlowGeometry::getMinX | ( | ) | [inline] |
returns the minimum in the X dimension
float FlowGeometry::getMinY | ( | ) | [inline] |
returns the minimum in the Y dimension
int FlowGeometry::getRightNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its right
int FlowGeometry::getTopNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its top
compression of coordinates in each dimension separately, returns values scaled to <0,1>
bool FlowGeometry::readFromFile | ( | char * | header, |
FILE * | fp, | ||
bool | bigEndian | ||
) |
reads the geometry gris data from a file
inverts the compression. From values of <0,1> it restores the real geometrical coordinates
friend class FlowData [friend] |