Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::util::Vec3< T > Class Template Reference

Handles all mathematical ops involving 3D Vectors. More...

#include <vec3.h>

Public Member Functions

 Vec3 () noexcept=default
 Vec3 (T x, T y, T z) noexcept
 ~Vec3 ()=default
T * ptr () noexcept
const T * ptr () const noexcept
void set (T x, T y, T z) noexcept
void setX (T x) noexcept
void setY (T y) noexcept
void setZ (T z) noexcept
void set (const Vec3 &rhs) noexcept
T getX () const noexcept
T getY () const noexcept
T getZ () const noexcept
bool operator== (const Vec3 &v) const noexcept
bool operator!= (const Vec3 &v) const noexcept
bool operator< (const Vec3 &v) const noexcept
T operator* (const Vec3 &rhs) const noexcept
 Point multiplication.
Vec3 operator^ (const Vec3 &rhs) const noexcept
 Cross product.
Vec3 operator* (T rhs) const noexcept
 Scalar multiplication.
Vec3 & operator*= (T rhs) noexcept
 Unary scalar multiplication.
Vec3 operator/ (T rhs) const noexcept
 Division by scalar.
Vec3 & operator/= (T rhs) noexcept
 Unary division by scalar.
Vec3 operator+ (const Vec3 &rhs) const noexcept
 Binary vector addition.
Vec3 & operator+= (const Vec3 &rhs) noexcept
 Binary vector addition.
Vec3 operator- (const Vec3 &rhs) const noexcept
 Binary vector subtraction.
Vec3 & operator-= (const Vec3 &rhs) noexcept
 Binary vector subtraction.
Vec3 operator- () const noexcept
 Negates the internal elements of the vector.
T length () const noexcept
T length2 () const noexcept
T normalize () noexcept
 Normalizes the vector so that its length is unity. Returns the previous length of the vector.

Detailed Description

template<typename T>
class sen::util::Vec3< T >

Handles all mathematical ops involving 3D Vectors.

Constructor & Destructor Documentation

◆ Vec3() [1/2]

template<typename T>
sen::util::Vec3< T >::Vec3 ( )
defaultnoexcept

◆ Vec3() [2/2]

template<typename T>
sen::util::Vec3< T >::Vec3 ( T x,
T y,
T z )
inlinenoexcept

◆ ~Vec3()

template<typename T>
sen::util::Vec3< T >::~Vec3 ( )
default

Member Function Documentation

◆ ptr() [1/2]

template<typename T>
T * sen::util::Vec3< T >::ptr ( )
inlinenoexcept

◆ ptr() [2/2]

template<typename T>
const T * sen::util::Vec3< T >::ptr ( ) const
inlinenodiscardnoexcept

◆ set() [1/2]

template<typename T>
void sen::util::Vec3< T >::set ( T x,
T y,
T z )
inlinenoexcept

◆ setX()

template<typename T>
void sen::util::Vec3< T >::setX ( T x)
inlinenoexcept

◆ setY()

template<typename T>
void sen::util::Vec3< T >::setY ( T y)
inlinenoexcept

◆ setZ()

template<typename T>
void sen::util::Vec3< T >::setZ ( T z)
inlinenoexcept

◆ set() [2/2]

template<typename T>
void sen::util::Vec3< T >::set ( const Vec3< T > & rhs)
inlinenoexcept

◆ getX()

template<typename T>
T sen::util::Vec3< T >::getX ( ) const
inlinenodiscardnoexcept

◆ getY()

template<typename T>
T sen::util::Vec3< T >::getY ( ) const
inlinenodiscardnoexcept

◆ getZ()

template<typename T>
T sen::util::Vec3< T >::getZ ( ) const
inlinenodiscardnoexcept

◆ operator==()

template<typename T>
bool sen::util::Vec3< T >::operator== ( const Vec3< T > & v) const
inlinenoexcept

◆ operator!=()

template<typename T>
bool sen::util::Vec3< T >::operator!= ( const Vec3< T > & v) const
inlinenoexcept

◆ operator<()

template<typename T>
bool sen::util::Vec3< T >::operator< ( const Vec3< T > & v) const
inlinenoexcept

◆ operator*() [1/2]

template<typename T>
T sen::util::Vec3< T >::operator* ( const Vec3< T > & rhs) const
inlinenoexcept

Point multiplication.

◆ operator^()

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator^ ( const Vec3< T > & rhs) const
inlinenoexcept

Cross product.

◆ operator*() [2/2]

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator* ( T rhs) const
inlinenoexcept

Scalar multiplication.

◆ operator*=()

template<typename T>
Vec3< T > & sen::util::Vec3< T >::operator*= ( T rhs)
inlinenoexcept

Unary scalar multiplication.

◆ operator/()

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator/ ( T rhs) const
inlinenoexcept

Division by scalar.

◆ operator/=()

template<typename T>
Vec3< T > & sen::util::Vec3< T >::operator/= ( T rhs)
inlinenoexcept

Unary division by scalar.

◆ operator+()

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator+ ( const Vec3< T > & rhs) const
inlinenoexcept

Binary vector addition.

◆ operator+=()

template<typename T>
Vec3< T > & sen::util::Vec3< T >::operator+= ( const Vec3< T > & rhs)
inlinenoexcept

Binary vector addition.

◆ operator-() [1/2]

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator- ( const Vec3< T > & rhs) const
inlinenoexcept

Binary vector subtraction.

◆ operator-=()

template<typename T>
Vec3< T > & sen::util::Vec3< T >::operator-= ( const Vec3< T > & rhs)
inlinenoexcept

Binary vector subtraction.

◆ operator-() [2/2]

template<typename T>
Vec3< T > sen::util::Vec3< T >::operator- ( ) const
inlinenoexcept

Negates the internal elements of the vector.

◆ length()

template<typename T>
T sen::util::Vec3< T >::length ( ) const
inlinenodiscardnoexcept

◆ length2()

template<typename T>
T sen::util::Vec3< T >::length2 ( ) const
inlinenodiscardnoexcept

◆ normalize()

template<typename T>
T sen::util::Vec3< T >::normalize ( )
inlinenoexcept

Normalizes the vector so that its length is unity. Returns the previous length of the vector.


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