39 Line(
const RVector3 &
p0,
const RVector3 &
p1);
48 Line & operator = (
const Line & line);
54 inline bool operator == (
const Line & line)
const {
return this->
compare(line); }
57 inline bool operator != (
const Line & line)
const {
return !(*
this == line); }
60 bool checkValidity(
double tol=TOLERANCE);
63 inline bool valid()
const {
return valid_; }
67 bool compare(
const Line & line,
double tol=TOLERANCE)
const;
70 const RVector3 &
p0()
const {
return _p0; }
73 const RVector3 &
p1()
const {
return _p1; }
79 bool intersectRay(
const RVector3 & start,
const RVector3 & dir,
80 RVector3 & pos,
double tol=TOLERANCE)
const;
84 RVector3 intersect(
const RVector3 & start,
const RVector3 & dir,
double tol=TOLERANCE)
const;
90 RVector3 intersect(
const Line & line,
double tol=TOLERANCE)
const;
94 double nearest(
const RVector3 & p)
const;
97 inline RVector3
at(
double t)
const {
return _p0 + (_p1 - _p0) *
t; }
102 double distance(
const RVector3 & pos)
const;
108 double t(
const RVector3 & pos,
double tol=TOLERANCE)
const ;
117 bool touch1(
const RVector3 & pos,
int & pFunIdx,
double tol=TOLERANCE)
const ;
120 bool touch(
const RVector3 & pos,
double tol=TOLERANCE)
const ;
123 double length()
const {
return _p0.dist(_p1); }
128 void copy_(
const Line & line);
135std::ostream & operator << (std::ostream & str,
const Line & l);
A line.
Definition line.h:30
bool compare(const Line &line, double tol=TOLERANCE) const
Definition line.cpp:73
double t(const RVector3 &pos, double tol=TOLERANCE) const
Definition line.cpp:227
const RVector3 & p1() const
Definition line.h:73
bool valid() const
Definition line.h:63
Line()
Definition line.cpp:32
const RVector3 operator()(double t) const
Definition line.h:51
const RVector3 & p0() const
Definition line.h:70
double length() const
Definition line.h:123
RVector3 at(double t) const
Definition line.h:97
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24