#include <PlaneEquation.hpp>
|
CU_API | PlaneEquation ()=default |
| Constructor.
|
|
CU_API | PlaneEquation (Point3f const &p1, Point3f const &p2, Point3f const &p3) |
| Constructor.
|
|
CU_API | PlaneEquation (Point3f const &normal, Point3f const &point) |
| Constructor.
|
|
CU_API | PlaneEquation (Point3f const &normal, float d) |
| Constructor.
|
|
CU_API void | set (Point3f const &p1, Point3f const &p2, Point3f const &p3) |
| Compute plane's equation from 3 points.
|
|
CU_API void | set (Point3f const &normal, Point3f const &point) |
| Defines plane's equation.
|
|
CU_API void | set (Point3f const &normal, float d) |
| Defines plane's equation.
|
|
CU_API bool | isParallel (PlaneEquation const &plane) const |
| Checks if this plane is parallel to another one, id est if their normals are parallel.
|
|
CU_API float | distance (Point3f const &point) const |
| Computes distance of a point from this plane.
|
|
CU_API Point3f | project (Point3f const &point) const |
| Retrieves the projection of a point on this plane.
|
|
CU_API bool | intersects (PlaneEquation const &plane, Line3D< float > &line) const |
| Checks if this plane intersects another one, gives the intersection line if intersection is not null.
|
|
CU_API bool | intersects (PlaneEquation const &plane1, PlaneEquation const &plane2, Point3f &intersection) const |
| Checks the intersection of this plane with 2 other ones, gives the intersection point.
|
|
Point3f const & | getNormal () const |
|
float | getDistance () const |
|
◆ PlaneEquation() [1/4]
CU_API castor::PlaneEquation::PlaneEquation |
( |
| ) |
|
|
default |
◆ PlaneEquation() [2/4]
CU_API castor::PlaneEquation::PlaneEquation |
( |
Point3f const & | p1, |
|
|
Point3f const & | p2, |
|
|
Point3f const & | p3 ) |
Constructor.
- Parameters
-
[in] | p1 | The first point belonging to the plane. |
[in] | p2 | The second point belonging to the plane. |
[in] | p3 | The third point belonging to the plane. |
◆ PlaneEquation() [3/4]
CU_API castor::PlaneEquation::PlaneEquation |
( |
Point3f const & | normal, |
|
|
Point3f const & | point ) |
Constructor.
- Parameters
-
[in] | normal | The plane normal. |
[in] | point | A point belonging to the plane. |
◆ PlaneEquation() [4/4]
CU_API castor::PlaneEquation::PlaneEquation |
( |
Point3f const & | normal, |
|
|
float | d ) |
Constructor.
- Parameters
-
[in] | normal | The plane normal. |
[in] | d | The plane distance. |
◆ distance()
CU_API float castor::PlaneEquation::distance |
( |
Point3f const & | point | ) |
const |
Computes distance of a point from this plane.
- Parameters
-
- Returns
- The distance, positive if the point is on the same side as the plane's normal
◆ getDistance()
float castor::PlaneEquation::getDistance |
( |
| ) |
const |
|
inline |
- Returns
- The plane's distance to origin.
◆ getNormal()
Point3f const & castor::PlaneEquation::getNormal |
( |
| ) |
const |
|
inline |
- Returns
- The plane's normal.
◆ intersects() [1/2]
Checks if this plane intersects another one, gives the intersection line if intersection is not null.
- Todo
- Find origin point
- Parameters
-
[in] | plane | The plane to check |
[out] | line | The intersection line |
- Returns
true
if there is an intersection, false if not
◆ intersects() [2/2]
Checks the intersection of this plane with 2 other ones, gives the intersection point.
- Parameters
-
[in] | plane1 | The first plane to check |
[in] | plane2 | The second plane to check |
[out] | intersection | The intersection point |
- Returns
true
if there is an intersection point between the 3 planes
◆ isParallel()
Checks if this plane is parallel to another one, id est if their normals are parallel.
- Parameters
-
[in] | plane | The plane to test |
◆ project()
CU_API Point3f castor::PlaneEquation::project |
( |
Point3f const & | point | ) |
const |
Retrieves the projection of a point on this plane.
- Parameters
-
[in] | point | The point to project |
- Returns
- The projection result
◆ set() [1/3]
CU_API void castor::PlaneEquation::set |
( |
Point3f const & | normal, |
|
|
float | d ) |
Defines plane's equation.
- Parameters
-
[in] | normal | The plane normal. |
[in] | d | The plane distance. |
◆ set() [2/3]
CU_API void castor::PlaneEquation::set |
( |
Point3f const & | normal, |
|
|
Point3f const & | point ) |
Defines plane's equation.
- Parameters
-
[in] | normal | The plane normal. |
[in] | point | A point belonging to the plane. |
◆ set() [3/3]
CU_API void castor::PlaneEquation::set |
( |
Point3f const & | p1, |
|
|
Point3f const & | p2, |
|
|
Point3f const & | p3 ) |
Compute plane's equation from 3 points.
- Parameters
-
[in] | p1 | The first point belonging to the plane. |
[in] | p2 | The second point belonging to the plane. |
[in] | p3 | The third point belonging to the plane. |
◆ operator!=
Checks if this plane is different from another one.
◆ operator==
Checks if this plane is equal to another one.
The documentation for this class was generated from the following file: