sead
Loading...
Searching...
No Matches
sead::Vector4< T > Class Template Reference

#include <seadVector.h>

Inherits sead::Policies< T >::Vec4Base.

Public Types

typedef T ValueType

Public Member Functions

constexpr Vector4 ()
constexpr Vector4 (T x_, T y_, T z_, T w_)
constexpr Vector4 (const Vec2 &vec2, T z_, T w_)
constexpr Vector4 (const Vec3 &vec3, T w_)
constexpr Vector4 (const Vector4 &other)=default
Self operator* (T t) const
Self operator/ (T t) const
Self operator+ (const Self &v) const
Self operator- (const Self &v) const
Self operator- () const
Selfoperator*= (T t)
Selfoperator/= (T t)
Selfoperator+= (const Self &v)
Selfoperator-= (const Self &v)
Selfoperator= (const Self &v)
bool operator== (const Self &v) const
bool operator!= (const Self &v) const
dot (const Self &t) const
squaredLength () const
length () const
squaredDistance (const Self &v) const
distance (const Self &v) const
void multScalar (T t)
void divScalar (T t)
normalize ()
setNormalize (const Self &v)
void set (const Self &v)
void set (T x_, T y_, T z_, T w_)
void set (const Vec2 &vec2, T z_, T w_)
void set (const Vec3 &vec3, T w_)
void setLerp (const Self &a, const Self &b, f32 ratio)
const Vector4< f32 > zero (0.0f, 0.0f, 0.0f, 0.0f)
const Vector4< f32 > ex (1.0f, 0.0f, 0.0f, 0.0f)
const Vector4< f32 > ey (0.0f, 1.0f, 0.0f, 0.0f)
const Vector4< f32 > ez (0.0f, 0.0f, 1.0f, 0.0f)
const Vector4< f32 > ew (0.0f, 0.0f, 0.0f, 1.0f)
const Vector4< f32 > ones (1.0f, 1.0f, 1.0f, 1.0f)

Static Public Attributes

static const Vector4 zero
static const Vector4 ex
static const Vector4 ey
static const Vector4 ez
static const Vector4 ew
static const Vector4 ones

Private Types

typedef Vector4< T > Self
typedef Vector2< T > Vec2
typedef Vector3< T > Vec3

Additional Inherited Members

Public Attributes inherited from sead::Policies< T >::Vec4Base
x
y
z
w

Member Typedef Documentation

◆ Self

template<typename T>
typedef Vector4<T> sead::Vector4< T >::Self
private

◆ Vec2

template<typename T>
typedef Vector2<T> sead::Vector4< T >::Vec2
private

◆ Vec3

template<typename T>
typedef Vector3<T> sead::Vector4< T >::Vec3
private

◆ ValueType

template<typename T>
typedef T sead::Vector4< T >::ValueType

Constructor & Destructor Documentation

◆ Vector4() [1/5]

template<typename T>
sead::Vector4< T >::Vector4 ( )
inlineconstexpr

◆ Vector4() [2/5]

template<typename T>
sead::Vector4< T >::Vector4 ( T x_,
T y_,
T z_,
T w_ )
inlineconstexpr

◆ Vector4() [3/5]

template<typename T>
sead::Vector4< T >::Vector4 ( const Vec2 & vec2,
T z_,
T w_ )
inlineconstexpr

◆ Vector4() [4/5]

template<typename T>
sead::Vector4< T >::Vector4 ( const Vec3 & vec3,
T w_ )
inlineconstexpr

◆ Vector4() [5/5]

template<typename T>
sead::Vector4< T >::Vector4 ( const Vector4< T > & other)
constexprdefault

Member Function Documentation

◆ operator*()

template<typename T>
Vector4< T > sead::Vector4< T >::operator* ( T t) const
inline

◆ operator/()

template<typename T>
Vector4< T > sead::Vector4< T >::operator/ ( T t) const
inline

◆ operator+()

template<typename T>
Vector4< T > sead::Vector4< T >::operator+ ( const Self & v) const
inline

◆ operator-() [1/2]

template<typename T>
Vector4< T > sead::Vector4< T >::operator- ( const Self & v) const
inline

