NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
nw4r::math Namespace Reference

Description

Math library.

Classes

struct  _MTX33
 
struct  _MTX34
 
struct  _MTX44
 
struct  _QUAT
 
struct  _VEC2
 
struct  _VEC3
 
struct  AABB
 
class  FRUSTUM
 
struct  MTX33
 
struct  MTX34
 
struct  MTX44
 
struct  PLANE
 
struct  QUAT
 
struct  VEC2
 
struct  VEC3
 

Enumerations

enum  IntersectionResult {
  INTERSECTION_NONE ,
  INTERSECTION_1 ,
  INTERSECTION_2 ,
  INTERSECTION_LINE3_ON_PLANE = INTERSECTION_2 ,
  INTERSECTION_RAY3_ON_PLANE = INTERSECTION_2 ,
  INTERSECTION_SEGMENT3_ON_PLANE = INTERSECTION_2 ,
  INTERSECTION_OUTSIDE = 0 ,
  INTERSECTION_INSIDE ,
  INTERSECTION_INTERSECT
}
 

Functions

f32 FrSqrt (f32 x)
 
f32 FAbs (register f32 x)
 
f32 FCeil (f32 x)
 
f32 FExp (f32 x)
 
f32 FFloor (f32 x)
 
f32 FInv (register f32 x)
 
f32 FMod (f32 x, f32 y)
 
f32 FModf (f32 x, f32 *pY)
 
f32 FSqrt (f32 x)
 
f32 FLog (f32 x)
 
f32 FSelect (register f32 value, register f32 ge_zero, register f32 lt_zero)
 
f32 U16ToF32 (u16 arg)
 
u16 F32ToU16 (f32 arg)
 
f32 S16ToF32 (s16 arg)
 
s16 F32ToS16 (f32 arg)
 
ulong F32Asulong (f32 arg)
 
f32 ulongAsF32 (ulong arg)
 
s32 FGetExpPart (f32 x)
 
f32 FGetMantPart (f32 x)
 
bool IntersectionAABB (const AABB *pA, const AABB *pB)
 
f32 SinFIdx (f32 fidx)
 
float SinF (float ang)
 
f32 SinIdx (short idx)
 
f32 SinDeg (f32 deg)
 
f32 SinRad (f32 rad)
 
f32 CosFIdx (f32 fidx)
 
float CosF (float ang)
 
f32 CosIdx (short idx)
 
f32 CosDeg (f32 deg)
 
f32 CosRad (f32 rad)
 
f32 TanFIdx (f32 fidx)
 
f32 TanDeg (f32 deg)
 
f32 TanRad (f32 rad)
 
void SinCosFIdx (f32 *pSin, f32 *pCos, f32 fidx)
 
void SinCosDeg (f32 *pSin, f32 *pCos, f32 deg)
 
void SinCosRad (f32 *pSin, f32 *pCos, f32 rad)
 
f32 AtanFIdx (f32 x)
 
f32 AtanDeg (f32 x)
 
f32 AtanRad (f32 x)
 
f32 Atan2FIdx (f32 y, f32 x)
 
f32 Atan2Deg (f32 y, f32 x)
 
f32 Atan2Rad (f32 y, f32 x)
 
VEC3VEC3Add (VEC3 *pOut, const VEC3 *pA, const VEC3 *pB)
 
VEC3VEC3Sub (VEC3 *pOut, const VEC3 *pA, const VEC3 *pB)
 
VEC3VEC3Scale (VEC3 *pOut, const VEC3 *pIn, f32 scale)
 
f32 VEC2Len (const VEC2 *pVec)
 
VEC3VEC3Maximize (VEC3 *pOut, const VEC3 *pA, const VEC3 *pB)
 
VEC3VEC3Minimize (VEC3 *pOut, const VEC3 *pA, const VEC3 *pB)
 
VEC3VEC3TransformNormal (VEC3 *pOut, const MTX34 *pMtx, const VEC3 *pVec)
 
VEC3VEC3Add (register VEC3 *pOut, register const VEC3 *pA, register const VEC3 *pB)
 
f32 VEC3Dot (register const VEC3 *pA, register const VEC3 *pB)
 
f32 VEC3LenSq (register const VEC3 *pVec)
 
VEC3VEC3Lerp (register VEC3 *pOut, register const VEC3 *pVec1, register const VEC3 *pVec2, register f32 t)
 
VEC3VEC3Scale (register VEC3 *pOut, register const VEC3 *pIn, register f32 scale)
 
VEC3VEC3Sub (register VEC3 *pOut, register const VEC3 *pA, register const VEC3 *pB)
 
VEC3VEC3Cross (VEC3 *pOut, const VEC3 *pA, const VEC3 *pB)
 
f32 VEC3DistSq (const VEC3 *pA, const VEC3 *pB)
 
