Atoms Crowd
7.0.0
|
#include <ImathPlane.h>
Public Member Functions | |
Constructors | |
ATOMSMATH_HOSTDEVICE | Plane3 () noexcept |
Uninitialized by default. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &normal, T distance) noexcept |
Initialize with a normal and distance. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &point, const Vec3< T > &normal) noexcept |
Initialize with a point and a normal. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &point1, const Vec3< T > &point2, const Vec3< T > &point3) noexcept |
Initialize with three points. | |
Manipulation | |
ATOMSMATH_HOSTDEVICE void | set (const Vec3< T > &normal, T distance) noexcept |
Set via a given normal and distance. | |
ATOMSMATH_HOSTDEVICE void | set (const Vec3< T > &point, const Vec3< T > &normal) noexcept |
Set via a given point and normal. | |
ATOMSMATH_HOSTDEVICE void | set (const Vec3< T > &point1, const Vec3< T > &point2, const Vec3< T > &point3) noexcept |
Set via three points. | |
Utility Methods | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersect (const Line3< T > &line, Vec3< T > &intersection) const noexcept |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 bool | intersectT (const Line3< T > &line, T ¶meter) const noexcept |
constexpr ATOMSMATH_HOSTDEVICE T | distanceTo (const Vec3< T > &point) const noexcept |
Return the distance from a point to the plane. | |
constexpr ATOMSMATH_HOSTDEVICE Vec3< T > | reflectPoint (const Vec3< T > &point) const noexcept |
Reflect the given point around the plane. | |
constexpr ATOMSMATH_HOSTDEVICE Vec3< T > | reflectVector (const Vec3< T > &vec) const noexcept |
Reflect the direction vector around the plane. | |
Public Attributes | |
Direct access to member fields | |
Vec3< T > | normal |
The normal to the plane. | |
T | distance |
The distance from the origin to the plane. | |
The Plane3
class represents a half space in 3D, so the normal may point either towards or away from origin. The plane P
can be represented by Plane3 as either p
or -p
corresponding to the two half-spaces on either side of the plane. Any function which computes a distance will return either negative or positive values for the distance indicating which half-space the point is in. Note that reflection, and intersection functions will operate as expected.
|
inlinenoexcept |
Determine if a line intersects the plane.
line | The line | |
[out] | intersection | The point of intersection |
|
inlinenoexcept |
Determine if a line intersects the plane.
line | The line | |
[out] | parameter | The parametric value of the point of intersection |