Atoms Crowd  7.0.0
Line3< T > Class Template Reference

#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.
 

Detailed Description

template<class T>
class Line3< T >

The Line3 class represents a 3D line, defined by a point and a direction vector.

Constructor & Destructor Documentation

◆ Line3()

template<class T >
ATOMSMATH_CONSTEXPR14 Line3< T >::Line3 ( const Vec3< T > &  point1,
const Vec3< T > &  point2 
)
inlinenoexcept

Initialize with two points. The direction is the difference between the points.

Member Function Documentation

◆ operator()()

template<class T >
constexpr Vec3< T > Line3< T >::operator() ( parameter) const
inlineconstexprnoexcept

Return the point on the line at the given parameter value, e.g. L(t)

◆ set()

template<class T >
void Line3< T >::set ( const Vec3< T > &  point1,
const Vec3< T > &  point2 
)
inlinenoexcept

Set the line defined by two points. The direction is the difference between the points.


The documentation for this class was generated from the following file: