GDAL
Public Member Functions | Public Attributes | List of all members
gdal::Viewshed::Window Struct Reference

A window in a raster including pixels in [xStart, xStop) and [yStart, yStop). More...

#include <viewshed.h>

Public Member Functions

int xSize () const
 Window size in the X direction.
 
int ySize () const
 Window size in the Y direction.
 
bool containsX (int nX) const
 Determine if the X window contains the index. More...
 
bool containsY (int nY) const
 Determine if the Y window contains the index. More...
 
bool contains (int nX, int nY) const
 Determine if the window contains the index. More...
 
int clampX (int nX) const
 Clamp the argument to be in the window in the X dimension. More...
 
int clampY (int nY) const
 Clamp the argument to be in the window in the Y dimension. More...
 
void shiftX (int nShift)
 Shift the X dimension by nShift. More...
 

Public Attributes

int xStart {}
 X start position.
 
int xStop {}
 X end position.
 
int yStart {}
 Y start position.
 
int yStop {}
 Y end position.
 

Detailed Description

A window in a raster including pixels in [xStart, xStop) and [yStart, yStop).

Member Function Documentation

◆ clampX()

int gdal::Viewshed::Window::clampX ( int  nX) const
inline

Clamp the argument to be in the window in the X dimension.

Parameters
nXValue to clamp.
Returns
Clamped value.

◆ clampY()

int gdal::Viewshed::Window::clampY ( int  nY) const
inline

Clamp the argument to be in the window in the Y dimension.

Parameters
nYValue to clamp.
Returns
Clamped value.

◆ contains()

bool gdal::Viewshed::Window::contains ( int  nX,
int  nY 
) const
inline

Determine if the window contains the index.

Parameters
nXX coordinate of the index to check
nYY coordinate of the index to check
Returns
True if the index is contained, false otherwise.

◆ containsX()

bool gdal::Viewshed::Window::containsX ( int  nX) const
inline

Determine if the X window contains the index.

Parameters
nXIndex to check
Returns
True if the index is contained, false otherwise.

◆ containsY()

bool gdal::Viewshed::Window::containsY ( int  nY) const
inline

Determine if the Y window contains the index.

Parameters
nYIndex to check
Returns
True if the index is contained, false otherwise.

◆ shiftX()

void gdal::Viewshed::Window::shiftX ( int  nShift)
inline

Shift the X dimension by nShift.

Parameters
nShiftAmount to shift

The documentation for this struct was generated from the following file: