|
(Note that these are not member functions.)
|
| template<typename T > |
| point3d_c< T > | make_point3d_c (const std::tuple< T, T, T > &p) DXLE_NOEXCEPT_IF(std |
| | conversion from std::tuple More...
|
| |
| template<typename T > |
| point3d_c< T > | make_point3d_c (std::tuple< T, T, T > &&p) DXLE_NOEXCEPT_OR_NOTHROW |
| | conversion from std::tuple More...
|
| |
| template<typename T > |
| std::ostream & | operator<< (std::ostream &os, const point3d_c< T > &p) |
| | ostream operator More...
|
| |
| template<typename T > |
| std::wostream & | operator<< (std::wostream &os, const point3d_c< T > &p) |
| | ostream operator More...
|
| |
| template<typename T > |
| std::istream & | operator>> (std::istream &is, point3d_c< T > &p) |
| | istream operator More...
|
| |
| template<typename T > |
| std::wistream & | operator>> (std::wistream &is, point3d_c< T > &p) |
| | istream operator More...
|
| |
| template<typename T > |
| DXLE_CONSTEXPR point3d_c< T > | operator- (const point3d_c< T > &r) DXLE_NOEXCEPT_IF_EXPR(-std |
| | Overload of unary operator -. More...
|
| |
| template<typename T > |
| DXLE_CONSTEXPR const point3d_c< T > & | operator+ (const point3d_c< T > &r) DXLE_NOEXCEPT_IF(std |
| | Overload of unary operator +. More...
|
| |
| template<typename T > |
| DXLE_CONSTEXPR point3d_c< T > && | operator+ (point3d_c< T > &&r) DXLE_NOEXCEPT_OR_NOTHROW |
| | Overload of unary operator +. More...
|
| |
| template<typename T1 , typename T2 , enable_if_t< is_representable< T2, T1 >::value, nullptr_t > = nullptr> |
| point3d_c< T1 > & | operator+= (point3d_c< T1 > &l, const point3d_c< T2 > &r) DXLE_NOEXCEPT_IF_EXPR(l.x+ |
| | Overload of binary operator +=. More...
|
| |
| template<typename T1 , typename T2 > |
| DXLE_CONSTEXPR auto | operator- (const point3d_c< T1 > &l, const point3d_c< T2 > &r) DXLE_NOEXCEPT_IF_EXPR(l.x - r.x) -> point3d_c< decltype(std::declval< std::remove_cv_t< T1 >>() - std::declval< std::remove_cv_t< T2 >>())> |
| | Overload of binary operator -. More...
|
| |
| template<typename T1 , typename T2 > |
| DXLE_CONSTEXPR auto | operator* (const point3d_c< T1 > &l, T2 r) DXLE_NOEXCEPT_IF_EXPR(l.x *r) -> point3d_c< decltype(std::declval< std::remove_cv_t< T1 >>() *std::declval< std::remove_cv_t< T2 >>())> |
| | Overload of binary operator *. More...
|
| |
| template<typename T1 , typename T2 > |
| DXLE_CONSTEXPR auto | operator* (T1 l, const point3d_c< T2 > &r) DXLE_NOEXCEPT_IF_EXPR(l+r.x) -> point3d_c< decltype(std::declval< std::remove_cv_t< T1 >>() *std::declval< std::remove_cv_t< T2 >>())> |
| | Overload of binary operator *. More...
|
| |
| template<typename T1 , typename T2 , enable_if_t< is_representable< T2, T1 >::value, nullptr_t > = nullptr> |
| point3d_c< T1 > & | operator*= (point3d_c< T1 > &l, T2 r) DXLE_NOEXCEPT_IF_EXPR(l.x * |
| | Overload of binary operator *=. More...
|
| |
| template<typename T1 , typename T2 , enable_if_t< is_representable< T2, T1 >::value, nullptr_t > = nullptr> |
| point3d_c< T1 > & | operator/= (point3d_c< T1 > &l, T2 r) DXLE_NOEXCEPT_IF_EXPR(l.x/ |
| | Overload of binary operator /=. More...
|
| |
| template<typename T1 , typename T2 > |
| DXLE_CONSTEXPR auto | cross (const point3d_c< T1 > &p1, const point3d_c< T2 > &p2) DXLE_NOEXCEPT_IF_EXPR(std |
| | Computes a cross-product of two point3d_c value as vectors. More...
|
| |
| template<typename T1 , typename T2 > |
| distance_result_type_t< T1, T2 > | distance (const point3d_c< T1 > &p1, const point3d_c< T2 > &p2) DXLE_NOEXCEPT_IF_EXPR(hypot(safe_dist(std |
| | Calculate the distance of the two point3d_c class object based on the Pythagorean theorem(std::hypot) More...
|
| |
template<typename T, enable_if_t< std::is_nothrow_move_constructible< T >::value &&std::is_nothrow_move_assignable< T >::value, nullptr_t > = nullptr>
class dxle::point3d_c< T, >
Template class for 3D points specified by its coordinates x and y.
An instance of the claess is interchangeable with std::tuple. There is also a cast operator to convert point3d coordinates to the specified type (using static_cast). Commonly, the conversion uses this operation for each of the coordinates. Besides the class members listed in the declaration above, the following operations on points are implemented:
pt1 = pt2 + pt3;
pt1 = pt2 - pt3;
pt1 = pt2 * a;
pt1 = a * pt2;
pt1 = pt2 / a;
pt1 += pt2;
pt1 -= pt2;
pt1 *= a;
pt1 /= a;
pt1 == pt2;
pt1 != pt2;
For your convenience, the following type aliases are defined:
Example:
std::cout << pt << std::endl;
- Template Parameters
-
Definition at line 98 of file point3d.hpp.