Euclidean namespace
Module for dealing with Euclidean geometries.
Classes
-
template<class Derived, class T>class Base
- Base class for Euclidean geometric objects using CRTP.
-
template<size_t Dimension, class T>class Box
- Closed axis-aligned box .
-
template<class T, class OtherGeometry, class = void>struct HasIntersectMethod
- Type trait to detect if a type has an intersect method.
See specializations
Specialization Description T, OtherGeometry, std::void_t<…>Full specialization
template < class T, class OtherGeometry> struct HasIntersectMethod< T, OtherGeometry, std::void_t< decltype(std::declval< T >().intersect(std::declval< const OtherGeometry & >()))>>;
Specialization when intersect method exists. -
template<class T, class OtherGeometry, class = void>struct HasDistanceMethod
- Type trait to detect if a type has a distance method.
See specializations
Specialization Description T, OtherGeometry, std::void_t<…>Full specialization
template < class T, class OtherGeometry> struct HasDistanceMethod< T, OtherGeometry, std::void_t< decltype(std::declval< T >().distance(std::declval< const OtherGeometry & >()))>>;
Specialization when distance method exists. -
template<class T, class OtherGeometry, class = void>struct HasConnectMethod
- Type trait to detect if a type has a connect method.
See specializations
Specialization Description T, OtherGeometry, std::void_t<…>Full specialization
template < class T, class OtherGeometry> struct HasConnectMethod< T, OtherGeometry, std::void_t< decltype(std::declval< T >().connect(std::declval< const OtherGeometry & >()))>>;
Specialization when connect method exists. -
template<size_t Dimension, class T>class Point
- Point with compile-time fixed coordinate storage. Arithmetic applies componentwise; subtracting two points yields a spatial displacement. The template dimension is a nonnegative compile-time coordinate count.
-
template<size_t Dimension, class T>class LineSegment
- Segment between distinct endpoints. The closed segment corresponds to ; parameter evaluation also accepts extrapolation. Storage has exactly Dimension components. Intersection returns a point only when unique, including a shared endpoint of collinear segments; positive-length overlaps return no unique point.
-
template<size_t Dimension, class T>class Line
- Affine line in a compile-time Euclidean dimension. with nonzero direction . Projection uses the Euclidean inner product. Closest points use direct formulas through dimension three and a fixed-size QR solve in higher dimensions. Unit direction columns use a rank threshold of twice scalar machine epsilon (relative to the largest QR pivot in higher dimensions). Numerically parallel directions have rank below two and admit no unique line intersection. Intersections return only unique points; coincident lines return no point.
-
template<size_t Dimension, class T>class Sphere
- Sphere in a compile-time ambient dimension. In one dimension the sphere comprises two endpoints; in two it is a circle.
-
template<size_t Dimension, class T>class Hyperplane
- Affine hyperplane .
Typedefs
-
template<class T>using Point2D = Point<2, T>
- Point in the Euclidean plane.
-
template<class T>using LineSegment2D = LineSegment<2, T>
- Line segment in the Euclidean plane.
-
template<class T>using Line2D = Line<2, T>
- Affine line in the Euclidean plane.
-
template<class T>using Circle = Sphere<2, T>
- Circle in the Euclidean plane.
-
template<class T>using Rectangle = Box<2, T>
- Axis-aligned box in the Euclidean plane.
Functions
-
template<class P0, class ... Ps>auto barycenter(const P0& p0, const Ps&... ps) -> auto
- Computes the barycenter (centroid) of multiple points.
Typedef documentation
template<class T>
using Point2D = Point<2, T>
Defined in Rodin/Geometry/Euclidean/ForwardDecls.h
Point in the Euclidean plane.
| Template parameters | |
|---|---|
| T | Coordinate scalar type. |
template<class T>
using LineSegment2D = LineSegment<2, T>
Defined in Rodin/Geometry/Euclidean/ForwardDecls.h
Line segment in the Euclidean plane.
| Template parameters | |
|---|---|
| T | Coordinate scalar type. |
template<class T>
using Line2D = Line<2, T>
Defined in Rodin/Geometry/Euclidean/ForwardDecls.h
Affine line in the Euclidean plane.
| Template parameters | |
|---|---|
| T | Coordinate scalar type. |
template<class T>
using Circle = Sphere<2, T>
Defined in Rodin/Geometry/Euclidean/ForwardDecls.h
Circle in the Euclidean plane.
| Template parameters | |
|---|---|
| T | Coordinate scalar type. |
template<class T>
using Rectangle = Box<2, T>
Defined in Rodin/Geometry/Euclidean/ForwardDecls.h
Axis-aligned box in the Euclidean plane.
| Template parameters | |
|---|---|
| T | Coordinate scalar type. |
Function documentation
template<class P0, class ... Ps>
auto barycenter(const P0& p0,
const Ps&... ps)
Defined in Rodin/Geometry/Euclidean/Common.h
Computes the barycenter (centroid) of multiple points.
| Template parameters | |
|---|---|
| P0 | Type of first point |
| Ps | Types of remaining points |
| Parameters | |
| p0 in | First point |
| ps in | Remaining points |
| Returns | Barycenter of all points |
Given points , computes: