CartesianSurface

Class CartesianSurface represents regular rectangular-cell surface

Constructors

this
this()

Default constructor, doesn't allocate memory for height map

this
this(CartesianSurface surface)

Copy constructor, returns the exact copy of the given surface

Members

Functions

cellXIndex
int cellXIndex(double x)

Returns cell index from a given X coordinate. Maximum number is nx - 1 Returns -1 if a given coordinate is outside the surface

cellYIndex
int cellYIndex(double y)

Returns cell index from a given Y coordinate. Maximum number is ny - 1 Returns -1 if a given coordinate is outside the surface

dx
double dx()

Returns surface increment (cell size) along X axis

dy
double dy()

Returns surface increment (cell size) along Y axis

getZ
double getZ(double x, double y)

Returns z value of a point with given coordinate using bilinear interpolation

isInsideSurface
bool isInsideSurface(double x, double y)

Returns true if point with given coordinates is inside surface boundaries, otherwise returns false

nx
int nx()

Returns number of nodes along X axis

ny
int ny()

Returns number of nodes along Y axis

opBinary
CartesianSurface opBinary(double rhs)

Operators +, -, *, / overloading for a surface and a fixed value

opBinary
CartesianSurface opBinary(CartesianSurface rhs)

Operators +, -, *, / overloading for two surfaces

opOpAssign
CartesianSurface opOpAssign(CartesianSurface rhs)

Operators +=, -=, *=, /= overloading for two surfaces

opOpAssign
CartesianSurface opOpAssign(double rhs)

Operators +=, -=, *=, /= overloading for a surface and a fixed value

setHeader
void setHeader(int nx, int ny, double xOrigin, double yOrigin, double dx, double dy)

Sets surface header and allocates surface memory

xOrigin
double xOrigin()

Returns X coordinate of surface origin

yOrigin
double yOrigin()

Returns Y coordinate of surface origin

z
Slice!(double*, 2) z()

Method to access height map.

Meta

Authors

Dmitriy Linev

Date

Date: 2019-2020