Geophysical Inversion and Modelling Library v1.5.4
|
A plane. More...
#include <plane.h>
Public Member Functions | |
Plane () | |
Plane (const RVector3 &norm, double d) | |
Plane (const RVector3 &norm, const RVector3 &x0) | |
Plane (const RVector3 &p0, const RVector3 &p1, const RVector3 &p2) | |
Plane (double a, double b, double c, double d) | |
Plane (const Plane &plane) | |
~Plane () | |
Plane & | operator= (const Plane &plane) |
bool | operator== (const Plane &plane) |
bool | operator!= (const Plane &plane) |
bool | compare (const Plane &p, double tol=TOLERANCE, bool bothDirs=false) |
bool | touch (const RVector3 &pos, double tol=TOLERANCE) |
Line | intersect (const Plane &plane, double tol=TOLERANCE) |
RVector3 | intersect (const Line &line, double tol=TOLERANCE, bool inside=false) |
const RVector3 & | norm () const |
const RVector3 | x0 () const |
double | distance (const RVector3 &pos) const |
double | d () const |
bool | checkValidity (double tol=TOLERANCE) |
bool | valid () const |
Protected Member Functions | |
void | copy_ (const Plane &plane) |
Protected Attributes | |
RVector3 | norm_ |
double | d_ |
bool | valid_ |
A plane.
A plane, defined through Hessian normal form, norm * x = -p. Stores Normvector norm with |norm| = 1.0 and distance d from orign.
GIMLI::Plane::Plane | ( | ) |
Default constructor, Construct an invalid empty plane.
Referenced by compare(), copy_(), intersect(), operator!=(), operator=(), operator==(), and Plane().
GIMLI::Plane::Plane | ( | const RVector3 & | norm, |
double | d ) |
Construct a plane based on Hessian normal form norm * x = -p.
References checkValidity(), d(), and norm().
Construct a plane based on his unit nomal vector norm and a base position x0.
References checkValidity(), norm(), and x0().
Construct a plane based on 3 real positions in R^3, respectivly parameterized style.
References checkValidity(), and GIMLI::det().
GIMLI::Plane::Plane | ( | double | a, |
double | b, | ||
double | c, | ||
double | d ) |
Construct a plane based on his general equation
References checkValidity(), and d().
GIMLI::Plane::~Plane | ( | ) |
Default destructor
bool GIMLI::Plane::checkValidity | ( | double | tol = TOLERANCE | ) |
bool GIMLI::Plane::compare | ( | const Plane & | p, |
double | tol = TOLERANCE, | ||
bool | bothDirs = false ) |
Compare two planes with a given tolerance. Check if both norms and distances are equal. | norm - p.norm | < tol && | d_ - p.d | < tol. If bothDirection is True | norm - p.norm | can be 2.0 to allow for coplanar check with different orientations.
References d(), norm(), and Plane().
Referenced by GIMLI::Mesh::copyBoundary(), and operator==().
|
protected |
|
inline |
Distance between the orign(0,0,0) and this plane.
Referenced by compare(), copy_(), intersect(), Plane(), and Plane().
|
inline |
Returns the distance between the Point pos and this plane.
Referenced by touch().
Returns the point of intersection between this plane and the Line line. Return an invalid RVector3 if line and this plane are parallel. Optional inside check. Set inside returns invalid RVector3 if intersection point is not inside (including nodes) the line
References GIMLI::Line::p0(), GIMLI::Line::p1(), touch(), GIMLI::Line::valid(), valid(), and x0().
Returns the Line of intersection between 2 planes. Are booth planes parallel or identically the returned line is invalid.
References GIMLI::Pos::abs(), d(), GIMLI::det(), norm(), and Plane().
|
inline |
Return a const reference to the unit vector of this plane. | norm | = 1.0
Referenced by compare(), copy_(), intersect(), GIMLI::PolygonShape::norm(), Plane(), and Plane().
|
inline |
Not_equal_to operator
References Plane().
|
inline |
bool GIMLI::Plane::touch | ( | const RVector3 & | pos, |
double | tol = TOLERANCE ) |
Returns true if the plane is valid and pos touch this plane. Touch when plane.distance(pos) < tol.
References distance().
Referenced by intersect(), and GIMLI::Shape::touch().
|
inline |
Return the validity of this plane. This plane is not valid if its initialized by default constructor.
Referenced by copy_(), and intersect().
|
inline |
Returns the orign if the unit vector. x0 = n * d.
Referenced by intersect(), and Plane().