![]() |
Flumy [Free API]
Process based model for meandering chanelized systems
|
Base class for 3D grid description. More...
Base class for 3D grid description.
This class only store grid parameters which are:
The size of the grid is:
Grid origin node is the front bottom left corner of the grid.
2D grid has an "infinite" height (dz=infinite and nz=1).
Public Member Functions | |
| GridParams () | |
| Default constructor. More... | |
| GridParams (const MP_real &dx, const MP_real &dy, const MP_int &nx, const MP_int &ny, const MP_real &ox=0., const MP_real &oy=0.) | |
| Constructor from 2D grid parameters. More... | |
| GridParams (const MP_real &dx, const MP_real &dy, const MP_real &dz, const MP_int &nx, const MP_int &ny, const MP_int &nz, const MP_real &ox=0., const MP_real &oy=0., const MP_real &oz=0.) | |
| Constructor from 3D grid parameters. More... | |
| GridParams (const GridParams &grid) | |
| Copy constructor. More... | |
| virtual | ~GridParams () |
| Destructor. More... | |
| GridParams & | operator= (const GridParams &) |
| Operator =. More... | |
| virtual void | reset (const GridParams &grid) |
| Reset 2D grid parameters to new values. More... | |
| void | reset (const MP_real &dx, const MP_real &dy, const MP_int &nx, const MP_int &ny, const MP_real &ox=0., const MP_real &oy=0.) |
| Reset 2D grid parameters to new values. More... | |
| void | reset (const MP_real &dx, const MP_real &dy, const MP_real &dz, const MP_int &nx, const MP_int &ny, const MP_int &nz, const MP_real &ox=0., const MP_real &oy=0., const MP_real &oz=0.) |
| Reset 3D grid parameters to new values. More... | |
| MP_real | getDx () const |
| Assessor get to protected member variable _dx. More... | |
| MP_real | getDy () const |
| Assessor get to protected member variable _dy. More... | |
| MP_real | getDz () const |
| Assessor get to protected member variable _dz. More... | |
| MP_int | getNx () const |
| Assessor get to protected member variable _nx. More... | |
| MP_int | getNy () const |
| Assessor get to protected member variable _ny. More... | |
| MP_int | getNz () const |
| Assessor get to protected member variable _nz. More... | |
| MP_real | getOx () const |
| Assessor get to protected member variable _ox. More... | |
| MP_real | getOy () const |
| Assessor get to protected member variable _oy. More... | |
| MP_real | getOz () const |
| Assessor get to protected member variable _oz. More... | |
| Point2D | getOrigin () const |
| Assessor get to origin 2D point _ox,_oy. More... | |
| MP_int | getNbNodes () const |
| Return the number of grid nodes. More... | |
| void | getApexRel (Point2D &p1, Point2D &p2, Point2D &p3, Point2D &p4) const |
| Return the 4 apex relative points. More... | |
| void | setLocation (const MP_real &x, const MP_real &y, const MP_real &z=0.) |
| Localize the grid in the geographical system. More... | |
| void | setLocation (const Point3D &location) |
| Localize the grid in the geographical system. More... | |
| void | setLocation (const Point2D &location) |
| Localize the grid in the geographical system. More... | |
| const Point3D & | getLocation () const |
| Return the location of the grid. More... | |
| MP_real | getZLoc () const |
| Assessor get location elevation. More... | |
| void | setRotation (const MP_real &rot) |
| Rotate the grid around z-axis in the geographical system. More... | |
| MP_real | getRotation () const |
| MP_real | getLength () const |
| Return total length of the grid (in meters). It corresponds to the grid size along abscissa axis Ox. More... | |
| MP_real | getWidth () const |
| Return total width of the grid (in meters). It corresponds to the grid size along ordinate axis Oy. More... | |
| MP_real | getHeight () const |
| Return total height of the grid (in meters). It corresponds to the grid size along elevation axis Oz. More... | |
| bool | is3D () const |
| Return true if the grid has 3 dimensions (nz > 1 and dz < MP_MAX_REAL_VALUE) More... | |
| bool | isCompatibleWith (const GridParams &grid, bool check_geo=false) const |
| Return true if the given grid has same parameters. More... | |
| Point2D & | rel2Geo (Point2D &point) const |
| Point2D & | rel2Grid (Point2D &point, bool round=true) const |
| Point2D & | geo2Rel (Point2D &point) const |
| Point2D & | geo2Grid (Point2D &point, bool round=true) const |
| Point2D & | grid2Rel (Point2D &point) const |
| Point2D | grid2Rel (const MP_int &ix, const MP_int &iy) const |
| Point2D | grid2Geo (const MP_int &ix, const MP_int &iy) const |
| Point3D & | rel2Geo (Point3D &point) const |
| Point3D & | geo2Rel (Point3D &point) const |
| ConvexPolyedra2D & | rel2Grid (ConvexPolyedra2D &polyedra) const |
| ConvexPolyedra2D & | grid2Rel (ConvexPolyedra2D &polyedra) const |
| bool | is_on_grid (const Point2D &point) const |
| bool | is_on_grid_nearest (const Point2D &point) const |
Protected Attributes | |
| MP_real | _dx |
| Mesh size (m) along abscissa axis Ox (must be greater than 0) More... | |
| MP_real | _dy |
| Mesh size (m) along ordinate axis Oy (must be greater than 0) More... | |
| MP_real | _dz |
| Mesh size (m) along elevation axis Oz (must be greater than 0) More... | |
| MP_int | _nx |
| Number of nodes along abscissa axis Ox (must be greater than 0) More... | |
| MP_int | _ny |
| Number of nodes along ordinate axis Oy (must be greater than 0) More... | |
| MP_int | _nz |
| Number of nodes along elevation axis Oz (must be greater than 0) More... | |
| MP_real | _ox |
| Origin offset along x-axis (m) More... | |
| MP_real | _oy |
| Origin offset along y-axis (m) More... | |
| MP_real | _oz |
| Origin offset along z-axis (m) More... | |
| Point3D | _location |
| Front bottom left corner (m) of the grid (Geographical Location) More... | |
| MP_real | _rotation |
| MP_real | _cosrot |
| MP_real | _sinrot |
Friends | |
| std::ostream & | operator<< (std::ostream &os, const GridParams &grid) |
| Print grid parameters in an output stream. More... | |
| GridParams::GridParams | ( | ) |
Default constructor.
| GridParams::GridParams | ( | const MP_real & | dx, |
| const MP_real & | dy, | ||
| const MP_int & | nx, | ||
| const MP_int & | ny, | ||
| const MP_real & | ox = 0., |
||
| const MP_real & | oy = 0. |
||
| ) |
Constructor from 2D grid parameters.
| GridParams::GridParams | ( | const MP_real & | dx, |
| const MP_real & | dy, | ||
| const MP_real & | dz, | ||
| const MP_int & | nx, | ||
| const MP_int & | ny, | ||
| const MP_int & | nz, | ||
| const MP_real & | ox = 0., |
||
| const MP_real & | oy = 0., |
||
| const MP_real & | oz = 0. |
||
| ) |
Constructor from 3D grid parameters.
| GridParams::GridParams | ( | const GridParams & | grid | ) |
Copy constructor.
|
inlinevirtual |
Destructor.
| Point3D& GridParams::geo2Rel | ( | Point3D & | point | ) | const |
Return the 4 apex relative points.
|
inline |
Assessor get to protected member variable _dx.
|
inline |
Assessor get to protected member variable _dy.
|
inline |
Assessor get to protected member variable _dz.
|
inline |
Return total height of the grid (in meters).
It corresponds to the grid size along elevation axis Oz.
|
inline |
Return total length of the grid (in meters).
It corresponds to the grid size along abscissa axis Ox.
| const Point3D& GridParams::getLocation | ( | ) | const |
Return the location of the grid.
|
inline |
Return the number of grid nodes.
|
inline |
Assessor get to protected member variable _nx.
|
inline |
Assessor get to protected member variable _ny.
|
inline |
Assessor get to protected member variable _nz.
| Point2D GridParams::getOrigin | ( | ) | const |
Assessor get to origin 2D point _ox,_oy.
|
inline |
Assessor get to protected member variable _ox.
|
inline |
Assessor get to protected member variable _oy.
|
inline |
Assessor get to protected member variable _oz.
| MP_real GridParams::getRotation | ( | ) | const |
|
inline |
Return total width of the grid (in meters).
It corresponds to the grid size along ordinate axis Oy.
|
inline |
Assessor get location elevation.
| Point2D GridParams::grid2Geo | ( | const MP_int & | ix, |
| const MP_int & | iy | ||
| ) | const |
| Point2D GridParams::grid2Rel | ( | const MP_int & | ix, |
| const MP_int & | iy | ||
| ) | const |
| ConvexPolyedra2D& GridParams::grid2Rel | ( | ConvexPolyedra2D & | polyedra | ) | const |
|
inline |
Return true if the grid has 3 dimensions (nz > 1 and dz < MP_MAX_REAL_VALUE)
| bool GridParams::is_on_grid | ( | const Point2D & | point | ) | const |
| bool GridParams::is_on_grid_nearest | ( | const Point2D & | point | ) | const |
| bool GridParams::isCompatibleWith | ( | const GridParams & | grid, |
| bool | check_geo = false |
||
| ) | const |
Return true if the given grid has same parameters.
| GridParams& GridParams::operator= | ( | const GridParams & | ) |
Operator =.
| Point3D& GridParams::rel2Geo | ( | Point3D & | point | ) | const |
| ConvexPolyedra2D& GridParams::rel2Grid | ( | ConvexPolyedra2D & | polyedra | ) | const |
|
virtual |
Reset 2D grid parameters to new values.
Reimplemented in GridReal.
| void GridParams::reset | ( | const MP_real & | dx, |
| const MP_real & | dy, | ||
| const MP_int & | nx, | ||
| const MP_int & | ny, | ||
| const MP_real & | ox = 0., |
||
| const MP_real & | oy = 0. |
||
| ) |
Reset 2D grid parameters to new values.
| void GridParams::reset | ( | const MP_real & | dx, |
| const MP_real & | dy, | ||
| const MP_real & | dz, | ||
| const MP_int & | nx, | ||
| const MP_int & | ny, | ||
| const MP_int & | nz, | ||
| const MP_real & | ox = 0., |
||
| const MP_real & | oy = 0., |
||
| const MP_real & | oz = 0. |
||
| ) |
Reset 3D grid parameters to new values.
| void GridParams::setLocation | ( | const MP_real & | x, |
| const MP_real & | y, | ||
| const MP_real & | z = 0. |
||
| ) |
Localize the grid in the geographical system.
| void GridParams::setLocation | ( | const Point2D & | location | ) |
Localize the grid in the geographical system.
| void GridParams::setLocation | ( | const Point3D & | location | ) |
Localize the grid in the geographical system.
| void GridParams::setRotation | ( | const MP_real & | rot | ) |
Rotate the grid around z-axis in the geographical system.
|
friend |
Print grid parameters in an output stream.
|
protected |
Cosinus of rotation (internal use)
|
protected |
Mesh size (m) along abscissa axis Ox (must be greater than 0)
|
protected |
Mesh size (m) along ordinate axis Oy (must be greater than 0)
|
protected |
Mesh size (m) along elevation axis Oz (must be greater than 0)
|
protected |
Front bottom left corner (m) of the grid (Geographical Location)
|
protected |
Number of nodes along abscissa axis Ox (must be greater than 0)
|
protected |
Number of nodes along ordinate axis Oy (must be greater than 0)
|
protected |
Number of nodes along elevation axis Oz (must be greater than 0)
|
protected |
Origin offset along x-axis (m)
|
protected |
Origin offset along y-axis (m)
|
protected |
Origin offset along z-axis (m)
|
protected |
Rotation around Oz axis (degrees - counterclockwise starting from West->East direction) (West->East = 0° , South->North = 90°)
|
protected |
Sinus of rotation (internal use)