Ocean
|
This class implements a base class for data arrays. More...
Public Member Functions | |
Scalar | left () const |
Returns the left position of the distribution area. More... | |
Scalar | top () const |
Returns the top position of the distribution area. More... | |
Scalar | width () const |
Returns the width of the distribution area. More... | |
Scalar | height () const |
Returns the height of the distribution area. More... | |
unsigned int | horizontalBins () const |
Returns the number of horizontal distribution bins. More... | |
unsigned int | verticalBins () const |
Returns the number of vertical distribution bins. More... | |
unsigned int | bins () const |
Returns the number of bins this distribution holds. More... | |
unsigned int | index (const Scalar x, const Scalar y) const |
Returns the bin index for a given position. More... | |
int | horizontalBin (const Scalar x) const |
Returns the horizontal bin of a given horizontal position. More... | |
int | verticalBin (const Scalar y) const |
Returns the vertical bin of a given vertical position. More... | |
int | clampedHorizontalBin (const Scalar x) const |
Returns the horizontal bin of a given horizontal position. More... | |
int | clampedVerticalBin (const Scalar y) const |
Returns the vertical bin of a given vertical position. More... | |
bool | isValid () const |
Returns whether this object holds a valid distribution. More... | |
bool | operator== (const Array &right) const |
Returns whether two Array objects are identical. More... | |
bool | operator!= (const Array &right) const |
Returns whether two Array objects are not identical. More... | |
operator bool () const | |
Returns whether this object holds a valid distribution. More... | |
Protected Member Functions | |
Array ()=default | |
Creates an empty array object. More... | |
Array (const Array &object)=default | |
Copy constructor. More... | |
Array (Array &&object) noexcept | |
Move constructor. More... | |
Array (const Scalar left, const Scalar top, const Scalar width, const Scalar height, const unsigned int horizontalBins, const unsigned int verticalBins) | |
Creates a new array object. More... | |
Array & | operator= (const Array &object) |
Assign operator. More... | |
Array & | operator= (Array &&object) noexcept |
Move operator. More... | |
Protected Attributes | |
Scalar | areaLeft_ = Scalar(0) |
Left position of the distribution area. More... | |
Scalar | areaTop_ = Scalar(0) |
Top position of the distribution area. More... | |
Scalar | areaWidth_ = Scalar(0) |
Width of the distribution area. More... | |
Scalar | areaHeight_ = Scalar(0) |
Height of the distribution area. More... | |
unsigned int | horizontalBins_ = 0u |
Number of horizontal distribution bins. More... | |
unsigned int | verticalBins_ = 0u |
Number of vertical distribution bins. More... | |
Scalar | horizontalPoint2Bin_ = Scalar(0) |
Horizontal position to bin factor. More... | |
Scalar | verticalPoint2Bin_ = Scalar(0) |
Vertical position to bin factor. More... | |
This class implements a base class for data arrays.
|
protecteddefault |
Creates an empty array object.
|
protecteddefault |
Copy constructor.
object | The array object to be copied |
|
inlineprotectednoexcept |
Move constructor.
object | The array object to be moved |
|
inlineprotected |
Creates a new array object.
left | The left area position, with range (-infinity, infinity) |
top | The top area position, with range (-infinity, infinity) |
width | The width of the distribution area, with range (0, infinity) |
height | The height of the distribution area, with range (0, infinity) |
horizontalBins | Number of horizontal distribution bins, with range [1, infinity) |
verticalBins | Number of vertical distribution bins, with range [1, infinity) |
|
inline |
Returns the number of bins this distribution holds.
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
x | Horizontal position, with range (-infinity, infinity) |
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin is clamped into the range [0, number of bins - 1).
y | Vertical position, with range (-infinity, infinity) |
|
inline |
Returns the height of the distribution area.
|
inline |
Returns the horizontal bin of a given horizontal position.
Beware: The resulting bin can exceed the bin-ranges of the array.
x | Horizontal position, with range (-infinity, infinity) |
|
inline |
Returns the number of horizontal distribution bins.
|
inline |
Returns whether this object holds a valid distribution.
|
inline |
Returns the left position of the distribution area.
|
inlineexplicit |
Returns whether this object holds a valid distribution.
|
inline |
Returns whether two Array objects are not identical.
right | The second array object to compare |
|
inlineprotectednoexcept |
Move operator.
object | The object to be moved |
|
inlineprotected |
Assign operator.
object | The object to be assigned |
|
inline |
Returns whether two Array objects are identical.
right | The second array object to compare |
|
inline |
Returns the top position of the distribution area.
|
inline |
Returns the vertical bin of a given vertical position.
Beware: The resulting bin can exceed the bin-ranges of the array.
y | Vertical position, with range (-infinity, infinity) |
|
inline |
Returns the number of vertical distribution bins.
|
inline |
Returns the width of the distribution area.
Height of the distribution area.
Left position of the distribution area.
Top position of the distribution area.
Width of the distribution area.
|
protected |
Number of horizontal distribution bins.
Horizontal position to bin factor.
|
protected |
Number of vertical distribution bins.
Vertical position to bin factor.