19#ifndef _GIMLI_PLANE__H
20#define _GIMLI_PLANE__H
42 Plane(
const RVector3 & p0,
const RVector3 & p1,
const RVector3 & p2);
45 Plane(
double a,
double b,
double c,
double d);
57 inline bool operator == (
const Plane & plane){
62 inline bool operator != (
const Plane & plane){
63 return !(*
this== plane);
69 bool compare(
const Plane & p,
double tol=TOLERANCE,
bool bothDirs=
false);
74 bool touch (
const RVector3 & pos,
double tol = TOLERANCE);
78 Line intersect(
const Plane & plane,
double tol = TOLERANCE);
83 RVector3 intersect(
const Line & line,
double tol = TOLERANCE,
bool inside =
false);
87 inline const RVector3 &
norm()
const {
return norm_; }
90 inline const RVector3
x0()
const {
return norm_ * d_; }
93 inline double distance(
const RVector3 & pos)
const {
return norm_.dot(pos) - d_ ; }
96 inline double d()
const {
return d_; }
99 bool checkValidity(
double tol = TOLERANCE);
102 inline bool valid()
const {
return valid_; }
107 void copy_(
const Plane & plane);
114std::ostream & operator << (std::ostream & str,
const Plane & p);
A line.
Definition line.h:30
A plane.
Definition plane.h:30
double distance(const RVector3 &pos) const
Definition plane.h:93
const RVector3 x0() const
Definition plane.h:90
const RVector3 & norm() const
Definition plane.h:87
bool compare(const Plane &p, double tol=TOLERANCE, bool bothDirs=false)
Definition plane.cpp:190
double d() const
Definition plane.h:96
bool valid() const
Definition plane.h:102
Plane()
Definition plane.cpp:36
GIMLi main namespace for the Geophyiscal Inversion and Modelling Library.
Definition baseentity.h:24