template <class T, int N>
class vtb::geometry::Plane

Three- and two-dimensional plane.

  • Two-dimensional plane is a line defined by its normal and a point on the line. Normal is computed by rotating the line by 90 degrees clockwise.
  • Three-dimensional plane is a plane define by its normal and a point on the plane.
  • See line_normal and surface_normal global functions.

Types
  • using const_reference = const value_type &
  • using reference = value_type &
  • using value_type = Vertex< T, N >
  • using scalar_type = T
Fields
  • constexpr const int dimensions
Methods
  • coordinate_system() const -> vtb::geometry::Coordinate_system< T, 3 >
  • basis() const -> vtb::geometry::Basis< T, 3 >
  • redundant_dimension() const -> int
  • Plane(const_reference a, const_reference b, const_reference c)
  • gnuplot(std::ostream & out) const -> void
  • clear() -> void
  • coordinate_system() const -> Coordinate_system< T, N >

    Coordinate system defined by the normal and the origin. This system can be used to project arbitrary points on the plane and then "unproject" them back. After projecting the point on the plane one of its coordinates becomes redundant. The redundant dimension is returned by redundant_dimension method. See puncture and restore global functions that reduce and add dimensions to a vertex.

    Date
    2019-04-09
    Author
    Ivan Gankevich
  • basis() const -> Basis< T, N >

    Vector basis for the coordinate system defined by the normal and the origin.

    Date
    2019-04-09
    Author
    Ivan Gankevich
  • redundant_dimension() const -> int

    The index of dimension that has nought basis vector. Method basis still returns unit vector instead of nought for this dimension.

    Date
    2019-04-09
    Author
    Ivan Gankevich
  • project_vector(const_reference vector) const -> value_type

    Project vector on the plane.

    Date
    2019-11-06
  • project(const_reference point) const -> value_type

    Project point on the plane.

    Date
    2019-04-09
    Author
    Ivan Gankevich
  • operator()() const -> T

    Substitute nought into the plane equation to get .

    Date
    2019-04-09
    Author
    Ivan Gankevich
    Return
  • operator()(const_reference point) const -> T

    Substitute point p to the plane equation.

    • If the result is less than nought, then point p lies behind the plane.
    • If the result is greater than nought, then point p lies in front of the plane.
    • If the result is nought, then point p lies on the plane.

    Date
    2019-04-05
    Author
    Ivan Gankevich
  • invert() -> void

    Invert plane orientation (the direction of the normal).

  • origin() const -> const_reference

    A point on the plane.

  • normal() const -> const_reference

    A vector that is orthogonal to the plane.

  • Plane(const_reference a, const_reference b, const_reference c)explicit

    Construct plane from plane equation. The plane is defined by equation , where is plane normal and is a normal multiplied by any point lying on the plane.

    Date
    2019-04-05
    Author
    Ivan Gankevich
  • Plane(const_reference normal)explicit
  • Plane(const_reference normal, const_reference origin)explicit
  • Plane()
template <class T, int N>
operator<<(std::ostream & out, const Plane< T, N > & rhs) -> std::ostream &
template <class T, int N>
compare(const Plane< T, N > plane, const Vertex< T, N > & point, T eps) -> Plane_position
template <class T, int N>
compare(const Plane< T, N > lhs, const Plane< T, N > & rhs, T eps) -> Plane_position
template <class T, int N>
intersection(const Ray< T, N > & ray, const Plane< T, N > & plane) -> Vertex< T, N >

Returns intersection point of ray and plane. Edge cases are ignored.