f32 VEC3Len (const VEC3 *pVec)
 
VEC3VEC3Normalize (VEC3 *pOut, const VEC3 *pIn)
 
VEC3VEC3Transform (VEC3 *pOut, const MTX34 *pMtx, const VEC3 *pVec)
 
VEC3VEC3TransformCoord (VEC3 *pOut, const MTX34 *pMtx, const VEC3 *pVec)
 
MTX33MTX33Identity (MTX33 *pMtx)
 
MTX33MTX34ToMTX33 (MTX33 *pOut, const MTX34 *pIn)
 
ulong MTX34InvTranspose (MTX33 *pOut, const MTX34 *pIn)
 
MTX34MTX34Zero (MTX34 *pMtx)
 
MTX34MTX34Scale (MTX34 *pOut, const MTX34 *pIn, const VEC3 *pScale)
 
MTX34MTX34Trans (MTX34 *pOut, const MTX34 *pIn, const VEC3 *pTrans)
 
MTX34MTX34RotAxisFIdx (MTX34 *pMtx, const VEC3 *pAxis, f32 fidx)
 
MTX34MTX34RotXYZFIdx (MTX34 *pMtx, f32 fx, f32 fy, f32 fz)
 
MTX34MTX34Copy (MTX34 *pOut, const MTX34 *pIn)
 
MTX34MTX34Identity (MTX34 *pMtx)
 
ulong MTX34Inv (MTX34 *pOut, const MTX34 *pIn)
 
ulong MTX34InvTranspose (MTX34 *pOut, const MTX34 *pIn)
 
MTX34MTX34LookAt (MTX34 *pMtx, const VEC3 *pPos, const VEC3 *pUp, const VEC3 *pTarget)
 
MTX34MTX34Mult (MTX34 *pOut, const MTX34 *pA, const MTX34 *pB)
 
MTX34MTX34MultArray (MTX34 *pOut, const MTX34 *p1, const MTX34 *pSrc, ulong len)
 
MTX34MTX34RotAxisRad (MTX34 *pOut, const VEC3 *pAxis, f32 frad)
 
MTX34MTX34RotXYZDeg (MTX34 *pMtx, f32 dx, f32 dy, f32 dz)
 
MTX34MTX34RotXYZRad (MTX34 *pMtx, f32 rx, f32 ry, f32 rz)
 
MTX34MTX34Scale (MTX34 *pOut, const VEC3 *pScale, const MTX34 *pIn)
 
QUATMTX34ToQUAT (QUAT *pQuat, const MTX34 *pMtx)
 
MTX34MTX34Trans (MTX34 *pOut, const VEC3 *pTrans, const MTX34 *pIn)
 
MTX44MTX44Identity (MTX44 *pMtx)
 
MTX44MTX44Copy (MTX44 *pDst, const MTX44 *pSrc)
 
MTX34QUATToMTX34 (MTX34 *pMtx, const QUAT *pQuat)
 
QUATC_QUATSlerp (QUAT *pOut, const QUAT *p1, const QUAT *p2, f32 t)
 

Enumeration Type Documentation

◆ IntersectionResult

enum nw4r::math::IntersectionResult

Definition at line 13 of file math_geometry.h.

Function Documentation

◆ FAbs()

f32 nw4r::math::FAbs ( register f32 x)
inline

Definition at line 33 of file math_arithmetic.h.

◆ FCeil()

f32 nw4r::math::FCeil ( f32 x)
inline

Definition at line 45 of file math_arithmetic.h.

◆ FExp()

f32 nw4r::math::FExp ( f32 x)
inline

Definition at line 49 of file math_arithmetic.h.

◆ FFloor()

f32 nw4r::math::FFloor ( f32 x)
inline

Definition at line 53 of file math_arithmetic.h.

◆ FInv()

f32 nw4r::math::FInv ( register f32 x)
inline

Definition at line 57 of file math_arithmetic.h.

◆ FMod()

f32 nw4r::math::FMod ( f32 x,
f32 y )
inline

Definition at line 75 of file math_arithmetic.h.

◆ FModf()

f32 nw4r::math::FModf ( f32 x,
f32 * pY )
inline

Definition at line 79 of file math_arithmetic.h.

◆ FSqrt()

f32 nw4r::math::FSqrt ( f32 x)
inline

Definition at line 83 of file math_arithmetic.h.

◆ FLog()

f32 nw4r::math::FLog ( f32 x)
inline

Definition at line 87 of file math_arithmetic.h.

◆ FSelect()

f32 nw4r::math::FSelect ( register f32 value,
register f32 ge_zero,
register f32 lt_zero )
inline

Definition at line 95 of file math_arithmetic.h.

◆ U16ToF32()

f32 nw4r::math::U16ToF32 ( u16 arg)
inline

