23#ifndef VCL_SPACE_CORE_LINE_H
24#define VCL_SPACE_CORE_LINE_H
39template<Po
intConcept Po
intT>
60 static const uint
DIM = PointT::DIM;
91 const PointT&
origin()
const {
return mOrigin; }
122 return mOrigin + mDirection * t;
133using Line2 = Line<Point2<S>>;
135using Line2i = Line<Point2i>;
136using Line2f = Line<Point2f>;
137using Line2d = Line<Point2d>;
140using Line3 = Line<Point3<S>>;
142using Line3i = Line<Point3i>;
143using Line3f = Line<Point3f>;
144using Line3d = Line<Point3d>;
160 std::remove_cvref_t<T>,
161 Line<typename RemoveRef<T>::PointType>>;
A class representing a line in n-dimensional space. The class is parameterized by a PointConcept,...
Definition line.h:41
static const uint DIM
The dimensionality of the line.
Definition line.h:60
PointT::ScalarType ScalarType
The scalar type of the line.
Definition line.h:55
PointT normalizedDirection() const
Returns the normalized direction of the line.
Definition line.h:112
const PointT & origin() const
Returns the origin of the line.
Definition line.h:91
PointT PointType
The type of point used to represent the origin and direction of the line.
Definition line.h:50
PointT pointAtParameter(ScalarType t) const
Returns the point at parameter t along the line.
Definition line.h:120
PointT & origin()
Returns the origin of the line.
Definition line.h:84
Line(const PointT &origin, const PointT &direction)
Creates a line with the given origin and direction.
Definition line.h:74
const PointT & direction() const
Returns the direction of the line.
Definition line.h:105
PointT & direction()
Returns the direction of the line.
Definition line.h:98
Line()
Default constructor. Creates an invalid Line at the origin (direction is zero).
Definition line.h:66
A class representing a line segment in n-dimensional space. The class is parameterized by a PointConc...
Definition segment.h:41
A concept representing a 2D Line.
Definition line.h:174
A concept representing a 3D Line.
Definition line.h:187
A concept representing a Line.
Definition line.h:159