ML Reference
|
SubImageBoxd - SubImageBox with coordinates of float data type. More...
#include <mlSubImageBoxd.h>
Public Member Functions | |
Initialization | |
SubImageBoxd () | |
Constructor: Constructs an empty region, i.e., v2 < v1. | |
SubImageBoxd (const Vector6 &vector1, const Vector6 &vector2) | |
Constructor: Subimage box is defined by both corner points vector1 and vector2 . | |
SubImageBoxd (const Vector6 &extent) | |
Constructor: Create a box with origin (0,0,0,0,0,0) and a given extent . | |
MLEXPORT | SubImageBoxd (const SubImageBox &box) |
Constructor: Create a box from an integer box . | |
Properties | |
bool | operator== (const SubImageBoxd &box) const |
Returns true if both boxes are identical. | |
bool | operator!= (const SubImageBoxd &box) const |
Returns true if both boxes are identical. | |
bool | isEmpty () const |
Returns true if any component of v1 is greater than the corresponding one of v2 (which is defined as an empty box). | |
Vector6 | getExtent () const |
Returns distance vector between v1 and v2, i.e., returns extents of the box. | |
MLEXPORT void | correct () |
Swaps all components where v1.* > v2.*. | |
Deprecated | |
Vector6 | getExt () const |
Public Attributes | |
Vector6 | v1 |
Corner v1 of the box region. | |
Vector6 | v2 |
Corner v2 of the box region. | |
Functions | |
void | makeEmpty () |
Makes box empty, restores constructor state. | |
SubImageBoxd | intersect (const SubImageBoxd &box) |
Memberfunction version to intersect this with a given box . | |
Vector6 | clamp (const Vector6 &position) |
Clamps the position to the nearest position inside the SubImageBox. | |
static SubImageBoxd | intersect (const SubImageBoxd &box1, const SubImageBoxd &box2) |
Returns intersection of box1 and box2 . | |
static MLEXPORT SubImageBoxd | calcAATransformedBox (const SubImageBox &box, const Matrix4 &matrix) |
Returns axis aligned bounding box of all corners of box transformed with matrix . |
SubImageBoxd - SubImageBox with coordinates of float data type.
Class to define a subimage region with Vector6 corners This class represents a 6D box like image region defined by 2 6d corner points.
Definition at line 33 of file mlSubImageBoxd.h.
ml::SubImageBoxd::SubImageBoxd | ( | ) | [inline] |
Constructor: Constructs an empty region, i.e., v2 < v1.
Definition at line 51 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
Constructor: Subimage box is defined by both corner points vector1
and vector2
.
It is assumed that both corners are inside the box.
Definition at line 61 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
ml::SubImageBoxd::SubImageBoxd | ( | const Vector6 & | extent | ) | [inline] |
Constructor: Create a box with origin (0,0,0,0,0,0) and a given extent
.
Definition at line 67 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
MLEXPORT ml::SubImageBoxd::SubImageBoxd | ( | const SubImageBox & | box | ) |
Constructor: Create a box from an integer box
.
Note that second corner is considered as inside and so we need to add one to v2!
static MLEXPORT SubImageBoxd ml::SubImageBoxd::calcAATransformedBox | ( | const SubImageBox & | box, |
const Matrix4 & | matrix | ||
) | [static] |
Returns axis aligned bounding box of all corners of box
transformed with matrix
.
Note the transformed return box itself is not necessarily axis aligned any more.
Clamps the position
to the nearest position inside the SubImageBox.
If the SubImageBox is empty, the result vector contains undefined values.
Definition at line 166 of file mlSubImageBoxd.h.
References ml::compMax(), ml::compMin(), and ML_TRACE_IN.
MLEXPORT void ml::SubImageBoxd::correct | ( | ) |
Swaps all components where v1.* > v2.*.
Vector6 ml::SubImageBoxd::getExt | ( | ) | const [inline] |
Definition at line 188 of file mlSubImageBoxd.h.
Vector6 ml::SubImageBoxd::getExtent | ( | ) | const [inline] |
Returns distance vector between v1 and v2, i.e., returns extents of the box.
Definition at line 110 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
SubImageBoxd ml::SubImageBoxd::intersect | ( | const SubImageBoxd & | box | ) | [inline] |
Memberfunction version to intersect this with a given box
.
Definition at line 157 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
static SubImageBoxd ml::SubImageBoxd::intersect | ( | const SubImageBoxd & | box1, |
const SubImageBoxd & | box2 | ||
) | [inline, static] |
Returns intersection of box1
and box2
.
Definition at line 133 of file mlSubImageBoxd.h.
References ml::compMax(), ml::compMin(), ML_TRACE_IN, v1, and v2.
bool ml::SubImageBoxd::isEmpty | ( | ) | const [inline] |
Returns true
if any component of v1 is greater than the corresponding one of v2 (which is defined as an empty box).
Definition at line 102 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
void ml::SubImageBoxd::makeEmpty | ( | ) | [inline] |
Makes box empty, restores constructor state.
Definition at line 148 of file mlSubImageBoxd.h.
References ML_TRACE_IN.
bool ml::SubImageBoxd::operator!= | ( | const SubImageBoxd & | box | ) | const [inline] |
Returns true
if both boxes are identical.
Definition at line 93 of file mlSubImageBoxd.h.
References ML_TRACE_IN, and ml::operator==().
bool ml::SubImageBoxd::operator== | ( | const SubImageBoxd & | box | ) | const [inline] |
Returns true
if both boxes are identical.
Definition at line 85 of file mlSubImageBoxd.h.
References ML_TRACE_IN, v1, and v2.
Corner v1 of the box region.
If all components of v1 are smaller than the corresponding ones of v2 then the box is valid; otherwise it is considered empty.
Definition at line 41 of file mlSubImageBoxd.h.
Referenced by intersect(), and operator==().
Corner v2 of the box region.
Definition at line 44 of file mlSubImageBoxd.h.
Referenced by intersect(), and operator==().