#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. | |
| float * | getInterpolationMatrix () |
| 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 it's right | |
| int | getTopNeigh (int vtxID) |
| returns the vertex ID of the neighbour on it's top | |
| int | getLeftNeigh (int vtxID) |
| returns the vertex ID of the neighbour on it's left | |
| int | getBottomNeigh (int vtxID) |
| returns the vertex ID of the neighbour on it's bottom | |
| vec3 | normalizeCoords (vec3 pos) |
| compression of coordinates in each dimension separately, returns values in <0,1> | |
| vec3 | unNormalizeCoords (vec3 pos) |
| inverts teh compression and from values of <0,1> restores the real geometrical coordinates | |
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 (vec3 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 | |
| vec3 | getPos (int vtxID) |
| returns the position of the vertex | |
| float | getPosX (int vtxID) |
| returns the x position of the vertex | |
| float | getPosY (int vtxID) |
| returns the y position of the vertex | |
| int | getNearestVtx (vec3 pos) |
| a very slow and dumb routine, that finds the nearest vertex to the given position | |
Private Attributes | |
| int | dim [2] |
| resolution of the data for the dimensions X, Y, Z | |
| vec3 | boundaryMin |
| boundary values for the dataset sotred as {minX, minY), (maxX, maxY), (maX - minX, maxY - minY) | |
| vec3 | boundaryMax |
| vec3 | boundarySize |
| float * | intMat |
| vec3 * | 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
| 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::getVtxY | ( | int | vtxID | ) | [private] |
returns Y index for the general vtxID
| int FlowGeometry::getXYvtx | ( | vec3 | 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
| vec3 FlowGeometry::getPos | ( | int | vtxID | ) | [private] |
returns the position of the vertex
| float FlowGeometry::getPosX | ( | int | vtxID | ) | [private] |
returns the x position of the vertex
| float FlowGeometry::getPosY | ( | int | vtxID | ) | [private] |
returns the y position of the vertex
| int FlowGeometry::getNearestVtx | ( | vec3 | pos | ) | [private] |
a very slow and dumb routine, that finds the nearest vertex to the given position
| 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.
| float * FlowGeometry::getInterpolationMatrix | ( | ) |
| bool FlowGeometry::readFromFile | ( | char * | header, | |
| FILE * | fp, | |||
| bool | bigEndian | |||
| ) |
reads the geometry gris data from a file
| int FlowGeometry::getDimX | ( | ) |
returns the number of vertices in X 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
| float FlowGeometry::getMinX | ( | ) |
returns the minimum in the X dimension
| float FlowGeometry::getMaxX | ( | ) |
returns the maximum in the X dimension
| float FlowGeometry::getMinY | ( | ) |
returns the minimum in the Y dimension
| float FlowGeometry::getMaxY | ( | ) |
returns the maximum in the Y dimension
| int FlowGeometry::getRightNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on it's right
| int FlowGeometry::getTopNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on it's top
| int FlowGeometry::getLeftNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on it's left
| int FlowGeometry::getBottomNeigh | ( | int | vtxID | ) |
returns the vertex ID of the neighbour on it's bottom
compression of coordinates in each dimension separately, returns values in <0,1>
inverts teh compression and from values of <0,1> restores the real geometrical coordinates
friend class FlowData [friend] |
int FlowGeometry::dim[2] [private] |
resolution of the data for the dimensions X, Y, Z
vec3 FlowGeometry::boundaryMin [private] |
boundary values for the dataset sotred as {minX, minY), (maxX, maxY), (maX - minX, maxY - minY)
vec3 FlowGeometry::boundaryMax [private] |
vec3 FlowGeometry::boundarySize [private] |
float* FlowGeometry::intMat [private] |
vec3* FlowGeometry::geometryData [private] |
Storage for the geometry.
bool FlowGeometry::isFlipped [private] |
indicates whether the x and y axes have to be swaped
1.5.4