CGAL 6.1.2 - 2D and 3D Linear Geometry Kernel: CGAL::Plane_3< Kernel > Class Template Reference

CGAL 6.1.2 - 2D and 3D Linear Geometry Kernel

Loading...
Searching...
No Matches
List of all members
CGAL::Plane_3< Kernel > Class Template Reference
Reference Manual » 3D Kernel Objects

`#include <CGAL/Plane_3.h>`

## Definition

template<typename Kernel>
class CGAL::Plane_3< Kernel >

An object `h` of the data type `Plane_3` is an oriented plane in the three-dimensional Euclidean space \( \E^3\).

It is defined by the set of points with Cartesian coordinates \( (x,y,z)\) that satisfy the plane equation

\[h :\; a\, x +b\, y +c\, z + d = 0.\]

The plane splits \( \E^3\) in a positive and a negative side. A point `p` with Cartesian coordinates \( (px, py, pz)\) is on the positive side of `h`, iff \( a\, px +b\, py +c\, pz + d > 0\). It is on the negative side, iff \( a\, px +b\, py\, +c\, pz + d < 0\).

Is model of
  `Kernel::Plane_3`

## Creation
| Plane_3 (const Kernel::RT &a, const Kernel::RT &b, const Kernel::RT &c, const Kernel::RT &d)
| creates a plane `h` defined by the equation \( a\, px +b\, py +c\, pz + d = 0\).
| Plane_3 (const Point_3< Kernel > &p, const Point_3< Kernel > &q, const Point_3< Kernel > &r)
| creates a plane `h` passing through the points `p`, `q` and `r`.
| Plane_3 (const Point_3< Kernel > &p, const Vector_3< Kernel > &v)
| introduces a plane `h` that passes through point `p` and that is orthogonal to `v`.
| Plane_3 (const Point_3< Kernel > &p, const Direction_3< Kernel > &d)
| introduces a plane `h` that passes through point `p` and that has as an orthogonal direction equal to `d`.
| Plane_3 (const Line_3< Kernel > &l, const Point_3< Kernel > &p)
| introduces a plane `h` that is defined through the three points `l.point(0)`, `l.point(1)` and `p`.
| Plane_3 (const Ray_3< Kernel > &r, const Point_3< Kernel > &p)
| introduces a plane `h` that is defined through the three points `r.point(0)`, `r.point(1)` and `p`.
| Plane_3 (const Segment_3< Kernel > &s, const Point_3< Kernel > &p)
| introduces a plane `h` that is defined through the three points `s.source()`, `s.target()` and `p`.
| Plane_3 (const Circle_3< Kernel > &c)
| introduces a plane `h` that is defined as the plane containing the circle.

## Operations
bool | operator== (const Plane_3< Kernel > &h2) const
| Test for equality: two planes are equal, iff they have a non empty intersection and the same orientation.
bool | operator!= (const Plane_3< Kernel > &h2) const
| Test for inequality.
Kernel::RT | a () const
| returns the first coefficient of `h`.
Kernel::RT | b () const
| returns the second coefficient of `h`.
Kernel::RT | c () const
| returns the third coefficient of `h`.
Kernel::RT | d () const
| returns the fourth coefficient of `h`.
Line_3< Kernel > | perpendicular_line (const Point_3< Kernel > &p) const
| returns the line that is perpendicular to `h` and that passes through point `p`.
Point_3< Kernel > | projection (const Point_3< Kernel > &p) const
| returns the orthogonal projection of `p` on `h`.
Plane_3< Kernel > | opposite () const
| returns the plane with opposite orientation.
Point_3< Kernel > | point () const
| returns an arbitrary point on `h`.
Vector_3< Kernel > | orthogonal_vector () const
| returns a vector that is orthogonal to `h` and that is directed to the positive side of `h`.
Direction_3< Kernel > | orthogonal_direction () const
| returns the direction that is orthogonal to `h` and that is directed to the positive side of `h`.
Vector_3< Kernel > | base1 () const
| returns a vector orthogonal to `orthogonal_vector()`.
Vector_3< Kernel > | base2 () const
| returns a vector that is both orthogonal to `base1()`, and to `orthogonal_vector()`, and such that the result of `orientation( point(), point() + base1(), point()+base2(), point() + orthogonal_vector() )` is positive.

