Rise
The Vieneo Province
Loading...
Searching...
No Matches
RiseMath Namespace Reference

Classes

struct  Vector2
struct  Vector3
struct  Vector4
struct  Quaternion
struct  Plane
struct  Color
struct  Matrix

Typedefs

using Half = DirectX::PackedVector::HALF

Functions

template<class T>
auto ToRadian (T value)
template<class T>
auto ToDegree (T value)
template<class A, class B>
constexpr auto Min (A first, B second)
template<class A, class B>
constexpr auto Max (A first, B second)
float Vec2Length (const Vector2 *a)
float Vec3Dot (const Vector3 *a, const Vector3 *b)
float Vec3LengthSq (const Vector3 *a)
float Vec3Length (const Vector3 *a)
Vector3 * Vec3Add (Vector3 *out, const Vector3 *a, const Vector3 *b)
Vector3 * Vec3Subtract (Vector3 *out, const Vector3 *a, const Vector3 *b)
Vector3 * Vec3Scale (Vector3 *out, const Vector3 *a, float scale)
Vector3 * Vec3Lerp (Vector3 *out, const Vector3 *a, const Vector3 *b, float t)
Vector3 * Vec3BaryCentric (Vector3 *out, const Vector3 *a, const Vector3 *b, const Vector3 *c, float u, float v)
Vector2 * Vec2Normalize (Vector2 *out, const Vector2 *a)
Vector3 * Vec3Normalize (Vector3 *out, const Vector3 *a)
Vector3 * Vec3Cross (Vector3 *out, const Vector3 *a, const Vector3 *b)
Vector3 * Vec3TransformNormal (Vector3 *out, const Vector3 *a, const Matrix *m)
Vector3 * Vec3TransformCoord (Vector3 *out, const Vector3 *a, const Matrix *m)
Vector2 * Vec2TransformCoord (Vector2 *out, const Vector2 *a, const Matrix *m)
Vector4 * Vec3Transform (Vector4 *out, const Vector3 *a, const Matrix *m)
Matrix * MatrixIdentity (Matrix *out)
Matrix * MatrixMultiply (Matrix *out, const Matrix *a, const Matrix *b)
Matrix * MatrixTranspose (Matrix *out, const Matrix *a)
Matrix * MatrixInverse (Matrix *out, float *determinant, const Matrix *a)
Matrix * MatrixScaling (Matrix *out, float x, float y, float z)
Matrix * MatrixTranslation (Matrix *out, float x, float y, float z)
Matrix * MatrixRotationX (Matrix *out, float value)
Matrix * MatrixRotationY (Matrix *out, float value)
Matrix * MatrixRotationZ (Matrix *out, float value)
Matrix * MatrixRotationAxis (Matrix *out, const Vector3 *axis, float angle)
Matrix * MatrixRotationQuaternion (Matrix *out, const Quaternion *q)
Matrix * MatrixRotationYawPitchRoll (Matrix *out, float yaw, float pitch, float roll)
Matrix * MatrixLookAtLH (Matrix *out, const Vector3 *eye, const Vector3 *at, const Vector3 *up)
Matrix * MatrixLookAtRH (Matrix *out, const Vector3 *eye, const Vector3 *at, const Vector3 *up)
Matrix * MatrixPerspectiveRH (Matrix *out, float width, float height, float nearZ, float farZ)
Matrix * MatrixPerspectiveFovRH (Matrix *out, float fov, float aspect, float nearZ, float farZ)
Matrix * MatrixTransformation2D (Matrix *out, const Vector2 *scalingCenter, float scalingRotation, const Vector2 *scaling, const Vector2 *rotationCenter, float rotation, const Vector2 *translation)
Quaternion * QuaternionIdentity (Quaternion *out)
Quaternion * QuaternionNormalize (Quaternion *out, const Quaternion *q)
float QuaternionLength (const Quaternion *q)
Quaternion * QuaternionMultiply (Quaternion *out, const Quaternion *a, const Quaternion *b)
Quaternion * QuaternionRotationYawPitchRoll (Quaternion *out, float yaw, float pitch, float roll)
Quaternion * QuaternionSlerp (Quaternion *out, const Quaternion *a, const Quaternion *b, float t)
Color * ColorLerp (Color *out, const Color *a, const Color *b, float t)
Color * ColorScale (Color *out, const Color *a, float scale)
Plane * PlaneFromPoints (Plane *out, const Vector3 *a, const Vector3 *b, const Vector3 *c)
Plane * PlaneNormalize (Plane *out, const Plane *a)
Plane * PlaneTransform (Plane *out, const Plane *a, const Matrix *matrix)
Vector3 * PlaneIntersectLine (Vector3 *out, const Plane *plane, const Vector3 *first, const Vector3 *second)
bool IntersectTri (const Vector3 *a, const Vector3 *b, const Vector3 *c, const Vector3 *origin, const Vector3 *direction, float *u, float *v, float *distance)
template<class Viewport>
Vector3 * Vec3Project (Vector3 *out, const Vector3 *value, const Viewport *viewport, const Matrix *projection, const Matrix *view, const Matrix *world)
Half * Float32To16Array (Half *out, const float *source, unsigned count)

