HerdSoftware
0.1.1
|
Classes | |
struct | Ortog |
Base struct to get the two axes orthogonal to a direction. More... | |
struct | Ortog< RefFrame::Axis::X > |
struct | Ortog< RefFrame::Axis::Y > |
struct | Ortog< RefFrame::Axis::Z > |
struct | ViewAxes |
Base struct to get the two axes of a given view. More... | |
struct | ViewAxes< RefFrame::View::XY > |
struct | ViewAxes< RefFrame::View::XZ > |
struct | ViewAxes< RefFrame::View::YZ > |
Enumerations | |
enum | Coo : int { Coo::NONE = -1, Coo::X = 0, Coo::Y = 1, Coo::Z = 2 } |
Aliases for the three space coordinates. RefFrame.h common/RefFrame.h. More... | |
enum | Axis : int { Axis::NONE = -1, Axis::X = 0, Axis::Y = 1, Axis::Z = 2 } |
Aliases for the axes. RefFrame.h common/RefFrame.h. More... | |
enum | Direction : int { Direction::NONE = -1, Direction::Xpos = 0, Direction::Xneg = 1, Direction::Ypos = 2, Direction::Yneg = 3, Direction::Zpos = 4, Direction::Zneg = 5, Direction::XnegYneg = 6, Direction::XposYneg = 7, Direction::XnegYpos = 8, Direction::XposYpos = 9 } |
Aliases for the six axis directions. RefFrame.h common/RefFrame.h. More... | |
enum | View : int { View::NONE = -1, View::XY = 0, View::XZ = 1, View::YZ = 2 } |
Aliases for the three 2D projection planes. RefFrame.h common/RefFrame.h. More... | |
enum | Side : int { Side::NONE = -1, Side::Xpos = 0, Side::Xneg = 1, Side::Ypos = 2, Side::Yneg = 3, Side::TOP = 4 } |
Aliases for the five sides. RefFrame.h common/RefFrame.h. More... | |
Functions | |
std::ostream & | operator<< (std::ostream &out, const Axis &axis) |
std::string | operator+ (const std::string &str, const Axis &axis) |
std::ostream & | operator<< (std::ostream &out, const Direction &direction) |
std::string | operator+ (const std::string &str, const Direction &direction) |
std::ostream & | operator<< (std::ostream &out, const Side &side) |
std::string | operator+ (const std::string &str, const Side &side) |
Coo | ToCoo (Axis axis) |
Associates a coordinate to an axis. More... | |
Axis | ToAxis (Coo coo) |
Associates an axis to a coordinate . More... | |
Axis | ToAxis (Direction dir) |
Coo | ToCoo (Direction direction) |
Associates a coordinate to a direction. More... | |
Axis | NormalAxis (Side side) |
Axis | NormalAxis (View view) |
Direction | NormalDirection (Side side) |
Axis | NormalAxis (Axis ax1, Axis ax2) |
Given two axes get the third one ;) More... | |
bool | IsPositive (Direction dir) |
Tells if a direction is positive or not. More... | |
Variables | |
constexpr std::array< Coo, 3 > | Coos {Coo::X, Coo::Y, Coo::Z} |
constexpr int | NAxes = 3 |
The number of axes (i.e. (number of elements of Axis) - 1). More... | |
constexpr std::array< Axis, NAxes > | Axes {Axis::X, Axis::Y, Axis::Z} |
Array of all the axes. More... | |
const std::array< std::string, NAxes > | AxisName {"X", "Y", "Z"} |
constexpr int | NDirections = 10 |
The number of directions (i.e. (number of elements of Direction) - 1). More... | |
constexpr std::array< RefFrame::Direction, RefFrame::NDirections > | Directions |
const std::array< std::string, RefFrame::NDirections > | DirectionName |
constexpr int | NViews = 3 |
The number of views (i.e. (number of elements of View) - 1). More... | |
constexpr std::array< View, NViews > | Views {View::XY, View::XZ, View::YZ} |
Array of all the views. More... | |
const std::array< std::string, NViews > | ViewName {"XY", "XZ", "YZ"} |
constexpr int | NSides = 5 |
The number of sides (i.e. (number of elements of Side) - 1). More... | |
constexpr std::array< Side, NSides > | Sides {Side::Xpos, Side::Xneg, Side::Ypos, Side::Yneg, Side::TOP} |
Array of all the sides. More... | |
const std::array< std::string, NSides > | SideName {"Xpos", "Xneg", "Ypos", "Yneg", "TOP"} |
|
strong |
Aliases for the axes. RefFrame.h common/RefFrame.h.
Enumerator | |
---|---|
NONE | |
X | |
Y | |
Z |
|
strong |
Aliases for the three space coordinates. RefFrame.h common/RefFrame.h.
Enumerator | |
---|---|
NONE | |
X | |
Y | |
Z |
|
strong |
Aliases for the six axis directions. RefFrame.h common/RefFrame.h.
Enumerator | |
---|---|
NONE | |
Xpos | |
Xneg | |
Ypos | |
Yneg | |
Zpos | |
Zneg | |
XnegYneg | |
XposYneg | |
XnegYpos | |
XposYpos |
|
strong |
Aliases for the five sides. RefFrame.h common/RefFrame.h.
Enumerator | |
---|---|
NONE | |
Xpos | |
Xneg | |
Ypos | |
Yneg | |
TOP |
|
strong |
Aliases for the three 2D projection planes. RefFrame.h common/RefFrame.h.
Enumerator | |
---|---|
NONE | |
XY | |
XZ | |
YZ |
|
inline |
Tells if a direction is positive or not.
dir | The direction. |
dir
is equal to Xpos or Ypos or Zpos, false if dir
is equal to Xneg or Yneg or Zneg std::runtime_error | if the direction is not along X, Y or Z. |
Returns the normal axis to a given side.
side | The desired side. |
std::runtime_error | if the given side is not valid. |
Returns the normal axis to a given view.
view | The desired view. |
std::runtime_error | if the given view is not valid. |
Given two axes get the third one ;)
ax1 | Axis no. 1 |
ax2 | Axis no. 2 |
std::runtime_error | if ax1 == ax2. |
Returns the normal direction to a given side.
side | The desired side. |
std::runtime_error | if the given side is not valid. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Associates an axis to a coordinate .
Converts a coordinate to an axis. The Axis::NONE axis is associated to the Coo::NONE coordinate.
coo | The given coordinate. |
Returns the axis corresponding to the given direction.
dir | The desired direction. |
std::runtime_error | if the given direction is not valid. |
Associates a coordinate to an axis.
Converts an axis to a coordinate. The conversion is meaningful only for X, Y and Z axis, since coordinates are defined only along these axes. The Coo::NONE coordinate is associated to the Axis::NONE axis. An exception is thrown if an axis different from NONE, X, Y or Z is given as argument.
axis | The given axis. |
Associates a coordinate to a direction.
Converts a direction to a coordinate. The conversion is meaningful only for Xpos/Xneg, Ypos/Yneg and Zpos/Zneg directions, since coordinates are defined only along these directions. The Coo::NONE coordinate is associated to the Axis::NONE axis. An exception is thrown if a direction different from NONE, Xpos/Xneg, Ypos/Yneg or Zpos/Zneg is given as argument.
direction | The given direction. |
Array of all the axes.
This array can be used to iterate over all the axes using array iterators in a range-for loop, e.g.:
for (auto axis : Axes){ ...
const std::array<std::string, NAxes> Herd::RefFrame::AxisName {"X", "Y", "Z"} |
const std::array<std::string, RefFrame::NDirections> Herd::RefFrame::DirectionName |
constexpr std::array<RefFrame::Direction, RefFrame::NDirections> Herd::RefFrame::Directions |
constexpr int Herd::RefFrame::NAxes = 3 |
The number of axes (i.e. (number of elements of Axis) - 1).
constexpr int Herd::RefFrame::NDirections = 10 |
The number of directions (i.e. (number of elements of Direction) - 1).
constexpr int Herd::RefFrame::NSides = 5 |
The number of sides (i.e. (number of elements of Side) - 1).
constexpr int Herd::RefFrame::NViews = 3 |
The number of views (i.e. (number of elements of View) - 1).
const std::array<std::string, NSides> Herd::RefFrame::SideName {"Xpos", "Xneg", "Ypos", "Yneg", "TOP"} |
constexpr std::array<Side, NSides> Herd::RefFrame::Sides {Side::Xpos, Side::Xneg, Side::Ypos, Side::Yneg, Side::TOP} |
Array of all the sides.
This array can be used to iterate over all the sides using array iterators in a range-for loop, e.g.:
for (auto side : Sides){ ...
const std::array<std::string, NViews> Herd::RefFrame::ViewName {"XY", "XZ", "YZ"} |