Atoms Crowd
7.0.0
|
#include <ImathLine.h>
Public Member Functions | |
Constructors | |
constexpr ATOMSMATH_HOSTDEVICE | Line3 () noexcept |
Uninitialized by default. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 | Line3 (const Vec3< T > &point1, const Vec3< T > &point2) noexcept |
Manipulation | |
ATOMSMATH_HOSTDEVICE void | set (const Vec3< T > &point1, const Vec3< T > &point2) noexcept |
Utility Methods | |
constexpr ATOMSMATH_HOSTDEVICE Vec3< T > | operator() (T parameter) const noexcept |
constexpr ATOMSMATH_HOSTDEVICE T | distanceTo (const Vec3< T > &point) const noexcept |
Return the distance to the given point. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 T | distanceTo (const Line3< T > &line) const noexcept |
Return the distance to the given line. | |
constexpr ATOMSMATH_HOSTDEVICE Vec3< T > | closestPointTo (const Vec3< T > &point) const noexcept |
Return the point on the line closest to the given point. | |
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Vec3< T > | closestPointTo (const Line3< T > &line) const noexcept |
Return the point on the line closest to the given line. | |
Public Attributes | |
Direct access to member fields | |
Vec3< T > | pos |
A point on the line. | |
Vec3< T > | dir |
The direction of the line. | |
The Line3
class represents a 3D line, defined by a point and a direction vector.
|
inlinenoexcept |
Initialize with two points. The direction is the difference between the points.
|
inlineconstexprnoexcept |
Return the point on the line at the given parameter value, e.g. L(t)
|
inlinenoexcept |
Set the line defined by two points. The direction is the difference between the points.