35 #ifndef IECORE_LINESEGMENT_H
36 #define IECORE_LINESEGMENT_H
38 #include "IECore/VectorTraits.h"
40 #include "OpenEXR/ImathVec.h"
41 #include "OpenEXR/ImathPlane.h"
71 bool operator!=(
const S &other )
const;
103 BaseType distanceTo(
const T &point )
const;
106 BaseType distanceTo(
const LineSegment &line )
const;
111 bool intersect(
const Imath::Plane3<S> &plane, T &intersection )
const;
113 bool intersectT(
const Imath::Plane3<S> &plane, BaseType &t )
const;
126 std::ostream &operator << ( std::ostream &o, const LineSegment<T> &lineSegment );
130 #include "IECore/LineSegment.inl"
132 #endif // IECORE_LINESEGMENT_H
BaseType length() const
Distance between p0 and p1.
bool operator==(const S &other) const
Equality.
BaseType distance2To(const T &point) const
Returns the shortest squared distance to the point.
T closestPoints(const LineSegment &line, T &otherPoint) const
T operator()(BaseType t) const
BaseType length2() const
Distance squared between p0 and p1.
LineSegment()
Uninitialised.
T closestPointTo(const T &point) const
Returns the point on this LineSeqment which is closest to the specified point.
Definition: LineSegment.h:51
T normalizedDirection() const
(p1 - p0).normalized()
T direction() const
p1 - p0
T::BaseType BaseType
The type of the components of the vector.
Definition: VectorTraits.h:51
const LineSegment & operator*=(const S &m)
static unsigned int dimensions()
Simply returns the dimensions of the underlying point type.
T p0
Line endpoints can be accessed directly.
Definition: LineSegment.h:60
This namespace contains all components of the core library.
Definition: AddSmoothSkinningInfluencesOp.h:43