SpinParser  1.0
Public Member Functions | Public Attributes | List of all members
geometry::Vec4< T > Struct Template Reference

Four-dimensional vector. More...

#include <Geometry.hpp>

Public Member Functions

 Vec4 ()
 Construct a new Vec4 object with uninitialized components.
 
 Vec4 (const T &xyz)
 Construct a new Vec4 object and initialize the x, y, and z components. The w component is set to unity. More...
 
 Vec4 (const T &x, const T &y, const T &z)
 Construct a new Vec4 object and initialize the x, y, and z components. The w component is set to unity.
More...
 
 Vec4 (const T &x, const T &y, const T &z, const T &w)
 Construct a new Vec4 object and initialize the components. More...
 
 operator Vec3< T > () const
 Conversion to Vec3 object by dropping the w component. More...
 

Public Attributes

x
 x Component.
 
y
 y Component.
 
z
 z Component.
 
w
 w Component.
 

Detailed Description

template<typename T>
struct geometry::Vec4< T >

Four-dimensional vector.

Template Parameters
TUnderlying fundamental data type.

Constructor & Destructor Documentation

◆ Vec4() [1/3]

template<typename T >
geometry::Vec4< T >::Vec4 ( const T &  xyz)
inline

Construct a new Vec4 object and initialize the x, y, and z components. The w component is set to unity.

Parameters
xyzValue to initialize the x, y, and z component.

◆ Vec4() [2/3]

template<typename T >
geometry::Vec4< T >::Vec4 ( const T &  x,
const T &  y,
const T &  z 
)
inline

Construct a new Vec4 object and initialize the x, y, and z components. The w component is set to unity.

Parameters
xValue to initialize the x component.
yValue to initialize the y component.
zValue to initialize the z component.

◆ Vec4() [3/3]

template<typename T >
geometry::Vec4< T >::Vec4 ( const T &  x,
const T &  y,
const T &  z,
const T &  w 
)
inline

Construct a new Vec4 object and initialize the components.

Parameters
xValue to initialize the x component.
yValue to initialize the y component.
zValue to initialize the z component.
wValue to initialize the w component.

Member Function Documentation

◆ operator Vec3< T >()

template<typename T >
geometry::Vec4< T >::operator Vec3< T > ( ) const
inline

Conversion to Vec3 object by dropping the w component.

Returns
Vec3<T> Reduced Vec3 object with w component dropped.

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