HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Line3< T > Class Template Reference

#include <ImathLine.h>

Public Member Functions

Constructors
IMATH_HOSTDEVICE constexpr Line3 () IMATH_NOEXCEPT
 Uninitialized by default. More...
 
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Line3 (const Vec3< T > &point1, const Vec3< T > &point2) IMATH_NOEXCEPT
 
Manipulation
IMATH_HOSTDEVICE void set (const Vec3< T > &point1, const Vec3< T > &point2) IMATH_NOEXCEPT
 
Utility Methods
IMATH_HOSTDEVICE constexpr
Vec3< T
operator() (T parameter) const IMATH_NOEXCEPT
 
IMATH_HOSTDEVICE constexpr T distanceTo (const Vec3< T > &point) const IMATH_NOEXCEPT
 Return the distance to the given point. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 T 
distanceTo (const Line3< T > &line) const IMATH_NOEXCEPT
 Return the distance to the given line. More...
 
IMATH_HOSTDEVICE constexpr
Vec3< T
closestPointTo (const Vec3< T > &point) const IMATH_NOEXCEPT
 Return the point on the line closest to the given point. More...
 
IMATH_HOSTDEVICE
IMATH_CONSTEXPR14 Vec3< T
closestPointTo (const Line3< T > &line) const IMATH_NOEXCEPT
 Return the point on the line closest to the given line. More...
 

Public Attributes

Direct access to member fields
Vec3< Tpos
 A point on the line. More...
 
Vec3< Tdir
 The direction of the line. More...
 

Detailed Description

template<class T>
class Line3< T >

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

Definition at line 24 of file ImathLine.h.

Constructor & Destructor Documentation

template<class T>
IMATH_HOSTDEVICE constexpr Line3< T >::Line3 ( )
inline

Uninitialized by default.

Definition at line 43 of file ImathLine.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Line3< T >::Line3 ( const Vec3< T > &  point1,
const Vec3< T > &  point2 
)
inline

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

Definition at line 88 of file ImathLine.h.

Member Function Documentation

template<class T >
IMATH_HOSTDEVICE constexpr Vec3< T > Line3< T >::closestPointTo ( const Vec3< T > &  point) const
inline

Return the point on the line closest to the given point.

Definition at line 118 of file ImathLine.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 Vec3< T > Line3< T >::closestPointTo ( const Line3< T > &  line) const
inline

Return the point on the line closest to the given line.

Definition at line 133 of file ImathLine.h.

template<class T >
IMATH_HOSTDEVICE constexpr T Line3< T >::distanceTo ( const Vec3< T > &  point) const
inline

Return the distance to the given point.

Definition at line 111 of file ImathLine.h.

template<class T >
IMATH_HOSTDEVICE IMATH_CONSTEXPR14 T Line3< T >::distanceTo ( const Line3< T > &  line) const
inline

Return the distance to the given line.

Definition at line 125 of file ImathLine.h.

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

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

Definition at line 104 of file ImathLine.h.

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

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

Definition at line 95 of file ImathLine.h.

Member Data Documentation

template<class T>
Vec3<T> Line3< T >::dir

The direction of the line.

Definition at line 35 of file ImathLine.h.

template<class T>
Vec3<T> Line3< T >::pos

A point on the line.

Definition at line 32 of file ImathLine.h.


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