Definition at line 113 of file math_arithmetic.h.

◆ F32ToU16()

u16 nw4r::math::F32ToU16 ( f32 arg)
inline

Definition at line 118 of file math_arithmetic.h.

◆ S16ToF32()

f32 nw4r::math::S16ToF32 ( s16 arg)
inline

Definition at line 124 of file math_arithmetic.h.

◆ F32ToS16()

s16 nw4r::math::F32ToS16 ( f32 arg)
inline

Definition at line 129 of file math_arithmetic.h.

◆ F32Asulong()

ulong nw4r::math::F32Asulong ( f32 arg)
inline

Definition at line 135 of file math_arithmetic.h.

◆ ulongAsF32()

f32 nw4r::math::ulongAsF32 ( ulong arg)
inline

Definition at line 138 of file math_arithmetic.h.

◆ FGetExpPart()

s32 nw4r::math::FGetExpPart ( f32 x)
inline

Definition at line 142 of file math_arithmetic.h.

◆ FGetMantPart()

f32 nw4r::math::FGetMantPart ( f32 x)
inline

Definition at line 146 of file math_arithmetic.h.

◆ SinF()

float nw4r::math::SinF ( float ang)
inline

Definition at line 38 of file math_triangular.h.

◆ SinIdx()

f32 nw4r::math::SinIdx ( short idx)
inline

Definition at line 41 of file math_triangular.h.

◆ SinDeg()

f32 nw4r::math::SinDeg ( f32 deg)
inline

Definition at line 44 of file math_triangular.h.

◆ SinRad()

f32 nw4r::math::SinRad ( f32 rad)
inline

Definition at line 47 of file math_triangular.h.

◆ CosF()

float nw4r::math::CosF ( float ang)
inline

Definition at line 58 of file math_triangular.h.

◆ CosIdx()

f32 nw4r::math::CosIdx ( short idx)
inline

Definition at line 61 of file math_triangular.h.

◆ CosDeg()

f32 nw4r::math::CosDeg ( f32 deg)
inline

Definition at line 64 of file math_triangular.h.

◆ CosRad()

f32 nw4r::math::CosRad ( f32 rad)
inline

Definition at line 67 of file math_triangular.h.

◆ TanFIdx()

f32 nw4r::math::TanFIdx ( f32 fidx)
inline

Definition at line 76 of file math_triangular.h.

◆ TanDeg()

f32 nw4r::math::TanDeg ( f32 deg)
inline

Definition at line 79 of file math_triangular.h.

◆ TanRad()

f32 nw4r::math::TanRad ( f32 rad)
inline

Definition at line 82 of file math_triangular.h.

◆ SinCosDeg()

void nw4r::math::SinCosDeg ( f32 * pSin,
f32 * pCos,
f32 deg )
inline

Definition at line 93 of file math_triangular.h.

◆ SinCosRad()

void nw4r::math::SinCosRad ( f32 * pSin,
f32 * pCos,
f32 rad )
inline

Definition at line 96 of file math_triangular.h.

◆ AtanDeg()

f32 nw4r::math::AtanDeg ( f32 x)
inline

Definition at line 107 of file math_triangular.h.

◆ AtanRad()

f32 nw4r::math::AtanRad ( f32 x)
inline

Definition at line 110 of file math_triangular.h.

◆ Atan2Deg()

f32 nw4r::math::Atan2Deg ( f32 y,
f32 x )
inline

Definition at line 121 of file math_triangular.h.

◆ Atan2Rad()

f32 nw4r::math::Atan2Rad ( f32 y,
f32 x )
inline

Definition at line 124 of file math_triangular.h.

◆ VEC2Len()

f32 nw4r::math::VEC2Len ( const VEC2 * pVec)
inline

Definition at line 302 of file math_types.h.

◆ VEC3Add()

VEC3 * nw4r::math::VEC3Add ( register VEC3 * pOut,
register const VEC3 * pA,
register const VEC3 * pB )
inline

Definition at line 315 of file math_types.h.

◆ VEC3Dot()

f32 nw4r::math::VEC3Dot ( register const VEC3 * pA,
register const VEC3 * pB )
inline

Definition at line 338 of file math_types.h.

◆ VEC3LenSq()

f32 nw4r::math::VEC3LenSq ( register const VEC3 * pVec)
inline

Definition at line 362 of file math_types.h.

◆ VEC3Lerp()

VEC3 * nw4r::math::VEC3Lerp ( register VEC3 * pOut,
register const VEC3 * pVec1,
register const VEC3 * pVec2,
register f32 t )
inline

Definition at line 383 of file math_types.h.

◆ VEC3Scale()

VEC3 * nw4r::math::VEC3Scale ( register VEC3 * pOut,
register const VEC3 * pIn,
register f32 scale )
inline

