NW4F Sys
Loading...
Searching...
No Matches
nw::math::VEC2 Struct Reference

#include <math_Vector2.h>

Inherits nw::math::VEC2_.

Public Types

typedef VEC2 self_type
typedef f32 value_type

Public Member Functions

 VEC2 ()
 VEC2 (const f32 *p)
 VEC2 (const VEC2_ &v)
 VEC2 (f32 fx, f32 fy)
 operator f32 * ()
 operator const f32 * () const
f32 * ToF32 ()
const f32 * ToF32 () const
template<typename ToPtr>
ToPtr Cast ()
template<typename ToPtr>
ToPtr Cast () const
self_typeoperator+= (const self_type &rhs)
self_typeoperator-= (const self_type &rhs)
self_typeoperator*= (f32 f)
self_typeoperator/= (f32 f)
self_type operator+ () const
self_type operator- () const
self_type operator+ (const self_type &rhs) const
self_type operator- (const self_type &rhs) const
self_type operator* (f32 f) const
self_type operator/ (f32 f) const
self_typeLerp (const VEC2 &lhs, const VEC2 &rhs, f32 t)
f32 Dot (const VEC2 &vec) const
f32 LengthSquare () const
f32 Length () const
self_typeNormalize ()
self_typeSetNormalize (const VEC2 &src)
self_typeSafeNormalize (const VEC2 &alt)
self_typeSetSafeNormalize (const VEC2 &src, const VEC2 &alt)
f32 DistanceSquare (const VEC2 &vec)
self_typeSetMaximize (const VEC2 &lhs, const VEC2 &rhs)
self_typeSetMinimize (const VEC2 &lhs, const VEC2 &rhs)
void Set (f32 fx, f32 fy)
bool operator== (const self_type &rhs) const
bool operator!= (const self_type &rhs) const
bool IsZero () const

Static Public Member Functions

static const VEC2Zero ()

Static Public Attributes

static const int DIMENSION = 2

Additional Inherited Members

Public Attributes inherited from nw::math::VEC2_
f32 x
f32 y

Member Typedef Documentation

◆ self_type

◆ value_type

Constructor & Destructor Documentation

◆ VEC2() [1/4]

nw::math::VEC2::VEC2 ( )
inline

◆ VEC2() [2/4]

nw::math::VEC2::VEC2 ( const f32 * p)
inlineexplicit

◆ VEC2() [3/4]

nw::math::VEC2::VEC2 ( const VEC2_ & v)
inlineexplicit

◆ VEC2() [4/4]

nw::math::VEC2::VEC2 ( f32 fx,
f32 fy )
inline

Member Function Documentation

◆ Zero()

const VEC2 & nw::math::VEC2::Zero ( )
inlinestatic

◆ operator f32 *()

nw::math::VEC2::operator f32 * ( )
inline

◆ operator const f32 *()

nw::math::VEC2::operator const f32 * ( ) const
inline

◆ ToF32() [1/2]

f32 * nw::math::VEC2::ToF32 ( )
inline

◆ ToF32() [2/2]

const f32 * nw::math::VEC2::ToF32 ( ) const
inline

◆ Cast() [1/2]

template<typename ToPtr>
ToPtr nw::math::VEC2::Cast ( )
inline

◆ Cast() [2/2]

template<typename ToPtr>
ToPtr nw::math::VEC2::Cast ( ) const
inline

◆ operator+=()

self_type & nw::math::VEC2::operator+= ( const self_type & rhs)
inline

◆ operator-=()

self_type & nw::math::VEC2::operator-= ( const self_type & rhs)
inline

◆ operator*=()

self_type & nw::math::VEC2::operator*= ( f32 f)
inline

◆ operator/=()

self_type & nw::math::VEC2::operator/= ( f32 f)
inline

◆ operator+() [1/2]

self_type nw::math::VEC2::operator+ ( ) const
inline

◆ operator-() [1/2]

self_type nw::math::VEC2::operator- ( ) const
inline

◆ operator+() [2/2]

self_type nw::math::VEC2::operator+ ( const self_type & rhs) const
inline

◆ operator-() [2/2]

self_type nw::math::VEC2::operator- ( const self_type & rhs) const
inline

◆ operator*()

self_type nw::math::VEC2::operator* ( f32 f) const
inline

◆ operator/()

self_type nw::math::VEC2::operator/ ( f32 f) const
inline

◆ Lerp()

self_type & nw::math::VEC2::Lerp ( const VEC2 & lhs,
const VEC2 & rhs,
f32 t )
inline

◆ Dot()

f32 nw::math::VEC2::Dot ( const VEC2 & vec) const
inline

◆ LengthSquare()

f32 nw::math::VEC2::LengthSquare ( ) const
inline

◆ Length()

f32 nw::math::VEC2::Length ( ) const
inline

◆ Normalize()

self_type & nw::math::VEC2::Normalize ( )
inline

◆ SetNormalize()

self_type & nw::math::VEC2::SetNormalize ( const VEC2 & src)
inline

◆ SafeNormalize()

self_type & nw::math::VEC2::SafeNormalize ( const VEC2 & alt)
inline

◆ SetSafeNormalize()

self_type & nw::math::VEC2::SetSafeNormalize ( const VEC2 & src,
const VEC2 & alt )
inline

◆ DistanceSquare()

f32 nw::math::VEC2::DistanceSquare ( const VEC2 & vec)
inline

◆ SetMaximize()

self_type & nw::math::VEC2::SetMaximize ( const VEC2 & lhs,
const VEC2 & rhs )
inline

◆ SetMinimize()

self_type & nw::math::VEC2::SetMinimize ( const VEC2 & lhs,
const VEC2 & rhs )
inline

◆ Set()

void nw::math::VEC2::Set ( f32 fx,
f32 fy )
inline

◆ operator==()

bool nw::math::VEC2::operator== ( const self_type & rhs) const
inline

◆ operator!=()

bool nw::math::VEC2::operator!= ( const self_type & rhs) const
inline

◆ IsZero()

bool nw::math::VEC2::IsZero ( ) const
inline

Member Data Documentation

◆ DIMENSION

const int nw::math::VEC2::DIMENSION = 2
static