Hermes
hermes::Normal3< T > Class Template Reference

Geometric 3-dimensional normal (nx, ny, nz) More...

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

Public Member Functions

HERMES_DEVICE_CALLABLE Normal3 ()
 Default constructor.
 
HERMES_DEVICE_CALLABLE Normal3 (T _x, T _y, T _z)
 Constructs from component values. More...
 
HERMES_DEVICE_CALLABLE Normal3 (const Vector3< T > &v)
 Constructs from vector. More...
 
HERMES_DEVICE_CALLABLE operator Vector3< T > () const
 Casts to vector. More...
 
HERMES_DEVICE_CALLABLE Normal3 operator- () const
 
HERMES_DEVICE_CALLABLE Normal3operator+= (const Vector3< T > &v)
 
HERMES_DEVICE_CALLABLE Normal3operator*= (T f)
 
HERMES_DEVICE_CALLABLE Normal3operator/= (T f)
 
HERMES_DEVICE_CALLABLE bool operator!= (const Normal3 &n) const
 
HERMES_DEVICE_CALLABLE Vector3< T > reflect (const Vector3< T > &v)
 reflects v from this More...
 
HERMES_DEVICE_CALLABLE Vector3< T > project (const Vector3< T > &v)
 projects v on the surface with this normal More...
 
HERMES_DEVICE_CALLABLE void tangential (Vector3< T > &a, Vector3< T > &b)
 compute the two orthogonal-tangential vectors from this More...
 

Public Attributes

x {0}
 0-th normal component
 
y {0}
 1-th normal component
 
z {0}
 2-th normal component
 

Detailed Description

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

Geometric 3-dimensional normal (nx, ny, nz)

Template Parameters
T

Constructor & Destructor Documentation

◆ Normal3() [1/2]

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

Constructs from component values.

Parameters
_x
_y
_z

◆ Normal3() [2/2]

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

Constructs from vector.

Parameters
v

Member Function Documentation

◆ operator Vector3< T >()

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

Casts to vector.

Returns

◆ project()

template<typename T >
HERMES_DEVICE_CALLABLE Vector3<T> hermes::Normal3< T >::project ( const Vector3< T > &  v)
inline

projects v on the surface with this normal

Parameters
vvector
Returns
projected v

◆ reflect()

template<typename T >
HERMES_DEVICE_CALLABLE Vector3<T> hermes::Normal3< T >::reflect ( const Vector3< T > &  v)
inline

reflects v from this

Parameters
vvector to be reflected
Returns
reflected v

◆ tangential()

template<typename T >
HERMES_DEVICE_CALLABLE void hermes::Normal3< T >::tangential ( Vector3< T > &  a,
Vector3< T > &  b 
)
inline

compute the two orthogonal-tangential vectors from this

Parameters
a[out] first tangent
b[out] second tangent

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