# FlowGeometry Class Reference

class for handling the geometry == rectangular grids organized in vertices and cells More...

`#include <FlowGeometry.h>`

Collaboration diagram for FlowGeometry:
[legend]

List of all members.

## Public 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
| 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
int | getDimXY ()
| returns the number of vertices in one FlowData-Layer (X and Y direction)
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
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
vec3 | getBoundarySize ()
## Public Attributes
int | dim [3]
| resolution of the data for the dimensions X, Y, Z
vec3 | boundaryMin
| minimum boundary values for the dataset geometry sotred as {minX, minY)
vec3 | boundaryMax
| maximum boundary values for the dataset geometry sotred as (maxX, maxY)
vec3 | boundarySize
| boundary sizes for the dataset geometry sotred as (maX - minX, maxY - minY)
vec3 * | geometryData
| Storage for the geometry.
bool | isFlipped
| indicates whether the x and y axes have to be swaped
## Friends
class | FlowData

## Detailed Description

class for handling the geometry == rectangular grids organized in vertices and cells

## Constructor & Destructor Documentation

FlowGeometry::FlowGeometry | ( |  | ) |

FlowGeometry::~FlowGeometry | ( |  | ) |

deletes the allocated geometry storage

## Member Function Documentation

int FlowGeometry::getBottomNeigh | ( | int | vtxID | ) |

returns the vertex ID of the neighbour on its bottom

vec3 FlowGeometry::getBoundarySize | ( |  | ) |

int FlowGeometry::getDimX | ( |  | ) | `[inline]`

returns the number of vertices in X dimension

int FlowGeometry::getDimXY | ( |  | ) |

returns the number of vertices in one FlowData-Layer (X and Y direction)

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.

Parameters:

  | pos | geometrical position for the lookup
  | vtxID | list of surrounding vertices (given by vertex ID)
  | coef | list of surrounding vertex weights (sum == 1.0)

Returns:
  true if the given position is inside of the geometrical boundaries

int FlowGeometry::getLeftNeigh | ( | int | vtxID | ) |

returns the vertex ID of the neighbour on its left

float FlowGeometry::getMaxX | ( |  | ) | `[inline]`

returns the maximum in the X dimension

float FlowGeometry::getMaxY | ( |  | ) | `[inline]`

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

vec3 FlowGeometry::getPos | ( | int | vtxID | ) | `[inline]`

returns the position of the vertex

float FlowGeometry::getPosX | ( | int | vtxID | ) | `[inline]`

returns the x position of the vertex

float FlowGeometry::getPosY | ( | int | vtxID | ) | `[inline]`

returns the y position of the vertex

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::getVtx | ( | int | x,
|  | int | y |
| ) |  |  |

returns general vtxID for the vertex array indexes

int FlowGeometry::getVtxX | ( | int | vtxID | ) |

returns X index for the general vtxID

int FlowGeometry::getVtxY | ( | int | vtxID | ) |

returns Y index for the general vtxID

int FlowGeometry::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

Returns the ID of the next grid vertex to the left and above the given pos vector In case of an error (pos outisde boundaries) -1 is returned

vec3 FlowGeometry::normalizeCoords | ( | vec3 | pos | ) |

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

vec3 FlowGeometry::unNormalizeCoords | ( | vec3 | pos | ) |

inverts the compression. From values of <0,1> it restores the real geometrical coordinates

## Friends And Related Function Documentation

friend class FlowData`[friend]`

## Member Data Documentation

vec3 FlowGeometry::boundaryMax

maximum boundary values for the dataset geometry sotred as (maxX, maxY)

vec3 FlowGeometry::boundaryMin

minimum boundary values for the dataset geometry sotred as {minX, minY)

vec3 FlowGeometry::boundarySize

boundary sizes for the dataset geometry sotred as (maX - minX, maxY - minY)

int FlowGeometry::dim[3]

resolution of the data for the dimensions X, Y, Z

vec3* FlowGeometry::geometryData

Storage for the geometry.

bool FlowGeometry::isFlipped

indicates whether the x and y axes have to be swaped

The documentation for this class was generated from the following files:

- F:/Meine Dateien/Visual Studio 2005/Projects/InsightFlow/header/FlowGeometry.h
- F:/Meine Dateien/Visual Studio 2005/Projects/InsightFlow/src/FlowGeometry.cpp