## 2D Conversion
The following functions provide conversion between a plane and CGAL's two-dimensional space. The transformation is affine, but not necessarily an isometry. This means, the transformation preserves combinatorics, but not distances.
Point_2< Kernel > | to_2d (const Point_3< Kernel > &p) const
| returns the image point of the projection of `p` under an affine transformation, which maps `h` onto the \( xy\)-plane, with the \( z\)-coordinate removed.
Point_3< Kernel > | to_3d (const Point_2< Kernel > &p) const
| returns a point `q`, such that `to_2d( to_3d( p ))` is equal to `p`.

## Predicates
Oriented_side | oriented_side (const Point_3< Kernel > &p) const
| returns either ON_ORIENTED_BOUNDARY, or the constant ON_POSITIVE_SIDE, or the constant ON_NEGATIVE_SIDE, determined by the position of `p` relative to the oriented plane `h`.

## Convenience Boolean Functions
bool | has_on (const Point_3< Kernel > &p) const
bool | has_on_positive_side (const Point_3< Kernel > &p) const
bool | has_on_negative_side (const Point_3< Kernel > &p) const
bool | has_on (const Line_3< Kernel > &l) const
bool | has_on (const Circle_3< Kernel > &l) const
bool | is_degenerate () const
| Plane `h` is degenerate, if the coefficients `a`, `b`, and `c` of the plane equation are zero.

## Miscellaneous
Plane_3< Kernel > | transform (const Aff_transformation_3< Kernel > &t) const
| returns the plane obtained by applying `t` on a point of `h` and the orthogonal direction of `h`.

## Constructor & Destructor Documentation

## ◆ Plane_3() [1/3]

template<typename Kernel >

CGAL::Plane_3< Kernel >::Plane_3 | ( | const Kernel::RT & | a,
|  | const Kernel::RT & | b,
|  | const Kernel::RT & | c,
|  | const Kernel::RT & | d
| ) |  |

creates a plane `h` defined by the equation \( a\, px +b\, py +c\, pz + d = 0\).

Notice that `h` is degenerate if \( a = b = c = 0\).

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ Plane_3() [2/3]

template<typename Kernel >

CGAL::Plane_3< Kernel >::Plane_3 | ( | const Point_3< Kernel > & | p,
|  | const Point_3< Kernel > & | q,
|  | const Point_3< Kernel > & | r
| ) |  |

creates a plane `h` passing through the points `p`, `q` and `r`.

The plane is oriented such that `p`, `q` and `r` are oriented in a positive sense (that is counterclockwise) when seen from the positive side of `h`. Notice that `h` is degenerate if the points are collinear.

## ◆ Plane_3() [3/3]

template<typename Kernel >

CGAL::Plane_3< Kernel >::Plane_3 | ( | const Circle_3< Kernel > & | c | ) |

introduces a plane `h` that is defined as the plane containing the circle.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## Member Function Documentation

## ◆ a()

template<typename Kernel >

Kernel::RT CGAL::Plane_3< Kernel >::a | ( |  | ) | const

returns the first coefficient of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ b()

template<typename Kernel >

Kernel::RT CGAL::Plane_3< Kernel >::b | ( |  | ) | const

returns the second coefficient of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ c()

template<typename Kernel >

Kernel::RT CGAL::Plane_3< Kernel >::c | ( |  | ) | const

returns the third coefficient of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ d()

template<typename Kernel >

Kernel::RT CGAL::Plane_3< Kernel >::d | ( |  | ) | const

returns the fourth coefficient of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ opposite()

template<typename Kernel >

Plane_3< Kernel > CGAL::Plane_3< Kernel >::opposite | ( |  | ) | const

returns the plane with opposite orientation.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ orthogonal_direction()

template<typename Kernel >

Direction_3< Kernel > CGAL::Plane_3< Kernel >::orthogonal_direction | ( |  | ) | const

returns the direction that is orthogonal to `h` and that is directed to the positive side of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ orthogonal_vector()

template<typename Kernel >

Vector_3< Kernel > CGAL::Plane_3< Kernel >::orthogonal_vector | ( |  | ) | const

returns a vector that is orthogonal to `h` and that is directed to the positive side of `h`.

Exactness
  This construction is trivial and therefore always exact in `Exact_predicates_inexact_constructions_kernel`.

## ◆ perpendicular_line()

template<typename Kernel >

Line_3< Kernel > CGAL::Plane_3< Kernel >::perpendicular_line | ( | const Point_3< Kernel > & | p | ) | const

returns the line that is perpendicular to `h` and that passes through point `p`.

The line is oriented from the negative to the positive side of `h`.