Atoms Crowd  7.0.0
Line2< T > Class Template Reference

#include <ImathLine.h>

Public Member Functions

constexpr ATOMSMATH_HOSTDEVICE Vec2< T > operator() (T parameter) const noexcept
 
constexpr ATOMSMATH_HOSTDEVICE Vec2< T > closestPointTo (const Vec2< T > &point) const noexcept
 Return the point on the line closest to the given point.
 
Constructors
constexpr ATOMSMATH_HOSTDEVICE Line2 () noexcept
 Uninitialized by default.
 
ATOMSMATH_HOSTDEVICE ATOMSMATH_CONSTEXPR14 Line2 (const Vec2< T > &point1, const Vec2< T > &point2) noexcept
 
Manipulation
ATOMSMATH_HOSTDEVICE void set (const Vec2< T > &point1, const Vec2< T > &point2) noexcept
 

Public Attributes

Direct access to member fields
Vec2< T > pos
 A point on the line.
 
Vec2< T > dir
 The direction of the line.
 

Detailed Description

template<class T>
class Line2< T >

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

Constructor & Destructor Documentation

◆ Line2()

template<class T >
ATOMSMATH_CONSTEXPR14 Line2< T >::Line2 ( const Vec2< T > &  point1,
const Vec2< T > &  point2 
)
inlinenoexcept

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

Member Function Documentation

◆ operator()()

template<class T >
constexpr Vec2< T > Line2< 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 Line2< T >::set ( const Vec2< T > &  point1,
const Vec2< 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: