|
|
constexpr | point (point const &) noexcept=default |
| |
|
constexpr | point (point &&) noexcept=default |
| |
|
constexpr point & | operator= (point const &) noexcept=default |
| |
|
constexpr point & | operator= (point &&) noexcept=default |
| |
template<int E>
requires (E < D) |
| constexpr | point (point< E > const &other) noexcept |
| | Construct a point from a lower dimension point.
|
| |
| constexpr | operator f32x4 () const noexcept |
| | Convert a point to its f32x4-nummeric_array.
|
| |
| constexpr | point (f32x4 const &other) noexcept |
| | Construct a point from a f32x4-numeric_array.
|
| |
| constexpr | point () noexcept |
| | Construct a point at the origin of the coordinate system.
|
| |
| constexpr | point (float x, float y) noexcept |
| | Construct a 2D point from x and y elements.
|
| |
| constexpr | point (float x, float y, float z=0.0) noexcept |
| | Construct a 3D point from x, y and z elements.
|
| |
| constexpr float & | x () noexcept |
| | Access the x element from the point.
|
| |
| constexpr float & | y () noexcept |
| | Access the y element from the point.
|
| |
| constexpr float & | z () noexcept |
| | Access the z element from the point.
|
| |
| constexpr float const & | x () const noexcept |
| | Access the x element from the point.
|
| |
| constexpr float const & | y () const noexcept |
| | Access the y element from the point.
|
| |
| constexpr float const & | z () const noexcept |
| | Access the z element from the point.
|
| |
| constexpr bool | is_valid () const noexcept |
| | Check if the point is valid.
|
| |
|
| template<int E> |
| constexpr friend point< std::max(D, E)> | operator+ (point const &lhs, vector< E > const &rhs) noexcept |
| | Move a point along a vector.
|
| |
| template<int E> |
| constexpr friend point< std::max(D, E)> | operator+ (vector< E > const &rhs, point const &lhs) noexcept |
| | Move a point along a vector.
|
| |
| template<int E> |
| constexpr friend point< std::max(D, E)> | operator- (point const &lhs, vector< E > const &rhs) noexcept |
| | Move a point backward along the vector.
|
| |
| constexpr friend vector< D > | operator- (point const &lhs, point const &rhs) noexcept |
| | Find the vector between two points.
|
| |
| constexpr friend bool | operator== (point const &lhs, point const &rhs) noexcept |
| | Compare if two points are equal.
|
| |
|
template<int E> |
| constexpr auto | midpoint (point const &lhs, point< E > const &rhs) noexcept |
| |
|
template<int E> |
| constexpr auto | reflect (point const &lhs, point< E > const &rhs) noexcept |
| |
template<int D>
class tt::geo::point< D >
A high-level geometric point Part of the high-level vec, point, mat and color types.
A point, for both 2D or 3D is internally represented as a 4D homogeneous vector. Which can be efficiently implemented as a __m128 SSE register.