37 #ifndef INCLUDED_IMATHLINE_H 38 #define INCLUDED_IMATHLINE_H 113 pos = p0; dir = p1-p0;
120 return pos + dir * parameter;
126 return (closestPointTo(point)-point).length();
132 return ((point - pos) ^ dir) * dir + pos;
138 T d = (dir % line.
dir) ^ (line.
pos - pos);
139 return (d >= 0)? d: -d;
150 T a = line.
dir ^ dir;
151 T f = line.
dir ^ posLpos ;
156 T absDenom = ((denom >= 0)? denom: -denom);
160 T absNum = ((num >= 0)? num: -num);
166 return pos + dir * (num / denom);
170 std::ostream& operator<< (std::ostream &o, const Line3<T> &line)
172 return o <<
"(" << line.pos <<
", " << line.dir <<
")";
175 template<
class S,
class T>
Definition: ImathFrame.h:42
Definition: ImathFrame.h:43
Definition: ImathLimits.h:117
const Vec3 & normalize()
Definition: ImathVec.h:1681
Vec3< T > dir
Definition: ImathLine.h:59
Vec3< T > closestPointTo(const Vec3< T > &point) const
Definition: ImathLine.h:130
Vec3< T > pos
Definition: ImathLine.h:58
Definition: ImathLine.h:54
Line3< float > Line3f
Definition: ImathLine.h:96
Vec3< T > operator()(T parameter) const
Definition: ImathLine.h:118
Line3()
Definition: ImathLine.h:65
Line3< double > Line3d
Definition: ImathLine.h:97
void set(const Vec3< T > &point1, const Vec3< T > &point2)
Definition: ImathLine.h:111
Definition: ImathBox.h:67
Color4< T > operator*(S a, const Color4< T > &v)
Definition: ImathColor.h:727
T distanceTo(const Vec3< T > &point) const
Definition: ImathLine.h:124