ProjGeom 1.0.11
Loading...
Searching...
No Matches
persp_object.hpp
Go to the documentation of this file.
1
5#pragma once
6
7#include "ck_plane.hpp"
8#include "pg_object.hpp"
9
10class PerspPoint;
11class PerspLine;
12
17class PerspPoint : public PgObject<PerspPoint, PerspLine> {
18 public:
19 // constexpr static PerspLine L_INF{ {0, -1, 1}};
20
26 constexpr explicit PerspPoint(std::array<int64_t, 3> coord)
28
34 constexpr auto perp() const -> const PerspLine&;
35};
36
42 public:
43 // constexpr static PerspPoint I_RE{ {0, 1, 1}};
44 // constexpr static PerspPoint I_IM{ {1, 0, 0}};
45
51 constexpr explicit PerspLine(std::array<int64_t, 3> coord)
53
59 constexpr auto perp() const -> PerspPoint;
60};
61
62static constexpr PerspLine L_INF({0, -1, 1});
63static constexpr PerspPoint I_RE({0, 1, 1});
64static constexpr PerspPoint I_IM({1, 0, 0});
65
74constexpr auto PerspPoint::perp() const -> const PerspLine& { return L_INF; }
75
85constexpr auto PerspLine::perp() const -> PerspPoint {
86 return PerspPoint::parametrize(this->dot(I_RE), I_RE, this->dot(I_IM), I_IM);
87}
Cayley-Klein plane functions: perpendicularity, altitude, orthocenter, reflection.
Perspective Line.
Definition persp_object.hpp:41
constexpr PerspLine(std::array< int64_t, 3 > coord)
Construct a new Persp Line object.
Definition persp_object.hpp:51
constexpr auto perp() const -> PerspPoint
Pole.
Definition persp_object.hpp:85
Perspective Point.
Definition persp_object.hpp:17
constexpr auto perp() const -> const PerspLine &
Polar.
Definition persp_object.hpp:74
constexpr PerspPoint(std::array< int64_t, 3 > coord)
Construct a new Persp Point object.
Definition persp_object.hpp:26
Core projective geometry object template (pg_object, PgObject, PgPoint, PgLine).
Projective Point/Line (int64_t specialization)
Definition pg_object.hpp:129
constexpr auto dot(const PerspLine &other) const -> int64_t
Dot product with the dual object.
Definition pg_object.hpp:184
std::array< int64_t, 3 > coord
Definition pg_object.hpp:132
static constexpr auto parametrize(const int64_t &lambda_val, const PerspPoint &pt_p, const int64_t &mu_val, const PerspPoint &pt_q) -> PerspPoint
Homogeneous parametrization of point or line.
Definition pg_object.hpp:200