Variables

constexpr float Pi =3.141592654f
constexpr float HalfPi =1.570796327f
constexpr float Tau =6.283185307f

Typedef Documentation

◆ Half

using RiseMath::Half = DirectX::PackedVector::HALF

Definition at line 229 of file ClientMath.h.

Function Documentation

◆ ColorLerp()

Color * RiseMath::ColorLerp ( Color * out,
const Color * a,
const Color * b,
float t )
inline

Definition at line 173 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ColorScale()

Color * RiseMath::ColorScale ( Color * out,
const Color * a,
float scale )
inline

Definition at line 174 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Float32To16Array()

Half * RiseMath::Float32To16Array ( Half * out,
const float * source,
unsigned count )
inline

Definition at line 230 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IntersectTri()

bool RiseMath::IntersectTri ( const Vector3 * a,
const Vector3 * b,
const Vector3 * c,
const Vector3 * origin,
const Vector3 * direction,
float * u,
float * v,
float * distance )
inline

Definition at line 197 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixIdentity()

Matrix * RiseMath::MatrixIdentity ( Matrix * out)
inline

Definition at line 115 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixInverse()

Matrix * RiseMath::MatrixInverse ( Matrix * out,
float * determinant,
const Matrix * a )
inline

Definition at line 118 of file ClientMath.h.

Here is the call graph for this function:

◆ MatrixLookAtLH()

Matrix * RiseMath::MatrixLookAtLH ( Matrix * out,
const Vector3 * eye,
const Vector3 * at,
const Vector3 * up )
inline

Definition at line 139 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixLookAtRH()

Matrix * RiseMath::MatrixLookAtRH ( Matrix * out,
const Vector3 * eye,
const Vector3 * at,
const Vector3 * up )
inline

Definition at line 141 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixMultiply()

Matrix * RiseMath::MatrixMultiply ( Matrix * out,
const Matrix * a,
const Matrix * b )
inline

Definition at line 116 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixPerspectiveFovRH()

Matrix * RiseMath::MatrixPerspectiveFovRH ( Matrix * out,
float fov,
float aspect,
float nearZ,
float farZ )
inline

Definition at line 151 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixPerspectiveRH()

Matrix * RiseMath::MatrixPerspectiveRH ( Matrix * out,
float width,
float height,
float nearZ,
float farZ )
inline

Definition at line 143 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationAxis()

Matrix * RiseMath::MatrixRotationAxis ( Matrix * out,
const Vector3 * axis,
float angle )
inline

Definition at line 129 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationQuaternion()

Matrix * RiseMath::MatrixRotationQuaternion ( Matrix * out,
const Quaternion * q )
inline

Definition at line 135 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationX()

Matrix * RiseMath::MatrixRotationX ( Matrix * out,
float value )
inline

Definition at line 126 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationY()

Matrix * RiseMath::MatrixRotationY ( Matrix * out,
float value )
inline

Definition at line 127 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationYawPitchRoll()

Matrix * RiseMath::MatrixRotationYawPitchRoll ( Matrix * out,
float yaw,
float pitch,
float roll )
inline

Definition at line 137 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixRotationZ()

Matrix * RiseMath::MatrixRotationZ ( Matrix * out,
float value )
inline

Definition at line 128 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixScaling()

Matrix * RiseMath::MatrixScaling ( Matrix * out,
float x,
float y,
float z )
inline

Definition at line 124 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixTransformation2D()

Matrix * RiseMath::MatrixTransformation2D ( Matrix * out,
const Vector2 * scalingCenter,
float scalingRotation,
const Vector2 * scaling,
const Vector2 * rotationCenter,
float rotation,
const Vector2 * translation )
inline

Definition at line 156 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MatrixTranslation()

Matrix * RiseMath::MatrixTranslation ( Matrix * out,
float x,
float y,
float z )
inline

Definition at line 125 of file ClientMath.h.

Here is the call graph for this function:

◆ MatrixTranspose()

Matrix * RiseMath::MatrixTranspose ( Matrix * out,
const Matrix * a )
inline

Definition at line 117 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Max()

template<class A, class B>
auto RiseMath::Max ( A first,
B second )
constexpr

Definition at line 16 of file ClientMath.h.

Here is the call graph for this function:

◆ Min()

template<class A, class B>
auto RiseMath::Min ( A first,
B second )
constexpr

Definition at line 15 of file ClientMath.h.

Here is the call graph for this function:

◆ PlaneFromPoints()

Plane * RiseMath::PlaneFromPoints ( Plane * out,
const Vector3 * a,
const Vector3 * b,
const Vector3 * c )
inline

Definition at line 175 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PlaneIntersectLine()

Vector3 * RiseMath::PlaneIntersectLine ( Vector3 * out,
const Plane * plane,
const Vector3 * first,
const Vector3 * second )
inline

