3#include <game/mLib/m_angle.hpp> 
    4#include <lib/egg/math/eggVector.h> 
   18    mVec2_c(
const f32 *p) { x = p[0]; y = p[1]; }
 
   26    void set(
float x, 
float y) {
 
   33    void incX(
float x) { this->x += x; }
 
   37    void incY(
float y) { this->y += y; }
 
   40    mVec2_c &operator=(
const mVec2_c &v) { x = v.x; y = v.y; 
return *
this; }
 
   43    operator f32*() { 
return &x; }
 
   46    operator const f32*() 
const { 
return &x; }
 
   52    operator const Vec2*() 
const { 
return (
const Vec2*)&x; }
 
 
  109    mVec3_c(
const f32 *p) { x = p[0]; y = p[1]; z = p[2]; }
 
  112    mVec3_c(f32 fx, f32 fy, f32 fz) { x = fx; y = fy; z = fz; }
 
  132    operator f32*() { 
return &x; }
 
  135    operator const f32*() 
const { 
return &x; }
 
  141    operator const Vec*() 
const { 
return (
const Vec*)&x; }
 
  185    float xzLen()
 const {
 
  186        return EGG::Mathf::sqrt(x * x + z * z);
 
  189    short xzAng()
 const {
 
  193    float distTo(
const mVec3_c &other)
 const {
 
  194        return EGG::Mathf::sqrt(PSVECSquareDistance((
const Vec*) 
this, (
const Vec*) &other));
 
  205    void rotX(mAng angle); 
 
  206    void rotY(mAng angle); 
 
 
A two-dimensional floating point vector.
A three-dimensional floating point vector.
A two-dimensional floating point vector.
mVec2_c(const mVec2_c &v)
Copy constructor.
mVec2_c operator+() const
Positive operator.
bool operator!=(const mVec2_c &v) const
Inequality operator.
mVec2_c & operator+=(const mVec2_c &v)
Augmented addition operator.
mVec2_c operator+(const mVec2_c &v) const
Addition operator.
mVec2_c()
Constructs an empty vector.
mVec2_c & operator/=(f32 f)
Augmented scalar division operator.
mVec2_c operator/(f32 f) const
Scalar division operator.
bool operator==(const mVec2_c &v) const
Equality operator.
mVec2_c(const f32 *p)
Constructs a vector from a float array.
void incY(float y)
Increments the Y coordinate.
mVec2_c(f32 fx, f32 fy)
Constructs a vector from two floating point values.
mVec2_c & operator*=(f32 f)
Augmented scalar product operator.
mVec2_c operator*(f32 f) const
Scalar product operator.
mVec2_c & operator-=(const mVec2_c &v)
Augmented subtraction operator.
mVec2_c operator-(const mVec2_c &v) const
Subtraction operator.
mVec2_c operator-() const
Negative operator.
void incX(float x)
Increments the X coordinate.
A three-dimensional floating point vector.
mVec3_c operator/(f32 f) const
Scalar division operator.
static mVec3_c Ex
The unit vector for the X axis.
static mVec3_c Ey
The unit vector for the Y axis.
mVec3_c(const nw4r::math::VEC3 &v)
Constructs a new vector from an existing vector from the NW4R library.
mVec3_c & operator-=(const mVec3_c &v)
Augmented subtraction operator.
mVec3_c operator*(f32 f) const
Scalar product operator.
mVec3_c & operator+=(const mVec3_c &v)
Augmented addition operator.
bool normalizeRS()
Normalizes the vector.
mVec3_c operator-() const
Negative operator.
mVec3_c operator-(const mVec3_c &v) const
Subtraction operator.
mVec3_c(const mVec3_c &v, float fz)
Copy constructor with a different Z value.
mVec3_c(f32 fx, f32 fy, f32 fz)
Constructs a vector from three floating point values.
mVec3_c(const f32 *p)
Constructs a vector from a float array.
float normalize()
Normalizes the vector.
bool operator==(const mVec3_c &v) const
Equality operator.
mVec3_c & operator*=(f32 f)
Augmented scalar product operator.
mVec3_c operator+() const
Positive operator.
void rotX(mAng angle)
Rotates the vector on the X axis by the given angle.
void rotY(mAng angle)
Rotates the vector on the Y axis by the given angle.
static mVec3_c Zero
The null vector.
mVec3_c & operator/=(f32 f)
Augmented scalar division operator.
mVec3_c(const mVec3_c &v)
Copy constructor.
bool operator!=(const mVec3_c &v) const
Inequality operator.
mVec3_c & operator=(const mVec3_c &v)
Assignment operator.
mVec3_c(const Vec &v)
Constructs a new vector from an existing vector from the MTX library.
mVec3_c operator+(const mVec3_c &v) const
Addition operator.
mVec3_c()
Constructs an empty vector.
static mVec3_c Ez
The unit vector for the Z axis.
s16 atan2s(float sin, float cos)
Converts a sine and a cosine to an angle in units.