#include <FlowGeometry.h>
Public Member Functions | |
FlowGeometry () | |
~FlowGeometry () | |
deletes the allocated geometry storage | |
bool | getInterpolationAt (flowvec3 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 | 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 | |
flowvec3 | normalizeCoords (flowvec3 pos) |
compression of coordinates in each dimension separately, returns values scaled to <0,1> | |
flowvec3 | unNormalizeCoords (flowvec3 pos) |
inverts the compression. From values of <0,1> it restores the real geometrical coordinates | |
bool | getIsFlipped () |
returns if the geometry is flipped or not | |
int | getNearestVtxNaively (flowvec3 pos) |
a very slow and dumb routine, that finds the nearest vertex to the given position | |
int | getNearestVtx (flowvec3 pos) |
a very fast and intelligent routine, that finds the nearest vertex to the given position in log(n) time | |
flowvec3 | getPos (int vtxID) |
FlowGeometry () | |
~FlowGeometry () | |
deletes the allocated geometry storage | |
bool | getInterpolationAt (flowvec3 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 | 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 | |
flowvec3 | normalizeCoords (flowvec3 pos) |
compression of coordinates in each dimension separately, returns values scaled to <0,1> | |
flowvec3 | unNormalizeCoords (flowvec3 pos) |
inverts the compression. From values of <0,1> it restores the real geometrical coordinates | |
bool | getIsFlipped () |
int | getNearestVtxNaively (flowvec3 pos) |
a very slow and dumb routine, that finds the nearest vertex to the given position | |
int | getNearestVtx (flowvec3 pos) |
flowvec3 | getPos (int vtxID) |
Private Member Functions | |
int | getVtx (int x, int y) |
returns general vtxID for the vertex array indexes | |
int | getVtxX (int vtxID) |
returns X index for the general vtxID | |
int | getVtxY (int vtxID) |
returns Y index for the general vtxID | |
int | getXYvtx (flowvec3 pos) |
returns X index of the last vertex lying left to the position x and the Y index of the last vertex lying under the position y | |
float | getPosX (int vtxID) |
returns the position of the vertex | |
float | getPosY (int vtxID) |
returns the y position of the vertex | |
int | getVtx (int x, int y) |
returns general vtxID for the vertex array indexes | |
int | getVtxX (int vtxID) |
returns X index for the general vtxID | |
int | getVtxY (int vtxID) |
returns Y index for the general vtxID | |
int | getXYvtx (flowvec3 pos) |
returns X index of the last vertex lying left to the position x and the Y index of the last vertex lying under the position y | |
float | getPosX (int vtxID) |
returns the position of the vertex | |
float | getPosY (int vtxID) |
returns the y position of the vertex | |
Private Attributes | |
int | dim [3] |
resolution of the data for the dimensions X, Y | |
flowvec3 | boundaryMin |
minimum boundary values for the dataset geometry sotred as {minX, minY) | |
flowvec3 | boundaryMax |
maximum boundary values for the dataset geometry sotred as (maxX, maxY) | |
flowvec3 | boundarySize |
boundary sizes for the dataset geometry sotred as (maX - minX, maxY - minY) | |
float | deltaX |
float | deltaY |
int * | surroundingIndices |
bool | xIndexFound |
int | xOffsetLeft |
int | xOffsetRight |
bool | yIndexFound |
int | yOffsetUp |
int | yOffsetDown |
float | yDist |
float | xDist |
int | actIndex |
int | minIndexX |
int | maxIndexX |
int | middleIndexX |
int | minIndexY |
int | maxIndexY |
int | middleIndexY |
float | dist |
int | closest |
float | newd |
flowvec3 * | geometryData |
Storage for the geometry. | |
bool | isFlipped |
indicates whether the x and y axes have to be swaped | |
Friends | |
class | FlowData |
FlowGeometry::FlowGeometry | ( | ) |
FlowGeometry::~FlowGeometry | ( | ) |
deletes the allocated geometry storage
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::getBottomNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its bottom
int FlowGeometry::getDimX | ( | ) |
returns the number of vertices in X dimension
int FlowGeometry::getDimX | ( | ) |
returns the number of vertices in X dimension
int FlowGeometry::getDimY | ( | ) |
returns the number of vertices in Y dimension
int FlowGeometry::getDimY | ( | ) |
returns the number of vertices in Y dimension
int FlowGeometry::getDimZ | ( | ) |
returns the number of vertices in Z dimension, is always 1
int FlowGeometry::getDimZ | ( | ) |
returns the number of vertices in Z dimension, is always 1
bool FlowGeometry::getInterpolationAt | ( | flowvec3 | 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::getInterpolationAt | ( | flowvec3 | 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 | ( | ) |
bool FlowGeometry::getIsFlipped | ( | ) |
returns if the geometry is flipped or not
int FlowGeometry::getLeftNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its left
int FlowGeometry::getLeftNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its left
float FlowGeometry::getMaxX | ( | ) |
returns the maximum in the X dimension
float FlowGeometry::getMaxX | ( | ) | [inline] |
returns the maximum in the X dimension
float FlowGeometry::getMaxY | ( | ) |
returns the maximum in the Y dimension
float FlowGeometry::getMaxY | ( | ) | [inline] |
returns the maximum in the Y dimension
float FlowGeometry::getMinX | ( | ) |
returns the minimum in the X dimension
float FlowGeometry::getMinX | ( | ) | [inline] |
returns the minimum in the X dimension
float FlowGeometry::getMinY | ( | ) |
returns the minimum in the Y dimension
float FlowGeometry::getMinY | ( | ) | [inline] |
returns the minimum in the Y dimension
int FlowGeometry::getNearestVtx | ( | flowvec3 | pos | ) |
int FlowGeometry::getNearestVtx | ( | flowvec3 | pos | ) |
a very fast and intelligent routine, that finds the nearest vertex to the given position in log(n) time
int FlowGeometry::getNearestVtxNaively | ( | flowvec3 | pos | ) |
a very slow and dumb routine, that finds the nearest vertex to the given position
int FlowGeometry::getNearestVtxNaively | ( | flowvec3 | pos | ) |
a very slow and dumb routine, that finds the nearest vertex to the given position
flowvec3 FlowGeometry::getPos | ( | int | vtxID | ) |
flowvec3 FlowGeometry::getPos | ( | int | vtxID | ) | [inline] |
float FlowGeometry::getPosX | ( | int | vtxID | ) | [private] |
returns the position of the vertex
returns the x position of the vertex
float FlowGeometry::getPosX | ( | int | vtxID | ) | [inline, private] |
returns the position of the vertex
returns the x position of the vertex
float FlowGeometry::getPosY | ( | int | vtxID | ) | [private] |
returns the y position of the vertex
float FlowGeometry::getPosY | ( | int | vtxID | ) | [inline, private] |
returns the y position of the vertex
int FlowGeometry::getRightNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its right
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
int FlowGeometry::getTopNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on its top
int FlowGeometry::getVtx | ( | int | x, | |
int | y | |||
) | [private] |
returns general vtxID for the vertex array indexes
int FlowGeometry::getVtx | ( | int | x, | |
int | y | |||
) | [private] |
returns general vtxID for the vertex array indexes
int FlowGeometry::getVtxX | ( | int | vtxID | ) | [private] |
returns X index for the general vtxID
int FlowGeometry::getVtxX | ( | int | vtxID | ) | [private] |
returns X index for the general vtxID
int FlowGeometry::getVtxY | ( | int | vtxID | ) | [private] |
returns Y index for the general vtxID
int FlowGeometry::getVtxY | ( | int | vtxID | ) | [private] |
returns Y index for the general vtxID
int FlowGeometry::getXYvtx | ( | flowvec3 | pos | ) | [private] |
returns X index of the last vertex lying left to the position x and the Y index of the last vertex lying under the position y
int FlowGeometry::getXYvtx | ( | flowvec3 | pos | ) | [private] |
returns X index of the last vertex lying left to the position x and the Y index of the last vertex lying under the position y
compression of coordinates in each dimension separately, returns values scaled to <0,1>
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
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
inverts the compression. From values of <0,1> it restores the real geometrical coordinates
FlowData [friend] |
int FlowGeometry::actIndex [private] |
flowvec3 FlowGeometry::boundaryMax [private] |
maximum boundary values for the dataset geometry sotred as (maxX, maxY)
flowvec3 FlowGeometry::boundaryMin [private] |
minimum boundary values for the dataset geometry sotred as {minX, minY)
flowvec3 FlowGeometry::boundarySize [private] |
boundary sizes for the dataset geometry sotred as (maX - minX, maxY - minY)
int FlowGeometry::closest [private] |
float FlowGeometry::deltaX [private] |
float FlowGeometry::deltaY [private] |
int FlowGeometry::dim [private] |
resolution of the data for the dimensions X, Y
float FlowGeometry::dist [private] |
flowvec3 * FlowGeometry::geometryData [private] |
Storage for the geometry.
bool FlowGeometry::isFlipped [private] |
indicates whether the x and y axes have to be swaped
int FlowGeometry::maxIndexX [private] |
int FlowGeometry::maxIndexY [private] |
int FlowGeometry::middleIndexX [private] |
int FlowGeometry::middleIndexY [private] |
int FlowGeometry::minIndexX [private] |
int FlowGeometry::minIndexY [private] |
float FlowGeometry::newd [private] |
int * FlowGeometry::surroundingIndices [private] |
float FlowGeometry::xDist [private] |
bool FlowGeometry::xIndexFound [private] |
int FlowGeometry::xOffsetLeft [private] |
int FlowGeometry::xOffsetRight [private] |
float FlowGeometry::yDist [private] |
bool FlowGeometry::yIndexFound [private] |
int FlowGeometry::yOffsetDown [private] |
int FlowGeometry::yOffsetUp [private] |