Definition at line 191 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PlaneNormalize()

Plane * RiseMath::PlaneNormalize ( Plane * out,
const Plane * a )
inline

Definition at line 180 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ PlaneTransform()

Plane * RiseMath::PlaneTransform ( Plane * out,
const Plane * a,
const Matrix * matrix )
inline

Definition at line 185 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionIdentity()

Quaternion * RiseMath::QuaternionIdentity ( Quaternion * out)
inline

Definition at line 164 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionLength()

float RiseMath::QuaternionLength ( const Quaternion * q)
inline

Definition at line 167 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionMultiply()

Quaternion * RiseMath::QuaternionMultiply ( Quaternion * out,
const Quaternion * a,
const Quaternion * b )
inline

Definition at line 168 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionNormalize()

Quaternion * RiseMath::QuaternionNormalize ( Quaternion * out,
const Quaternion * q )
inline

Definition at line 165 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionRotationYawPitchRoll()

Quaternion * RiseMath::QuaternionRotationYawPitchRoll ( Quaternion * out,
float yaw,
float pitch,
float roll )
inline

Definition at line 169 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ QuaternionSlerp()

Quaternion * RiseMath::QuaternionSlerp ( Quaternion * out,
const Quaternion * a,
const Quaternion * b,
float t )
inline

Definition at line 171 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ToDegree()

template<class T>
auto RiseMath::ToDegree ( T value)
inline

Definition at line 14 of file ClientMath.h.

Here is the call graph for this function:

◆ ToRadian()

template<class T>
auto RiseMath::ToRadian ( T value)
inline

Definition at line 13 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec2Length()

float RiseMath::Vec2Length ( const Vector2 * a)
inline

Definition at line 92 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec2Normalize()

Vector2 * RiseMath::Vec2Normalize ( Vector2 * out,
const Vector2 * a )
inline

Definition at line 101 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec2TransformCoord()

Vector2 * RiseMath::Vec2TransformCoord ( Vector2 * out,
const Vector2 * a,
const Matrix * m )
inline

Definition at line 111 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3Add()

Vector3 * RiseMath::Vec3Add ( Vector3 * out,
const Vector3 * a,
const Vector3 * b )
inline

Definition at line 96 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3BaryCentric()

Vector3 * RiseMath::Vec3BaryCentric ( Vector3 * out,
const Vector3 * a,
const Vector3 * b,
const Vector3 * c,
float u,
float v )
inline

Definition at line 100 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3Cross()

Vector3 * RiseMath::Vec3Cross ( Vector3 * out,
const Vector3 * a,
const Vector3 * b )
inline

Definition at line 105 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Dot()

float RiseMath::Vec3Dot ( const Vector3 * a,
const Vector3 * b )
inline

Definition at line 93 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Length()

float RiseMath::Vec3Length ( const Vector3 * a)
inline

Definition at line 95 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3LengthSq()

float RiseMath::Vec3LengthSq ( const Vector3 * a)
inline

Definition at line 94 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Lerp()

Vector3 * RiseMath::Vec3Lerp ( Vector3 * out,
const Vector3 * a,
const Vector3 * b,
float t )
inline

Definition at line 99 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3Normalize()

Vector3 * RiseMath::Vec3Normalize ( Vector3 * out,
const Vector3 * a )
inline

Definition at line 103 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Project()

template<class Viewport>
Vector3 * RiseMath::Vec3Project ( Vector3 * out,
const Vector3 * value,
const Viewport * viewport,
const Matrix * projection,
const Matrix * view,
const Matrix * world )
inline

Definition at line 222 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3Scale()

Vector3 * RiseMath::Vec3Scale ( Vector3 * out,
const Vector3 * a,
float scale )
inline

Definition at line 98 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Subtract()

Vector3 * RiseMath::Vec3Subtract ( Vector3 * out,
const Vector3 * a,
const Vector3 * b )
inline

Definition at line 97 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3Transform()

Vector4 * RiseMath::Vec3Transform ( Vector4 * out,
const Vector3 * a,
const Matrix * m )
inline

Definition at line 113 of file ClientMath.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Vec3TransformCoord()

Vector3 * RiseMath::Vec3TransformCoord ( Vector3 * out,
const Vector3 * a,
const Matrix * m )
inline

Definition at line 109 of file ClientMath.h.

Here is the call graph for this function:

◆ Vec3TransformNormal()

Vector3 * RiseMath::Vec3TransformNormal ( Vector3 * out,
const Vector3 * a,
const Matrix * m )
inline

Definition at line 107 of file ClientMath.h.

Here is the call graph for this function:

Variable Documentation

◆ HalfPi

float RiseMath::HalfPi =1.570796327f

Definition at line 12 of file ClientMath.h.

◆ Pi

float RiseMath::Pi =3.141592654f
inlineconstexpr

Definition at line 12 of file ClientMath.h.

◆ Tau

float RiseMath::Tau =6.283185307f

Definition at line 12 of file ClientMath.h.