ProjGeom 1.0.11
Loading...
Searching...
No Matches
Classes | Namespaces | Functions
pg_object.hpp File Reference

Core projective geometry object template (pg_object, PgObject, PgPoint, PgLine). More...

#include <array>
#include <cstdint>
#include "pg_plane.hpp"
Include dependency graph for pg_object.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  fun::pg_object< _K, Self, DualType >
 Generic projective geometry object (value-type templated) More...
 
struct  PgObject< Point, Line >
 Projective Point/Line (int64_t specialization) More...
 
class  PgPoint
 PG Point. More...
 
class  PgLine
 PG Line. More...
 

Namespaces

namespace  fun
 

Functions

constexpr auto dot (const std::array< int64_t, 3 > &pt_a, const std::array< int64_t, 3 > &pt_b) -> int64_t
 Dot product of two homogeneous 3-vectors.
 
constexpr auto cross (const std::array< int64_t, 3 > &pt_a, const std::array< int64_t, 3 > &pt_b) -> std::array< int64_t, 3 >
 Cross product of two homogeneous 3-vectors.
 
constexpr auto plckr (const int64_t &lambda, const std::array< int64_t, 3 > &pt_p, const int64_t &mu, const std::array< int64_t, 3 > &pt_q) -> std::array< int64_t, 3 >
 Homogeneous parametrization of point or line.
 

Detailed Description

Core projective geometry object template (pg_object, PgObject, PgPoint, PgLine).

Function Documentation

◆ cross()

constexpr auto cross ( const std::array< int64_t, 3 > &  pt_a,
const std::array< int64_t, 3 > &  pt_b 
) -> std::array<int64_t, 3>
constexpr

Cross product of two homogeneous 3-vectors.

\[ a \times b = (a_y b_z - a_z b_y,\; a_z b_x - a_x b_z,\; a_x b_y - a_y b_x)^T \]

Parameters
[in]pt_aFirst vector
[in]pt_bSecond vector
Returns
std::array<int64_t, 3>

◆ dot()

constexpr auto dot ( const std::array< int64_t, 3 > &  pt_a,
const std::array< int64_t, 3 > &  pt_b 
) -> int64_t
constexpr

Dot product of two homogeneous 3-vectors.

\[ a \cdot b = a_x b_x + a_y b_y + a_z b_z \]

Parameters
[in]pt_aFirst vector
[in]pt_bSecond vector
Returns
int64_t

◆ plckr()

constexpr auto plckr ( const int64_t &  lambda,
const std::array< int64_t, 3 > &  pt_p,
const int64_t &  mu,
const std::array< int64_t, 3 > &  pt_q 
) -> std::array<int64_t, 3>
constexpr

Homogeneous parametrization of point or line.

Parameters
[in]lambda
[in]pt_p
[in]mu

\[ \lambda p + \mu q \]

[in]pt_q
Returns
std::array<int64_t, 3>