28 #ifndef LSST_AFW_GEOM_POINT_H
29 #define LSST_AFW_GEOM_POINT_H
41 template <
typename T,
int N>
126 std::stringstream out;
128 for (
size_t i = 0; i < N; ++i) {
141 template <
typename Vector>
150 template <
typename T,
int N>
151 class Point :
public PointBase<T, N> {
152 typedef PointBase<T, N> Super;
167 template <
typename U>
184 template <
typename T>
201 template <
typename U>
230 template <
typename T>
247 template <
typename U>
263 explicit Point(std::tuple<T, T, T>
const &xyz)
264 :
Super(
EigenVector(std::get<0>(xyz), std::get<1>(xyz), std::get<2>(xyz))) {}
CoordinateExpr< N > gt(Point< T, N > const &other) const
Point(T val=static_cast< T >(0))
Construct a Point with all elements set to the same scalar value.
double distanceSquared(PointBase< T, N > const &other) const
Point(T x, T y, T z)
Explicit constructor from a sequence of doubles.
Super::EigenVector EigenVector
Point(std::tuple< T, T, T > const &xyz)
Construct from std::tuple.
PointBase(T val=static_cast< T >(0))
bool all(CoordinateExpr< N > const &expr)
Return true if all elements are true.
void scale(double factor)
Point< T, N > & operator+=(Extent< T, N > const &other)
Point(EigenVector const &vector)
Construct a Point from an Eigen vector.
bool operator==(Point< T, N > const &other) const
Standard equality comparison.
CoordinateExpr< N > ge(T scalar) const
A coordinate class intended to represent offsets and dimensions.
CoordinateExpr< N > lt(Point< T, N > const &other) const
Point< T, N > operator-(Extent< T, N > const &other) const
Extent< T, N > operator-(Point< T, N > const &other) const
Super::EigenVector EigenVector
Point(std::pair< T, T > const &xy)
Construct from a std::pair.
Point(std::tuple< T, T > const &xy)
Construct from std::tuple.
Point< double, 2 > PointD
constexpr Angle operator+(Angle a, Angle d) noexcept
Sum of two angles.
CoordinateExpr< N > ge(Point< T, N > const &other) const
Point< T, N > & operator-=(Extent< T, N > const &other)
PointBase(Eigen::MatrixBase< Vector > const &vector)
A CRTP base class for coordinate objects.
A coordinate class intended to represent absolute positions.
Point(Extent< T, 2 > const &other)
Explicit constructor from Extent.
Super::EigenVector EigenVector
Point(T val=static_cast< T >(0))
Construct a Point with all elements set to the same scalar value.
bool any(CoordinateExpr< N > const &expr)
Return true if any elements are true.
Point(Extent< T, N > const &other)
Explicit constructor from Extent.
Point(EigenVector const &vector)
Construct a Point from an Eigen vector.
CoordinateExpr< N > eq(T scalar) const
Point< double, 2 > Point2D
void shift(Extent< T, N > const &offset)
Shift the point by the given offset.
bool operator!=(Point< T, N > const &other) const
Standard inequality comparison.
Extent< T, N > asExtent() const
Cast this object to an Extent of the same numeric type and dimensionality.
std::string toString() const
Point< T, N > operator+(Extent< T, N > const &other) const
A coordinate class intended to represent offsets and dimensions (3-d specialization).
CoordinateExpr< N > ne(T scalar) const
A coordinate class intended to represent offsets and dimensions (2-d specialization).
Eigen::Matrix< T, N, 1, Eigen::DontAlign > EigenVector
Extent< double, N > & operator+=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
void _swap(CoordinateBase &other)
Point(T val=static_cast< T >(0))
Construct a Point with all elements set to the same scalar value.
EigenVector const & asEigen() const
Return a fixed-size Eigen representation of the coordinate object.
constexpr Angle operator-(Angle a, Angle d) noexcept
Difference of two angles.
CoordinateExpr< N > le(Point< T, N > const &other) const
CoordinateExpr< N > gt(T scalar) const
Point(EigenVector const &vector)
Construct a Point from an Eigen vector.
CoordinateExpr< N > le(T scalar) const
Point(T x, T y)
Explicit constructor from a pair of doubles.
Extent< double, N > & operator-=(Extent< double, N > &lhs, Extent< int, N > const &rhs)
Point(Extent< T, 3 > const &other)
Explicit constructor from Extent.
Point< double, 3 > Point3D
Point(T const xy[2])
Construct from a two-element array.
CoordinateExpr< N > lt(T scalar) const
Point(T const xyz[3])
Construct from a two-element array.
CoordinateExpr< N > eq(Point< T, N > const &other) const
CoordinateExpr< N > ne(Point< T, N > const &other) const