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

assignConstant
void assignConstant(double z)

Assigns each surface note to a constant height value

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

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

max
double max()

Returns a maximum height value in a surface

min
double min()

Returns a minimum height value in a surface

opBinary
CartesianSurface opBinary(CartesianSurface rhs)

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

opBinary
CartesianSurface opBinary(double rhs)

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

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

Properties

dx
double dx [@property getter]

Returns surface increment (cell size) along X axis

dy
double dy [@property getter]

Returns surface increment (cell size) along Y axis

nx
int nx [@property getter]

Returns number of nodes along X axis

ny
int ny [@property getter]

Returns number of nodes along Y axis

xOrigin
double xOrigin [@property getter]

Returns X coordinate of surface origin

yOrigin
double yOrigin [@property getter]

Returns Y coordinate of surface origin

z
double[][] z [@property getter]

Method to access height map.

zMax
double zMax [@property getter]

Returns maximum z value

zMin
double zMin [@property getter]

Returns minimum z value

Variables

m_dx
double m_dx;
Undocumented in source.
m_dy
double m_dy;
Undocumented in source.
m_nx
int m_nx;
Undocumented in source.
m_ny
int m_ny;
Undocumented in source.
m_xOrigin
double m_xOrigin;
Undocumented in source.
m_yOrigin
double m_yOrigin;
Undocumented in source.
m_z
double[][] m_z;

Z chunks

m_zd
double[] m_zd;

dense representation of Z values of the surface

Meta

Authors

Dmitriy Linev

Date

Date: 2019-2021