|
|
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< value_type, E > const &other) noexcept |
| | Construct a point from a lower dimension point.
|
| |
| constexpr | point (point< value_type, 2 > const &other, value_type z) noexcept |
| | Construct a point from a lower dimension point.
|
| |
template<int E>
requires (E > D) |
| constexpr | point (point< value_type, E > const &other) noexcept |
| | Construct a point from a higher dimension point.
|
| |
| constexpr | operator array_type () const noexcept |
| | Convert a point to its array_type-nummeric_array.
|
| |
| constexpr | point (array_type const &other) noexcept |
| | Construct a point from a array_type-simd.
|
| |
| constexpr | point () noexcept |
| | Construct a point at the origin of the coordinate system.
|
| |
| constexpr | point (value_type x, value_type y) noexcept |
| | Construct a 2D point from x and y elements.
|
| |
| constexpr | point (value_type x, value_type y, value_type z=value_type{0}) noexcept |
| | Construct a 3D point from x, y and z elements.
|
| |
| constexpr value_type & | x () noexcept |
| | Access the x element from the point.
|
| |
| constexpr value_type & | y () noexcept |
| | Access the y element from the point.
|
| |
| constexpr value_type & | z () noexcept |
| | Access the z element from the point.
|
| |
| constexpr value_type | x () const noexcept |
| | Access the x element from the point.
|
| |
| constexpr value_type | y () const noexcept |
| | Access the y element from the point.
|
| |
| constexpr value_type | z () const noexcept |
| | Access the z element from the point.
|
| |
template<int E>
requires (E <= D) |
| constexpr point & | operator+= (vector< value_type, E > const &rhs) noexcept |
| |
template<int E>
requires (E <= D) |
| constexpr point & | operator-= (vector< value_type, E > const &rhs) noexcept |
| |
| constexpr bool | holds_invariant () const noexcept |
| | Check if the point is valid.
|
| |
|
| template<int E> |
| constexpr friend auto | operator+ (point const &lhs, vector< value_type, E > const &rhs) noexcept |
| | Move a point along a vector.
|
| |
| template<int E> |
| constexpr friend auto | operator+ (vector< value_type, E > const &rhs, point const &lhs) noexcept |
| | Move a point along a vector.
|
| |
| template<int E> |
| constexpr friend auto | operator- (point const &lhs, vector< value_type, E > const &rhs) noexcept |
| | Move a point backward along the vector.
|
| |
| constexpr friend vector< value_type, 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< value_type, E > const &rhs) noexcept |
| |
|
template<int E> |
| constexpr auto | reflect (point const &lhs, point< value_type, E > const &rhs) noexcept |
| |
| template<int E> |
| constexpr auto | min (point const &lhs, point< value_type, E > const &rhs) noexcept |
| | Mix the two points and get the lowest value of each element.
|
| |
| template<int E> |
| constexpr auto | max (point const &lhs, point< value_type, E > const &rhs) noexcept |
| | Mix the two points and get the highest value of each element.
|
| |
| constexpr point | round (point const &rhs) noexcept |
| | Round the coordinates of a point toward nearest integer.
|
| |
| constexpr point | ceil (point const &rhs) noexcept |
| | Round the coordinates of a point toward the right-top.
|
| |
| constexpr point | floor (point const &rhs) noexcept |
| | Round the coordinates of a point toward the left-bottom.
|
| |
| constexpr point | ceil (point const &lhs, extent< value_type, D > rhs) noexcept |
| | Round the coordinates of a point toward the top-right with the given granularity.
|
| |
| constexpr point | ceil (point const &lhs, extent< value_type, D > rhs) noexcept |
| | Round the coordinates of a point toward the top-right with the given granularity.
|
| |
| constexpr point | floor (point const &lhs, extent< value_type, D > rhs) noexcept |
| | Round the coordinates of a point toward the left-bottom with the given granularity.
|
| |
| constexpr point | floor (point const &lhs, extent< value_type, D > rhs) noexcept |
| | Round the coordinates of a point toward the left-bottom with the given granularity.
|
| |
|
constexpr value_type | distance (point const &lhs, point const &rhs) noexcept |
| |
|
std::string | to_string (point const &rhs) noexcept |
| |
|
std::ostream & | operator<< (std::ostream &lhs, point const &rhs) noexcept |
| |
template<typename T, int D>
class v1::geo::point< T, 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.