R3::basic_translation
namespace nin::R3 {
template <std::floating_point T>
struct basic_translation;
}
A 3D displacement that can be applied to a basic_position_qty to produce
a new position. The three public fields are unicode delta components.
basic_translation satisfies the container interface with a fixed size() of 3.
Nested types
| Type | Definition |
|---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
forward iterator over components |
|
const forward iterator over components |
Member functions
(Constructor)
constructs a 3D translation
(Constructor)
constructs a 3D translation
|
(1) |
Default-constructs all displacements to zero.
invert
negates the displacement in place
invert
negates the displacement in place
|
(1) |
operator()
applies the translation to a position
operator()
applies the translation to a position
|
(1) |
Returns a new position offset by the displacement.
operator[]
indexed access to displacement components
operator[]
indexed access to displacement components
|
(1) |
|
(2) |
Index 0 returns Δx, index 1 returns Δy, index 2 returns Δz.
begin, end, cbegin, cend
iterators
begin, end, cbegin, cend
iterators
|
(1) |
|
(2) |
|
(3) |
|
(4) |
|
(5) |
|
(6) |
size, max_size, empty
container capacity
size, max_size, empty
container capacity
|
(1) |
|
(2) |
|
(3) |
-
(1)-(2) Returns 3.
-
(3) Returns
false.
Non-member functions
inv
returns an inverted translation
inv
returns an inverted translation
|
(1) |
compose
composes two translations
compose
composes two translations
|
(1) |
Returns a translation whose displacement is the sum of the two inputs.