◆ operator-() [2/2]

template<typename T>
Vector4< T > sead::Vector4< T >::operator- ( ) const
inline

◆ operator*=()

template<typename T>
Vector4< T > & sead::Vector4< T >::operator*= ( T t)
inline

◆ operator/=()

template<typename T>
Vector4< T > & sead::Vector4< T >::operator/= ( T t)
inline

◆ operator+=()

template<typename T>
Vector4< T > & sead::Vector4< T >::operator+= ( const Self & v)
inline

◆ operator-=()

template<typename T>
Vector4< T > & sead::Vector4< T >::operator-= ( const Self & v)
inline

◆ operator=()

template<typename T>
Vector4< T > & sead::Vector4< T >::operator= ( const Self & v)
inline

◆ operator==()

template<typename T>
bool sead::Vector4< T >::operator== ( const Self & v) const
inline

◆ operator!=()

template<typename T>
bool sead::Vector4< T >::operator!= ( const Self & v) const
inline

◆ dot()

template<typename T>
T sead::Vector4< T >::dot ( const Self & t) const
inline

◆ squaredLength()

template<typename T>
T sead::Vector4< T >::squaredLength ( ) const
inline

◆ length()

template<typename T>
T sead::Vector4< T >::length ( ) const
inline

◆ squaredDistance()

template<typename T>
T sead::Vector4< T >::squaredDistance ( const Self & v) const
inline

◆ distance()

template<typename T>
T sead::Vector4< T >::distance ( const Self & v) const
inline

◆ multScalar()

template<typename T>
void sead::Vector4< T >::multScalar ( T t)
inline

◆ divScalar()

template<typename T>
void sead::Vector4< T >::divScalar ( T t)

◆ normalize()

template<typename T>
T sead::Vector4< T >::normalize ( )
inline

◆ setNormalize()

template<typename T>
T sead::Vector4< T >::setNormalize ( const Self & v)
inline

◆ set() [1/4]

template<typename T>
void sead::Vector4< T >::set ( const Self & v)
inline

◆ set() [2/4]

template<typename T>
void sead::Vector4< T >::set ( T x_,
T y_,
T z_,
T w_ )
inline

◆ set() [3/4]

template<typename T>
void sead::Vector4< T >::set ( const Vec2 & vec2,
T z_,
T w_ )
inline

◆ set() [4/4]

template<typename T>
void sead::Vector4< T >::set ( const Vec3 & vec3,
T w_ )
inline

◆ setLerp()

template<typename T>
void sead::Vector4< T >::setLerp ( const Self & a,
const Self & b,
f32 ratio )
inline

◆ zero()

const Vector4< f32 > sead::Vector4< f32 >::zero ( 0. 0f,
0. 0f,
0. 0f,
0. 0f )

◆ ex()

const Vector4< f32 > sead::Vector4< f32 >::ex ( 1. 0f,
0. 0f,
0. 0f,
0. 0f )

◆ ey()

const Vector4< f32 > sead::Vector4< f32 >::ey ( 0. 0f,
1. 0f,
0. 0f,
0. 0f )

◆ ez()

const Vector4< f32 > sead::Vector4< f32 >::ez ( 0. 0f,
0. 0f,
1. 0f,
0. 0f )

◆ ew()

const Vector4< f32 > sead::Vector4< f32 >::ew ( 0. 0f,
0. 0f,
0. 0f,
1. 0f )

◆ ones()

const Vector4< f32 > sead::Vector4< f32 >::ones ( 1. 0f,
1. 0f,
1. 0f,
1. 0f )

Member Data Documentation

◆ zero

template<typename T>
const Vector4 sead::Vector4< T >::zero
static

◆ ex

template<typename T>
const Vector4 sead::Vector4< T >::ex
static

◆ ey

template<typename T>
const Vector4 sead::Vector4< T >::ey
static

◆ ez

template<typename T>
const Vector4 sead::Vector4< T >::ez
static

◆ ew

template<typename T>
const Vector4 sead::Vector4< T >::ew
static

◆ ones

template<typename T>
const Vector4 sead::Vector4< T >::ones
static