17 static constexpr auto eps = 10 * std::numeric_limits<T>::epsilon();
21 operator T()
const {
return a; }
22 operator T&() {
return a; }
26 [[nodiscard]] U
interpolate(
const U & v0,
const U & v1 )
const
28 return ( 1 -
a ) * v0 +
a * v1;
45 [[nodiscard]]
bool operator==( T rhs )
const {
return a == rhs; }
Definition MRCameraOrientationPlugin.h:8
encodes a point inside a line segment using relative distance in [0,1]
Definition MRSegmPoint.h:14
static constexpr auto eps
Definition MRSegmPoint.h:17
int inVertex() const
returns [0,1] if the point is in a vertex or -1 otherwise
Definition MRSegmPoint.h:32
T a
a in [0,1], a=0 => point is in v0, a=1 => point is in v1
Definition MRSegmPoint.h:15
bool operator==(const SegmPoint &rhs) const =default
returns true if two points have equal (a) representation
U interpolate(const U &v0, const U &v1) const
given values in two vertices, computes interpolated value at this point
Definition MRSegmPoint.h:26
bool operator==(T rhs) const
Definition MRSegmPoint.h:45
SegmPoint(T a)
Definition MRSegmPoint.h:20
SegmPoint sym() const
represents the same point relative to oppositely directed segment
Definition MRSegmPoint.h:42