Hermes
hermes::Point3< T > Class Template Reference

Geometric 3-dimensional vector (x, y, z) More...

+ Inheritance diagram for hermes::Point3< T >:

Public Member Functions

HERMES_DEVICE_CALLABLE Point3 ()
 Default constructor.
 
HERMES_DEVICE_CALLABLE Point3 (T v)
 Constructs from single component value. More...
 
HERMES_DEVICE_CALLABLE Point3 (T _x, T _y, T _z)
 Constructs from component values. More...
 
HERMES_DEVICE_CALLABLE Point3 (const Point2< T > &p, T _z=0)
 Constructs from point2. More...
 
HERMES_DEVICE_CALLABLE Point3 (const real_t *v)
 Constructs from component array. More...
 
template<typename S , typename C = T>
HERMES_DEVICE_CALLABLE Point3 (const Point3< S > &c, const Vector3< S > &r, typename std::enable_if_t< std::is_same_v< C, Interval< f32 >>||std::is_same_v< C, Interval< f64 >>> *=nullptr)
 Constructs from interval center and radius. More...
 
HERMES_DEVICE_CALLABLE Point3 (const Vector3< T > &v)
 Constructs from vector. More...
 
template<typename S , typename C = T>
HERMES_DEVICE_CALLABLE Point3 (const Point3< Interval< S >> &vi, typename std::enable_if_t< !std::is_same_v< C, Interval< f32 >> &&!std::is_same_v< C, Interval< f64 >>> *=nullptr)
 Constructs from interval point3. More...
 
template<typename U >
HERMES_DEVICE_CALLABLE Point3 (const Index3< U > &index)
 Constructs from index3. More...
 
HERMES_DEVICE_CALLABLE operator Vector3< T > () const
 Converts to vector3. More...
 
HERMES_DEVICE_CALLABLEoperator[] (int i) const
 Get i-th component. More...
 
HERMES_DEVICE_CALLABLE T & operator[] (int i)
 Get i-th component reference. More...
 
HERMES_DEVICE_CALLABLE Vector3< T > operator- (const Point3< T > &b) const
 
HERMES_DEVICE_CALLABLE bool operator== (const Point3< T > &b) const
 
HERMES_DEVICE_CALLABLE Point2< T > xy () const
 Gets 2-dimensional swizzle (x, y) More...
 
HERMES_DEVICE_CALLABLE Point2< T > yz () const
 Gets 2-dimensional swizzle (y, z) More...
 
HERMES_DEVICE_CALLABLE Point2< T > xz () const
 Gets 2-dimensional swizzle (x, z) More...
 

Public Attributes

x = T(0.0)
 0-th component
 
y = T(0.0)
 1-th component
 
z = T(0.0)
 2-th component
 

Additional Inherited Members

- Static Public Member Functions inherited from hermes::MathElement< T, 3u >
static constexpr u64 componentCount ()
 Gets the number of dimensional components. More...
 
static constexpr u64 numericTypeSizeInBytes ()
 Gets the size in bytes of underlying data type. More...
 
static MemoryDumper::RegionLayout memoryDumpLayout ()
 Gets memory layout. More...
 
- Static Public Attributes inherited from hermes::MathElement< T, 3u >
static T numeric_data
 Underlying data type.
 

Detailed Description

template<typename T>
class hermes::Point3< T >

Geometric 3-dimensional vector (x, y, z)

Template Parameters
T

Constructor & Destructor Documentation

◆ Point3() [1/8]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( v)
inlineexplicit

Constructs from single component value.

Parameters
v

◆ Point3() [2/8]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( _x,
_y,
_z 
)
inline

Constructs from component values.

Parameters
_x
_y
_z

◆ Point3() [3/8]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const Point2< T > &  p,
_z = 0 
)
inlineexplicit

Constructs from point2.

Parameters
p

◆ Point3() [4/8]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const real_t v)
inlineexplicit

Constructs from component array.

Parameters
v

◆ Point3() [5/8]

template<typename T >
template<typename S , typename C = T>
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const Point3< S > &  c,
const Vector3< S > &  r,
typename std::enable_if_t< std::is_same_v< C, Interval< f32 >>||std::is_same_v< C, Interval< f64 >>> *  = nullptr 
)
inlineexplicit

Constructs from interval center and radius.

Template Parameters
S
C
Parameters
c
r

◆ Point3() [6/8]

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const Vector3< T > &  v)
inlineexplicit

Constructs from vector.

Parameters
v

◆ Point3() [7/8]

template<typename T >
template<typename S , typename C = T>
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const Point3< Interval< S >> &  vi,
typename std::enable_if_t< !std::is_same_v< C, Interval< f32 >> &&!std::is_same_v< C, Interval< f64 >>> *  = nullptr 
)
inlineexplicit

Constructs from interval point3.

Template Parameters
S
C
Parameters
vi

◆ Point3() [8/8]

template<typename T >
template<typename U >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::Point3 ( const Index3< U > &  index)
inline

Constructs from index3.

Template Parameters
U
Parameters
index

Member Function Documentation

◆ operator Vector3< T >()

template<typename T >
HERMES_DEVICE_CALLABLE hermes::Point3< T >::operator Vector3< T > ( ) const
inlineexplicit

Converts to vector3.

Returns

◆ operator[]() [1/2]

template<typename T >
HERMES_DEVICE_CALLABLE T& hermes::Point3< T >::operator[] ( int  i)
inline

Get i-th component reference.

Warning
i is not checked
Parameters
icomponent index in [0, 2]
Returns

◆ operator[]() [2/2]

template<typename T >
HERMES_DEVICE_CALLABLE T hermes::Point3< T >::operator[] ( int  i) const
inline

Get i-th component.

Warning
i is not checked
Parameters
icomponent index in [0, 2]
Returns

◆ xy()

template<typename T >
HERMES_DEVICE_CALLABLE Point2<T> hermes::Point3< T >::xy ( ) const
inline

Gets 2-dimensional swizzle (x, y)

Returns

◆ xz()

template<typename T >
HERMES_DEVICE_CALLABLE Point2<T> hermes::Point3< T >::xz ( ) const
inline

Gets 2-dimensional swizzle (x, z)

Returns

◆ yz()

template<typename T >
HERMES_DEVICE_CALLABLE Point2<T> hermes::Point3< T >::yz ( ) const
inline

Gets 2-dimensional swizzle (y, z)

Returns

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