NW4F G3d
Loading...
Searching...
No Matches
nw::g3d::math::Vec3 Class Reference

#include <g3d_Vector3.h>

Inherits nw::g3d::math::Vec3_t.

Public Member Functions

Vec3Set (float x, float y, float z)
Vec3Set (const float *a)
Vec3Set (const Vec3 &v)
Vec3Zero ()
Vec3Neg (const Vec3 &v)
Vec3Rcp (const Vec3 &v)
Vec3Add (const Vec3 &lhs, const Vec3 &rhs)
Vec3Sub (const Vec3 &lhs, const Vec3 &rhs)
Vec3Mul (const Vec3 &lhs, const Vec3 &rhs)
Vec3Div (const Vec3 &lhs, const Vec3 &rhs)
Vec3Mul (const Vec3 &lhs, float rhs)
Vec3Div (const Vec3 &lhs, float rhs)
Vec3Mad (const Vec3 &lhsMul, float rhsMul, const Vec3 &add)
Vec3Mul (const Mtx34 &lhs, const Vec3 &rhs)
Vec3Cross (const Vec3 &lhs, const Vec3 &rhs)
float Normalize (const Vec3 &v)
Vec3Transform (const Mtx34 &m, const Vec3 &v)
Vec3Rotate (const Mtx34 &m, const Vec3 &v)
Vec3Rotate (const Quat &q, const Vec3 &v)
Vec3Project (const Mtx44 &m, const Vec3 &v)

Static Public Member Functions

static Vec3 Make (float x, float y, float z)
static Vec3Cast (float *a)
static const Vec3Cast (const float *a)
static float Length (const Vec3 &v)
static float LengthSq (const Vec3 &v)
static float Distance (const Vec3 &lhs, const Vec3 &rhs)
static float DistanceSq (const Vec3 &lhs, const Vec3 &rhs)
static float Dot (const Vec3 &lhs, const Vec3 &rhs)

Additional Inherited Members

Public Types inherited from nw::g3d::math::Vec3_t
enum  { DIM = 3 , DIM_PS = DIM / 2 }
Public Attributes inherited from nw::g3d::math::Vec3_t
union { 
   struct { 
      float   x 
      float   y 
      float   z 
   } 
   float   a [DIM
}; 

Member Function Documentation

◆ Make()

NW_G3D_MATH_INLINE Vec3 nw::g3d::math::Vec3::Make ( float x,
float y,
float z )
static

◆ Cast() [1/2]

NW_G3D_MATH_INLINE Vec3 * nw::g3d::math::Vec3::Cast ( float * a)
static

◆ Cast() [2/2]

NW_G3D_MATH_INLINE const Vec3 * nw::g3d::math::Vec3::Cast ( const float * a)
static

◆ Set() [1/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Set ( float x,
float y,
float z )

◆ Set() [2/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Set ( const float * a)

◆ Set() [3/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Set ( const Vec3 & v)

◆ Zero()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Zero ( )

◆ Neg()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Neg ( const Vec3 & v)

◆ Rcp()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Rcp ( const Vec3 & v)

◆ Add()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Add ( const Vec3 & lhs,
const Vec3 & rhs )

◆ Sub()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Sub ( const Vec3 & lhs,
const Vec3 & rhs )

◆ Mul() [1/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Mul ( const Vec3 & lhs,
const Vec3 & rhs )

◆ Div() [1/2]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Div ( const Vec3 & lhs,
const Vec3 & rhs )

◆ Mul() [2/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Mul ( const Vec3 & lhs,
float rhs )

◆ Div() [2/2]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Div ( const Vec3 & lhs,
float rhs )

◆ Mad()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Mad ( const Vec3 & lhsMul,
float rhsMul,
const Vec3 & add )

◆ Mul() [3/3]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Mul ( const Mtx34 & lhs,
const Vec3 & rhs )

◆ Length()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::Length ( const Vec3 & v)
static

◆ LengthSq()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::LengthSq ( const Vec3 & v)
static

◆ Distance()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::Distance ( const Vec3 & lhs,
const Vec3 & rhs )
static

◆ DistanceSq()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::DistanceSq ( const Vec3 & lhs,
const Vec3 & rhs )
static

◆ Dot()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::Dot ( const Vec3 & lhs,
const Vec3 & rhs )
static

◆ Cross()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Cross ( const Vec3 & lhs,
const Vec3 & rhs )

◆ Normalize()

NW_G3D_MATH_INLINE float nw::g3d::math::Vec3::Normalize ( const Vec3 & v)

◆ Transform()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Transform ( const Mtx34 & m,
const Vec3 & v )

◆ Rotate() [1/2]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Rotate ( const Mtx34 & m,
const Vec3 & v )

◆ Rotate() [2/2]

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Rotate ( const Quat & q,
const Vec3 & v )

◆ Project()

NW_G3D_MATH_INLINE Vec3 & nw::g3d::math::Vec3::Project ( const Mtx44 & m,
const Vec3 & v )