HDK
|
#include <ImathPlane.h>
Public Member Functions | |
Constructors | |
IMATH_HOSTDEVICE | Plane3 () IMATH_NOEXCEPT |
Uninitialized by default. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &normal, T distance) IMATH_NOEXCEPT |
Initialize with a normal and distance. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &point, const Vec3< T > &normal) IMATH_NOEXCEPT |
Initialize with a point and a normal. More... | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 | Plane3 (const Vec3< T > &point1, const Vec3< T > &point2, const Vec3< T > &point3) IMATH_NOEXCEPT |
Initialize with three points. More... | |
Manipulation | |
IMATH_HOSTDEVICE void | set (const Vec3< T > &normal, T distance) IMATH_NOEXCEPT |
Set via a given normal and distance. More... | |
IMATH_HOSTDEVICE void | set (const Vec3< T > &point, const Vec3< T > &normal) IMATH_NOEXCEPT |
Set via a given point and normal. More... | |
IMATH_HOSTDEVICE void | set (const Vec3< T > &point1, const Vec3< T > &point2, const Vec3< T > &point3) IMATH_NOEXCEPT |
Set via three points. More... | |
Utility Methods | |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersect (const Line3< T > &line, Vec3< T > &intersection) const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 bool | intersectT (const Line3< T > &line, T ¶meter) const IMATH_NOEXCEPT |
IMATH_HOSTDEVICE constexpr T | distanceTo (const Vec3< T > &point) const IMATH_NOEXCEPT |
Return the distance from a point to the plane. More... | |
IMATH_HOSTDEVICE constexpr Vec3< T > | reflectPoint (const Vec3< T > &point) const IMATH_NOEXCEPT |
Reflect the given point around the plane. More... | |
IMATH_HOSTDEVICE constexpr Vec3< T > | reflectVector (const Vec3< T > &vec) const IMATH_NOEXCEPT |
Reflect the direction vector around the plane. More... | |
Public Attributes | |
Direct access to member fields | |
Vec3< T > | normal |
The normal to the plane. More... | |
T | distance |
The distance from the origin to the plane. More... | |
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.
Definition at line 31 of file ImathPlane.h.
|
inline |
Uninitialized by default.
Definition at line 50 of file ImathPlane.h.
|
inline |
Initialize with a normal and distance.
Definition at line 124 of file ImathPlane.h.
|
inline |
Initialize with a point and a normal.
Definition at line 130 of file ImathPlane.h.
|
inline |
Initialize with three points.
Definition at line 118 of file ImathPlane.h.
|
inline |
Return the distance from a point to the plane.
Definition at line 164 of file ImathPlane.h.
|
inline |
Determine if a line intersects the plane.
line | The line | |
[out] | intersection | The point of intersection |
Definition at line 185 of file ImathPlane.h.
|
inline |
Determine if a line intersects the plane.
line | The line | |
[out] | parameter | The parametric value of the point of intersection |
Definition at line 197 of file ImathPlane.h.
|
inline |
Reflect the given point around the plane.
Definition at line 171 of file ImathPlane.h.
|
inline |
Reflect the direction vector around the plane.
Definition at line 178 of file ImathPlane.h.
|
inline |
Set via a given normal and distance.
Definition at line 155 of file ImathPlane.h.
|
inline |
Set via a given point and normal.
Definition at line 146 of file ImathPlane.h.
|
inline |
Set via three points.
Definition at line 137 of file ImathPlane.h.
The distance from the origin to the plane.
Definition at line 42 of file ImathPlane.h.
The normal to the plane.
Definition at line 39 of file ImathPlane.h.