|
EBGeometry
Compact, header-only C++ library for fast evaluation of signed distance functions
|
An affine map of 3D space, x -> A x + b, with A stored by rows. More...
#include <EBGeometry_Affine.hpp>
Public Member Functions | |
| Vec3T< T > | operator() (const Vec3T< T > &a_point) const noexcept |
| Apply the map. | |
| Affine3T | then (const Affine3T &a_next) const noexcept |
The map that applies this one and then a_next. | |
| bool | isAxisAligned () const noexcept |
| Whether every row of A has at most one non-zero entry, so that the map sends axis-aligned boxes to axis-aligned boxes exactly. | |
| BoundingVolumes::AABBT< T > | transform (const BoundingVolumes::AABBT< T > &a_box) const noexcept |
| A box enclosing the image of a box under the map. | |
Static Public Member Functions | |
| static Affine3T | identity () noexcept |
| The identity map. | |
| static Affine3T | translation (const Vec3T< T > &a_shift) noexcept |
| A translation. | |
| static Affine3T | rotation (const T a_degrees, const size_t a_axis) noexcept |
| A rotation about a coordinate axis, counterclockwise seen from the positive end of the axis. | |
| static Affine3T | rotation (const T a_degrees, const Vec3T< T > &a_axis) noexcept |
| A rotation about an arbitrary axis through the origin, counterclockwise seen from the positive end of the axis (Rodrigues' formula). | |
| static Affine3T | scaling (const T a_factor) noexcept |
| A uniform scaling. | |
| static Affine3T | reflection (const size_t a_axis) noexcept |
| A reflection in a coordinate plane through the origin. | |
Public Attributes | |
| Vec3T< T > | m_row0 |
| First row of A. | |
| Vec3T< T > | m_row1 |
| Second row of A. | |
| Vec3T< T > | m_row2 |
| Third row of A. | |
| Vec3T< T > | m_shift |
| The shift b. | |
An affine map of 3D space, x -> A x + b, with A stored by rows.
A plain, trivially copyable value type. The factory functions build the maps the transforms need; then() composes two maps. Value-initialized (Affine3T<T>{}), it is the zero map, not the identity: use identity().
| T | Floating-point precision. |
|
inlinestaticnoexcept |
The identity map.
|
inlinenoexcept |
Whether every row of A has at most one non-zero entry, so that the map sends axis-aligned boxes to axis-aligned boxes exactly.
|
inlinenoexcept |
Apply the map.
| [in] | a_point | Point. |
|
inlinestaticnoexcept |
A reflection in a coordinate plane through the origin.
| [in] | a_axis | Axis normal to the plane (0, 1 or 2); that coordinate changes sign. |
|
inlinestaticnoexcept |
A rotation about a coordinate axis, counterclockwise seen from the positive end of the axis.
| [in] | a_degrees | Angle in degrees. |
| [in] | a_axis | Coordinate axis (0, 1 or 2). |
|
inlinestaticnoexcept |
A rotation about an arbitrary axis through the origin, counterclockwise seen from the positive end of the axis (Rodrigues' formula).
| [in] | a_degrees | Angle in degrees. |
| [in] | a_axis | Axis direction; need not be normalized, must not be zero. |
|
inlinestaticnoexcept |
A uniform scaling.
| [in] | a_factor | Scale factor. |
|
inlinenoexcept |
The map that applies this one and then a_next.
| [in] | a_next | Map to apply second. |
|
inlinenoexcept |
A box enclosing the image of a box under the map.
Exact for an axis-aligned map, which also keeps an unbounded box unbounded only along the axes it maps an unbounded axis to. For any other map, a bounded box's image is enclosed by the box around its eight transformed corners, and an unbounded box gives an unbounded box. Coordinates saturate at plus or minus Math::Limits<T>::max(). An empty box stays empty.
| [in] | a_box | Box. |
|
inlinestaticnoexcept |
A translation.
| [in] | a_shift | Shift. |