|
ActiveLib
|
Class to represent a plane. More...
#include <Plane.h>
Public Types | |
| using | Unique = std::unique_ptr<Plane> |
| Unique pointer. | |
| using | Shared = std::shared_ptr<Plane> |
| Shared pointer. | |
| using | Option = std::optional<Plane> |
| Optional. | |
Public Member Functions | |
| Plane () | |
| Plane (const Vector3 &norm) | |
| virtual Plane | operator+ (const Point &offset) |
| virtual Plane & | operator+= (const Point &offset) |
| virtual Plane | operator* (const double &mult) const |
| virtual Plane | operator* (const Matrix3x3 &matrix) const |
| virtual Plane | operator* (const Matrix4x4 &matrix) const |
| virtual Plane & | operator*= (const double &mult) |
| virtual Plane & | operator*= (const Matrix3x3 &matrix) |
| virtual Plane & | operator*= (const Matrix4x4 &matrix) |
| const Vector3 & | getNormal () const |
| double | getOffset () const |
| Position | positionOf (const Point &ref, double prec=math::eps) const |
| Point | closestPointTo (const Point &ref) const |
| double | lengthTo (const Point &ref) const |
| double | heightAt (const Point &ref, double prec=math::eps) const |
| XPoint::Option | intersectionWith (const Line &ref, double prec=math::eps) const |
| Line::Option | intersectionWith (const Plane &ref, double prec=math::eps) const |
| Point::Option | intersectionWith (const Plane &ref1, const Plane &ref2) const |
| bool | isParallelTo (const Plane &ref, double prec=math::eps) const |
| bool | cutsThrough (const Box &ref, double prec=math::eps) const |
| bool | setNormal (const Vector3 &vect) |
| void | setOffset (double offset) |
Static Public Member Functions | |
| static Option | create (double offset, const Vector3 &norm) |
| static Option | create (const Point &point, const Vector3 &norm) |
| static Option | create (const Point &p1, const Point &p2, const Point &p3) |
Class to represent a plane.
| Plane::Plane | ( | ) |
Default constructor

| Plane::Plane | ( | const Vector3 & | norm | ) |
Constructor
| norm | The plane normal |

Get the point on the plane closest to the reference point
| ref | The reference point |

|
static |
Create a plane from three points
| p1 | First point on the plane |
| p2 | Second point on the plane |
| p3 | Third point on the plane |

|
static |
Create a new plane from a point and normal
| point | A point on the plane |
| norm | Normal to the plane |

|
static |
Create a new plane from a normal and offset from the origin
| offset | Distance along normal from the origin to the plane |
| norm | Normal to the plane |


Determine whether this plane cuts through the specified volume
| ref | The volume to compare |
| prec | The required precision |

| const Vector3 & Plane::getNormal | ( | ) | const |
Get the normal to the plane

| double Plane::getOffset | ( | ) | const |
Get the offset from the origin to the plane along the normal
Get the height of a point projected vertically onto the plane
| ref | The reference point |


| XPoint::Option Plane::intersectionWith | ( | const Line & | ref, |
| double | prec = math::eps ) const |
Get the point of intersection between a line and the plane
| ref | The reference line |
| prec | The required precision |


| Line::Option Plane::intersectionWith | ( | const Plane & | ref, |
| double | prec = math::eps ) const |
Get the vector describing the intersection of two planes
| ref | The reference plane |
| prec | The required precision |

| Point::Option active::geometry::Plane::intersectionWith | ( | const Plane & | ref1, |
| const Plane & | ref2 ) const |
Get the point at the intersection of three planes
| ref1 | The first plane |
| ref2 | The second plane |
Determine whether this plane is parallel to another
| ref | The plane to compare |
| prec | The required precision |

| double Plane::lengthTo | ( | const Point & | ref | ) | const |
Get the minimum length from a point to the plane
| ref | The reference point |

|
virtual |
Multiplication operator
| mult | The factor to multiply this by |
Multiplication operator
| matrix | The matrix to multiply this by |
Multiplication operator
| matrix | The matrix to multiply this by |
|
virtual |
Multiplication and assignment operator
| mult | The factor to multiply this by |
Multiplication and assignment operator
| matrix | The matrix to multiply this by |
Multiplication and assignment operator
| matrix | The matrix to multiply this by |
Addition operator
| offset | The amount to offset this by |
Addition and assignment operator
| offset | The amount to offset this by |
Get the position of a point with respect to the plane
| ref | The reference point |
| prec | The required precision |


| bool Plane::setNormal | ( | const Vector3 & | vect | ) |
Set the normal to the plane
| vect | The normal to the plane |


|
inline |
Set the offset to the plane
| offset | The offset to the plane |