NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
mVec2_c Class Reference

#include <dol/mLib/m_vec.hpp>

Description

A two-dimensional floating point vector.

Todo:
Add EGG::vector2f operators.

Definition at line 9 of file m_vec.hpp.

Public Member Functions

 mVec2_c ()
 Constructs an empty vector.
 
 mVec2_c (const f32 *p)
 Constructs a vector from a float array.
 
 mVec2_c (f32 fx, f32 fy)
 Constructs a vector from two floating point values.
 
 mVec2_c (const Vec2 &v)
 Constructs a new vector from an existing vector from the MTX library.
 
 mVec2_c (const nw4r::math::VEC2 &v)
 Constructs a new vector from an existing vector from the nw4r::math library.
 
 operator f32 * ()
 Float cast operator.
 
 operator const f32 * () const
 Const float cast operator.
 
 operator Vec2 * ()
 Vec2 cast operator.
 
 operator const Vec2 * () const
 Const Vec2 cast operator.
 
 operator nw4r::math::VEC2 * ()
 nw4r::math::VEC2 cast operator.
 
 operator const nw4r::math::VEC2 * () const
 Const nw4r::math::VEC2 cast operator.
 
mVec2_coperator+= (const mVec2_c &v)
 Augmented addition operator.
 
mVec2_coperator-= (const mVec2_c &v)
 Augmented subtraction operator.
 
mVec2_coperator*= (f32 f)
 Augmented scalar product operator.
 
mVec2_coperator/= (f32 f)
 Augmented scalar division operator.
 
mVec2_c operator+ () const
 Positive operator.
 
mVec2_c operator- () const
 Negative operator.
 
mVec2_c operator+ (const mVec2_c &v) const
 Addition operator.
 
mVec2_c operator- (const mVec2_c &v) const
 Subtraction operator.
 
mVec2_c operator* (f32 f) const
 Scalar product operator.
 
mVec2_c operator/ (f32 f) const
 Scalar division operator.
 
bool operator== (const mVec2_c &v) const
 Equality operator.
 
bool operator!= (const mVec2_c &v) const
 Inequality operator.
 

Public Attributes

float x
 The coordinates on the X axis.
 
float y
 The coordinates on the Y axis.
 

Constructor & Destructor Documentation

◆ mVec2_c() [1/5]

mVec2_c::mVec2_c ( )
inline

Constructs an empty vector.

Definition at line 13 of file m_vec.hpp.

◆ mVec2_c() [2/5]

mVec2_c::mVec2_c ( const f32 *  p)
inline

Constructs a vector from a float array.

Definition at line 16 of file m_vec.hpp.

◆ mVec2_c() [3/5]

mVec2_c::mVec2_c ( f32  fx,
f32  fy 
)
inline

Constructs a vector from two floating point values.

Definition at line 19 of file m_vec.hpp.

◆ mVec2_c() [4/5]

mVec2_c::mVec2_c ( const Vec2 v)
inline

Constructs a new vector from an existing vector from the MTX library.

Definition at line 22 of file m_vec.hpp.

◆ mVec2_c() [5/5]

mVec2_c::mVec2_c ( const nw4r::math::VEC2 v)
inline

Constructs a new vector from an existing vector from the nw4r::math library.

Definition at line 25 of file m_vec.hpp.

Member Function Documentation

◆ operator f32 *()

mVec2_c::operator f32 * ( )
inline

Float cast operator.

Definition at line 28 of file m_vec.hpp.

◆ operator const f32 *()

mVec2_c::operator const f32 * ( ) const
inline

Const float cast operator.

Definition at line 31 of file m_vec.hpp.

◆ operator Vec2 *()

mVec2_c::operator Vec2 * ( )
inline

Vec2 cast operator.

Definition at line 34 of file m_vec.hpp.

◆ operator const Vec2 *()

mVec2_c::operator const Vec2 * ( ) const
inline

Const Vec2 cast operator.

Definition at line 37 of file m_vec.hpp.

◆ operator nw4r::math::VEC2 *()

mVec2_c::operator nw4r::math::VEC2 * ( )
inline

nw4r::math::VEC2 cast operator.

Definition at line 40 of file m_vec.hpp.

◆ operator const nw4r::math::VEC2 *()

mVec2_c::operator const nw4r::math::VEC2 * ( ) const
inline

Const nw4r::math::VEC2 cast operator.

Definition at line 43 of file m_vec.hpp.

◆ operator+=()

mVec2_c & mVec2_c::operator+= ( const mVec2_c v)
inline

Augmented addition operator.

Definition at line 46 of file m_vec.hpp.

◆ operator-=()

mVec2_c & mVec2_c::operator-= ( const mVec2_c v)
inline

Augmented subtraction operator.

Definition at line 49 of file m_vec.hpp.

◆ operator*=()

mVec2_c & mVec2_c::operator*= ( f32  f)
inline

Augmented scalar product operator.

Definition at line 52 of file m_vec.hpp.

◆ operator/=()

mVec2_c & mVec2_c::operator/= ( f32  f)
inline

Augmented scalar division operator.

Definition at line 55 of file m_vec.hpp.

◆ operator+() [1/2]

mVec2_c mVec2_c::operator+ ( ) const
inline

Positive operator.

Definition at line 58 of file m_vec.hpp.

◆ operator-() [1/2]

mVec2_c mVec2_c::operator- ( ) const
inline

Negative operator.

Definition at line 61 of file m_vec.hpp.

◆ operator+() [2/2]

mVec2_c mVec2_c::operator+ ( const mVec2_c v) const
inline

Addition operator.

Definition at line 64 of file m_vec.hpp.

◆ operator-() [2/2]

mVec2_c mVec2_c::operator- ( const mVec2_c v) const
inline

Subtraction operator.

Definition at line 67 of file m_vec.hpp.

◆ operator*()

mVec2_c mVec2_c::operator* ( f32  f) const
inline

Scalar product operator.

Definition at line 70 of file m_vec.hpp.

◆ operator/()

mVec2_c mVec2_c::operator/ ( f32  f) const
inline

Scalar division operator.

Definition at line 73 of file m_vec.hpp.

◆ operator==()

bool mVec2_c::operator== ( const mVec2_c v) const
inline

Equality operator.

Definition at line 76 of file m_vec.hpp.

◆ operator!=()

bool mVec2_c::operator!= ( const mVec2_c v) const
inline

Inequality operator.

Definition at line 79 of file m_vec.hpp.

Member Data Documentation

◆ x

float mVec2_c::x

The coordinates on the X axis.

Definition at line 81 of file m_vec.hpp.

◆ y

float mVec2_c::y

The coordinates on the Y axis.

Definition at line 82 of file m_vec.hpp.