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

#include <game/mLib/m_vec.hpp>

Inheritance diagram for mVec2_c:
[legend]

Description

A two-dimensional floating point vector.

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 mVec2_c &v)
 Copy constructor.
 
void set (float x, float y)
 
void incX (float x)
 Increments the X coordinate.
 
void incY (float y)
 Increments the Y coordinate.
 
mVec2_coperator= (const mVec2_c &v)
 
 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 Member Functions inherited from EGG::Vector2f
 Vector2f ()
 Constructs an empty vector.
 
 Vector2f (f32 fx, f32 fy)
 Constructs a vector from two floating point values.
 
 Vector2f (const Vector2f &v)
 Constructs a new vector from an existing vector.
 
void set (float x, float y)
 
float normalise ()
 
float getLength () const
 Gets the length of the vector.
 
- Public Member Functions inherited from nw4r::math::VEC2
 VEC2 (float fx, float fy)
 
 VEC2 (const VEC2 &v)
 

Additional Inherited Members

- Public Attributes inherited from nw4r::math::_VEC2
float x
 
float y
 

Constructor & Destructor Documentation

◆ mVec2_c() [1/4]

mVec2_c::mVec2_c ( )
inline

Constructs an empty vector.

Definition at line 13 of file m_vec.hpp.

◆ ~mVec2_c()

mVec2_c::~mVec2_c ( )
inline

Definition at line 15 of file m_vec.hpp.

◆ mVec2_c() [2/4]

mVec2_c::mVec2_c ( const f32 * p)
inline

Constructs a vector from a float array.

Definition at line 18 of file m_vec.hpp.

◆ mVec2_c() [3/4]

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

Constructs a vector from two floating point values.

Definition at line 21 of file m_vec.hpp.

◆ mVec2_c() [4/4]

mVec2_c::mVec2_c ( const mVec2_c & v)
inline

Copy constructor.

Definition at line 24 of file m_vec.hpp.

Member Function Documentation

◆ set()

void mVec2_c::set ( float x,
float y )
inline

Definition at line 26 of file m_vec.hpp.

◆ incX()

void mVec2_c::incX ( float x)
inline

Increments the X coordinate.

Parameters
xThe value to increment by.

Definition at line 33 of file m_vec.hpp.

◆ incY()

void mVec2_c::incY ( float y)
inline

Increments the Y coordinate.

Parameters
yThe value to increment by.

Definition at line 37 of file m_vec.hpp.

◆ operator=()

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

Definition at line 40 of file m_vec.hpp.

◆ operator f32 *()

mVec2_c::operator f32 * ( )
inline

Float cast operator.

Definition at line 43 of file m_vec.hpp.

◆ operator const f32 *()

mVec2_c::operator const f32 * ( ) const
inline

Const float cast operator.

Definition at line 46 of file m_vec.hpp.

◆ operator Vec2 *()

mVec2_c::operator Vec2 * ( )
inline

Vec2 cast operator.

Definition at line 49 of file m_vec.hpp.

◆ operator const Vec2 *()

mVec2_c::operator const Vec2 * ( ) const
inline

Const Vec2 cast operator.

Definition at line 52 of file m_vec.hpp.

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

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

nw4r::math::VEC2 cast operator.

Definition at line 55 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 58 of file m_vec.hpp.

◆ operator+=()

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

Augmented addition operator.

Definition at line 61 of file m_vec.hpp.

◆ operator-=()

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

Augmented subtraction operator.

Definition at line 64 of file m_vec.hpp.

◆ operator*=()

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

Augmented scalar product operator.

Definition at line 67 of file m_vec.hpp.

◆ operator/=()

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

Augmented scalar division operator.

Definition at line 70 of file m_vec.hpp.

◆ operator+() [1/2]

mVec2_c mVec2_c::operator+ ( ) const
inline

Positive operator.

Definition at line 73 of file m_vec.hpp.

◆ operator-() [1/2]

mVec2_c mVec2_c::operator- ( ) const
inline

Negative operator.

Definition at line 76 of file m_vec.hpp.

◆ operator+() [2/2]

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

Addition operator.

Definition at line 79 of file m_vec.hpp.

◆ operator-() [2/2]

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

Subtraction operator.

Definition at line 82 of file m_vec.hpp.

◆ operator*()

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

Scalar product operator.

Definition at line 85 of file m_vec.hpp.

◆ operator/()

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

Scalar division operator.

Definition at line 88 of file m_vec.hpp.

◆ operator==()

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

Equality operator.

Definition at line 91 of file m_vec.hpp.

◆ operator!=()

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

Inequality operator.

Definition at line 94 of file m_vec.hpp.