Public Member Functions | |
| void | set (vec3 pa, vec3 pb, vec3 pc) |
| Extrapolate plane from a triangle. | |
| void | set (vec3[] points) |
| Extrapolate plane from a polygon. | |
| void | set (vec3 normal, float offset) |
| Assign parameters; normal does not have to be a unit vector. | |
| float | signedDistance (vec3 vector) |
| Return the signed distance from the vector to the plane. | |
| float | distance (vec3 vector) |
| Return the distance from the vector to the plane. | |
| bit | inFront (vec3 vector) |
| Return whether this point is in front of the plane. | |
| char[] | toString () |
| Return a string representation of the plane, in the form "plane3 ((normal), distance)". | |
| float | intersectLineSegment (vec3 a, vec3 b, out vec3 point) |
| Get the intersection between a line segment and the plane. | |
| float | intersectLineSegment (vec3 a, vec3 b) |
| Get the intersection point between a line segment and the plane. | |
| int | classify (sphere3 sphere) |
| Get the relation between the plane and a sphere. | |
| int | classify (vec3 vector) |
| Get the relation between the plane and a vector. | |
| int | classify (box3 box) |
| Get the relation between the plane and an axis-aligned bounding box. | |
Public Attributes | |
| vec3 | normal |
| Plane normal. | |
| float | offset |
| Distance of the plane from origin along the normal. | |
| int | i1 |
| For collision with rays. | |
| int | i2 |
| For collision with rays. | |
Related Functions | |
| (Note that these are not member functions.) | |
| plane3 | aplane3 (vec3 a, vec3 b, vec3 c) |
| Create a plane from a triangle. | |
| plane3 | aplane3 (vec3 normal, float offset) |
| Create a plane from specific parameters; normal does not have to be a unit vector. | |
|
|
Get the relation between the plane and an axis-aligned bounding box.
|
|
|
Get the relation between the plane and a vector.
|
|
|
Get the relation between the plane and a sphere.
|
|
||||||||||||
|
Get the intersection point between a line segment and the plane.
|
|
||||||||||||||||
|
Get the intersection between a line segment and the plane.
|
1.3.2