Definition at line 410 of file math_types.h.

◆ VEC3Sub()

VEC3 * nw4r::math::VEC3Sub ( register VEC3 * pOut,
register const VEC3 * pA,
register const VEC3 * pB )
inline

Definition at line 431 of file math_types.h.

◆ VEC3Cross()

VEC3 * nw4r::math::VEC3Cross ( VEC3 * pOut,
const VEC3 * pA,
const VEC3 * pB )
inline

Definition at line 454 of file math_types.h.

◆ VEC3DistSq()

f32 nw4r::math::VEC3DistSq ( const VEC3 * pA,
const VEC3 * pB )
inline

Definition at line 459 of file math_types.h.

◆ VEC3Len()

f32 nw4r::math::VEC3Len ( const VEC3 * pVec)
inline

Definition at line 463 of file math_types.h.

◆ VEC3Normalize()

VEC3 * nw4r::math::VEC3Normalize ( VEC3 * pOut,
const VEC3 * pIn )
inline

Definition at line 467 of file math_types.h.

◆ VEC3Transform()

VEC3 * nw4r::math::VEC3Transform ( VEC3 * pOut,
const MTX34 * pMtx,
const VEC3 * pVec )
inline

Definition at line 472 of file math_types.h.

◆ VEC3TransformCoord()

VEC3 * nw4r::math::VEC3TransformCoord ( VEC3 * pOut,
const MTX34 * pMtx,
const VEC3 * pVec )
inline

Definition at line 477 of file math_types.h.

◆ MTX34Copy()

MTX34 * nw4r::math::MTX34Copy ( MTX34 * pOut,
const MTX34 * pIn )
inline

Definition at line 503 of file math_types.h.

◆ MTX34Identity()

MTX34 * nw4r::math::MTX34Identity ( MTX34 * pMtx)
inline

Definition at line 508 of file math_types.h.

◆ MTX34Inv()

ulong nw4r::math::MTX34Inv ( MTX34 * pOut,
const MTX34 * pIn )
inline

Definition at line 513 of file math_types.h.

◆ MTX34InvTranspose()

ulong nw4r::math::MTX34InvTranspose ( MTX34 * pOut,
const MTX34 * pIn )
inline

Definition at line 517 of file math_types.h.

◆ MTX34LookAt()

MTX34 * nw4r::math::MTX34LookAt ( MTX34 * pMtx,
const VEC3 * pPos,
const VEC3 * pUp,
const VEC3 * pTarget )
inline

Definition at line 521 of file math_types.h.

◆ MTX34Mult()

MTX34 * nw4r::math::MTX34Mult ( MTX34 * pOut,
const MTX34 * pA,
const MTX34 * pB )
inline

Definition at line 527 of file math_types.h.

◆ MTX34MultArray()

MTX34 * nw4r::math::MTX34MultArray ( MTX34 * pOut,
const MTX34 * p1,
const MTX34 * pSrc,
ulong len )
inline

Definition at line 532 of file math_types.h.

◆ MTX34RotAxisRad()

MTX34 * nw4r::math::MTX34RotAxisRad ( MTX34 * pOut,
const VEC3 * pAxis,
f32 frad )
inline

Definition at line 538 of file math_types.h.

◆ MTX34RotXYZDeg()

MTX34 * nw4r::math::MTX34RotXYZDeg ( MTX34 * pMtx,
f32 dx,
f32 dy,
f32 dz )
inline

Definition at line 542 of file math_types.h.

◆ MTX34RotXYZRad()

MTX34 * nw4r::math::MTX34RotXYZRad ( MTX34 * pMtx,
f32 rx,
f32 ry,
f32 rz )
inline

Definition at line 548 of file math_types.h.

◆ MTX34Scale()

MTX34 * nw4r::math::MTX34Scale ( MTX34 * pOut,
const VEC3 * pScale,
const MTX34 * pIn )
inline

Definition at line 554 of file math_types.h.

◆ MTX34ToQUAT()

QUAT * nw4r::math::MTX34ToQUAT ( QUAT * pQuat,
const MTX34 * pMtx )
inline

Definition at line 559 of file math_types.h.

◆ MTX34Trans()

MTX34 * nw4r::math::MTX34Trans ( MTX34 * pOut,
const VEC3 * pTrans,
const MTX34 * pIn )
inline

Definition at line 564 of file math_types.h.

◆ QUATToMTX34()

MTX34 * nw4r::math::QUATToMTX34 ( MTX34 * pMtx,
const QUAT * pQuat )
inline

Definition at line 582 of file math_types.h.

◆ C_QUATSlerp()

QUAT * nw4r::math::C_QUATSlerp ( QUAT * pOut,
const QUAT * p1,
const QUAT * p2,
f32 t )
inline

Definition at line 588 of file math_types.h.