Plane in Hesse normal form.
More...
#include <Plane.h>
|
| Plane () |
| Default plane. Spans XY plane, points towards +Z. More...
|
|
| Plane (const Vector3 &normal, float distance) |
| Construct from normal and distance, normal as Vector3. More...
|
|
| Plane (float n0, float n1, float n2, float d) |
| Construct from normal and distance, normal as individual components. More...
|
|
| Plane (const Vector3 &p0, const Vector3 &p1, const Vector3 &p2) |
| Construct plane passing through three points. More...
|
|
float | GetDistance (const Vector3 &point) const |
| Get distance of point to plane. More...
|
|
IntersectStatus | Check (const Vector3 &point) const |
| Check point. More...
|
|
IntersectStatus | Check (const Vector3 ¢er, float radius) const |
| Check sphere. More...
|
|
IntersectStatus | Check (const AxisAlignedBox &box) const |
| Check AABB. More...
|
|
void | Normalize () |
| Scale normal and vector so that normal has unit length. More...
|
|
const Vector3 & | GetNormal () const |
|
float | GetDistance () const |
|
void | SetDistance (float distance) |
|
template<class InputIterator , class OutputIterator > |
OutputIterator | ClipPolygon (InputIterator inputBegin, InputIterator inputEnd, OutputIterator destBegin) |
| Clip polygon by plane. More...
|
|
Vector3 | IntersectionPoint (const Vector3 &p0, const Vector3 &p1) |
| Get point where line intersects with plane. More...
|
|
Plane in Hesse normal form.
Return type of Check()
Enumerator |
---|
kOutside |
|
kInside |
|
kIntersect |
|
molecular::util::Plane::Plane |
( |
| ) |
|
|
inline |
Default plane. Spans XY plane, points towards +Z.
molecular::util::Plane::Plane |
( |
const Vector3 & |
normal, |
|
|
float |
distance |
|
) |
| |
|
inline |
Construct from normal and distance, normal as Vector3.
molecular::util::Plane::Plane |
( |
float |
n0, |
|
|
float |
n1, |
|
|
float |
n2, |
|
|
float |
d |
|
) |
| |
|
inline |
Construct from normal and distance, normal as individual components.
Construct plane passing through three points.
Normal is positive for the side on which the points are defined CCW.
Check point.
Never returns kIntersect, obviously.
template<class InputIterator , class OutputIterator >
OutputIterator molecular::util::Plane::ClipPolygon |
( |
InputIterator |
inputBegin, |
|
|
InputIterator |
inputEnd, |
|
|
OutputIterator |
destBegin |
|
) |
| |
Clip polygon by plane.
Output range must have space for one more point than input range.
- Returns
- Iterator to end of new output range. Equal to destBegin if entire polygon lies on the negative side of the plane, e.g. no polygon remains after clipping.
float molecular::util::Plane::GetDistance |
( |
const Vector3 & |
point | ) |
const |
|
inline |
Get distance of point to plane.
float molecular::util::Plane::GetDistance |
( |
| ) |
const |
|
inline |
const Vector3& molecular::util::Plane::GetNormal |
( |
| ) |
const |
|
inline |
Get point where line intersects with plane.
Line is given by two endpoints.
- Parameters
-
p0 | One endpoint of the line. |
p1 | The other endpoint of the line. |
void molecular::util::Plane::Normalize |
( |
| ) |
|
|
inline |
Scale normal and vector so that normal has unit length.
Values describes the same plane before and after normalization.
void molecular::util::Plane::SetDistance |
( |
float |
distance | ) |
|
|
inline |
The documentation for this class was generated from the following file:
- /home/travis/build/cmdrf/molecular/molecular-gfx/molecular/util/Plane.h