ThunderEgg
1.0.0
|
An enum-style class that represents the octants of a cube. More...
#include <Orthant.h>
Classes | |
class | Range |
Range class for Orthant. More... | |
Public Member Functions | |
Orthant (const unsigned char val_in) | |
Create new Orthant<D> with given value. More... | |
Orthant () | |
Default constructor that initializes the value to null(). | |
size_t | getIndex () const |
Get the integer value of the octant. More... | |
Orthant< D > | getNbrOnSide (Side< D > s) const |
Return the octant that neighbors this octant on a particular side. More... | |
std::array< Side< D >, D > | getInteriorSides () const |
Get the sides of the octant that are on the interior of the cube. More... | |
std::array< Side< D >, D > | getExteriorSides () const |
Get the sides of the octant that are on the exterior of the cube. More... | |
bool | isOnSide (Side< D > s) const |
Return whether or not the octant lies on a particular side of a cube. More... | |
bool | isHigherOnAxis (size_t axis) const |
bool | isLowerOnAxis (size_t axis) const |
Orthant< D - 1 > | collapseOnAxis (size_t axis) const |
From the point of view of an axis, get orthant that this orthant lies on in the D-1 dimension. More... | |
bool | operator== (const Orthant< D > &other) const |
Equals operator. More... | |
bool | operator!= (const Orthant< D > &other) const |
Not Equals operator. More... | |
bool | operator< (const Orthant< D > &other) const |
Less Tan operator. More... | |
Static Public Member Functions | |
static Orthant< D > | null () |
null value | |
static Orthant< 1 > | lower () |
Lower half of line. | |
static Orthant< 1 > | upper () |
Upper half of line. | |
static Orthant< 2 > | sw () |
South-West quadrant of square. | |
static Orthant< 2 > | se () |
South-East quadrant of square. | |
static Orthant< 2 > | nw () |
North-West quadrant of square. | |
static Orthant< 2 > | ne () |
North-East quadrant of square. | |
static Orthant< 3 > | bsw () |
Bottom-South-West octant of cube. | |
static Orthant< 3 > | bse () |
Bottom-South-East octant of cube. | |
static Orthant< 3 > | bnw () |
Bottom-North-West octant of cube. | |
static Orthant< 3 > | bne () |
Bottom-North-East octant of cube. | |
static Orthant< 3 > | tsw () |
Top-South-West octant of cube. | |
static Orthant< 3 > | tse () |
Top-South-East octant of cube. | |
static Orthant< 3 > | tnw () |
Top-North-West octant of cube. | |
static Orthant< 3 > | tne () |
Top-North-East octant of cube. | |
static Range | getValues () |
Get a range of values that can be iterated over. More... | |
static std::array< Orthant, num_orthants/2 > | getValuesOnSide (Side< D > s) |
Get an array of all Orthant<D> values that lie on a particular side of the cube. More... | |
Static Public Attributes | |
static constexpr size_t | num_orthants = 1 << D |
An enum-style class that represents the octants of a cube.
The octants are named in the following way:
bse means Bottom-South-West, which is in the corner of where the bottom, south, and west sides meet.
|
inlineexplicit |
Create new Orthant<D> with given value.
val_in | the value |
|
inline |
From the point of view of an axis, get orthant that this orthant lies on in the D-1 dimension.
axis | the axis |
|
inline |
Get the sides of the octant that are on the exterior of the cube.
|
inline |
Get the integer value of the octant.
|
inline |
Get the sides of the octant that are on the interior of the cube.
|
inline |
Return the octant that neighbors this octant on a particular side.
s | the side of the octant that you want the neighbor of. |
|
inlinestatic |
Get a range of values that can be iterated over.
|
inlinestatic |
Get an array of all Orthant<D> values that lie on a particular side of the cube.
When the two axis that the side lies on are arranged in the following way, the octants are returned in the following order:
^ | | 2 | 3 |--—+--— | 0 | 1 +--------—>
|
inline |
Return whether or not the octant lies on a particular side of a cube.
s | the side of the cube.j |
|
inline |
Not Equals operator.
other | The other octant. |
|
inline |
Less Tan operator.
other | The other octant. |
|
inline |
Equals operator.
other | The other octant. |