LayOut C API
|
Represents a 3D plane by the parameters a, b, c, d. For any point on the plane, ax + by + cz + d = 0. The coeficients are normalized so that a*a + b*b + c*c = 1. More...
#include <geometry.h>
Data Fields | |
double | a |
The "a" factor in the plane equation. More... | |
double | b |
The "b" factor in the plane equation. More... | |
double | c |
The "c" factor in the plane equation. More... | |
double | d |
The "d" factor in the plane equation. More... | |
Related Functions | |
(Note that these are not member functions.) | |
SU_RESULT | SUPlane3DSetWithPoints (struct SUPlane3D *plane, const struct SUPoint3D *point1, const struct SUPoint3D *point2, const struct SUPoint3D *point3) |
Sets the plane using three points. More... | |
SU_RESULT | SUPlane3DSetWithPointAndNormal (struct SUPlane3D *plane, const struct SUPoint3D *point, const struct SUVector3D *normal) |
Sets the plane using a point and normal vector. More... | |
SU_RESULT | SUPlane3DSetWithCoefficients (struct SUPlane3D *plane, double a, double b, double c, double d) |
Sets the plane using equation coefficients. More... | |
SU_RESULT | SUPlane3DGetPosition (const struct SUPlane3D *plane, struct SUPoint3D *position) |
Gets the position on the plane closest to the origin. More... | |
SU_RESULT | SUPlane3DGetNormal (const struct SUPlane3D *plane, struct SUVector3D *normal) |
Gets the plane's unit normal vector. More... | |
SU_RESULT | SUPlane3DIsOn (const struct SUPlane3D *plane, const struct SUPoint3D *point, bool *is_on) |
Gets whether or not the point is on the plane. More... | |
SU_RESULT | SUPlane3DDistanceTo (const struct SUPlane3D *plane, const struct SUPoint3D *point, double *distance) |
Gets the distance from the point to the nearest point on the plane. More... | |
SU_RESULT | SUPlane3DProjectTo (const struct SUPlane3D *plane, const struct SUPoint3D *point, struct SUPoint3D *projected_point) |
Projects a point onto the plane. More... | |
SU_RESULT | SUPlane3DTransform (const struct SUTransformation *transform, struct SUPlane3D *plane) |
Transforms the provided 3D plane by applying the provided 3D transformation. More... | |
Represents a 3D plane by the parameters a, b, c, d. For any point on the plane, ax + by + cz + d = 0. The coeficients are normalized so that a*a + b*b + c*c = 1.
|
related |
Gets the distance from the point to the nearest point on the plane.
[in] | plane | The plane. |
[in] | point | The 3D point. |
[out] | distance | The distance between the plane and point. |
|
related |
Gets the plane's unit normal vector.
[in] | plane | The plane from which to get the normal. |
[out] | normal | The 3D vector struct retrieved. |
|
related |
Gets the position on the plane closest to the origin.
[in] | plane | The plane from which to get the position. |
[out] | position | The 3D point struct retrieved. |
|
related |
Gets whether or not the point is on the plane.
[in] | plane | The plane. |
[in] | point | The 3D point. |
[out] | is_on | Whether or not the point is on the plane. |
|
related |
Projects a point onto the plane.
[in] | plane | The plane. |
[in] | point | The 3D point to project onto the plane. |
[out] | projected_point | The point resulting from the projection. |
|
related |
Sets the plane using equation coefficients.
[out] | plane | The plane defined by the coefficients. |
[in] | a | The first coefficient. |
[in] | b | The second coefficient. |
[in] | c | The third coefficient. |
[in] | d | The fourth coefficient. |
|
related |
Sets the plane using a point and normal vector.
[out] | plane | The plane defined by the point and normal. |
[in] | point | The point. |
[in] | normal | The normal vector. |
|
related |
Sets the plane using three points.
[out] | plane | The plane defined by the three points. |
[in] | point1 | The first point. |
[in] | point2 | The second point. |
[in] | point3 | The third point. |
|
related |
Transforms the provided 3D plane by applying the provided 3D transformation.
[in] | transform | The transformation to be applied. |
[in,out] | plane | The plane to be transformed. |
double SUPlane3D::a |
The "a" factor in the plane equation.
double SUPlane3D::b |
The "b" factor in the plane equation.
double SUPlane3D::c |
The "c" factor in the plane equation.
double SUPlane3D::d |
The "d" factor in the plane equation.