scop
a small 3D object loader
Loading...
Searching...
No Matches
math Class Reference

#include <Math.hpp>

Collaboration diagram for math:

Static Public Member Functions

static vec3 min (const vec3 &a, const vec3 &b)
 
static vec3 max (const vec3 &a, const vec3 &b)
 
static float length (vec3 v)
 
static vec3 normalize (const vec3 &v)
 
static float lerp (float a, float b, float t)
 
static vec3 lerp (const vec3 &a, const vec3 &b, float t)
 
static float radians (float degrees)
 
static float degrees (float radians)
 
static float clamp (float x, float minVal, float maxVal)
 
static mat4 translate (const mat4 &matrix, const vec3 &translation)
 
static mat4 rotate (float angle, const vec3 &axis)
 
static mat4 lookAt (const vec3 &eye, const vec3 &center, const vec3 &up)
 
static mat4 perspective (float fov, float aspectRatio, float near, float far)
 
static vec3 cross (const vec3 &a, const vec3 &b)
 
static quat angleAxis (float angle, const vec3 &axis)
 
static mat4 toMat4 (const quat &q)
 

Detailed Description

Definition at line 322 of file Math.hpp.

Member Function Documentation

◆ angleAxis()

static quat math::angleAxis ( float angle,
const vec3 & axis )
inlinestatic

Definition at line 453 of file Math.hpp.

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

◆ clamp()

static float math::clamp ( float x,
float minVal,
float maxVal )
inlinestatic

Definition at line 358 of file Math.hpp.

◆ cross()

static vec3 math::cross ( const vec3 & a,
const vec3 & b )
inlinestatic

Definition at line 449 of file Math.hpp.

◆ degrees()

static float math::degrees ( float radians)
inlinestatic

Definition at line 354 of file Math.hpp.

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

◆ length()

static float math::length ( vec3 v)
inlinestatic

Definition at line 332 of file Math.hpp.

Here is the caller graph for this function:

◆ lerp() [1/2]

static vec3 math::lerp ( const vec3 & a,
const vec3 & b,
float t )
inlinestatic

Definition at line 346 of file Math.hpp.

◆ lerp() [2/2]

static float math::lerp ( float a,
float b,
float t )
inlinestatic

Definition at line 342 of file Math.hpp.

◆ lookAt()

static mat4 math::lookAt ( const vec3 & eye,
const vec3 & center,
const vec3 & up )
inlinestatic

Definition at line 404 of file Math.hpp.

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

◆ max()

static vec3 math::max ( const vec3 & a,
const vec3 & b )
inlinestatic

Definition at line 328 of file Math.hpp.

◆ min()

static vec3 math::min ( const vec3 & a,
const vec3 & b )
inlinestatic

Definition at line 324 of file Math.hpp.

◆ normalize()

static vec3 math::normalize ( const vec3 & v)
inlinestatic

Definition at line 336 of file Math.hpp.

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

◆ perspective()

static mat4 math::perspective ( float fov,
float aspectRatio,
float near,
float far )
inlinestatic

Definition at line 429 of file Math.hpp.

Here is the caller graph for this function:

◆ radians()

static float math::radians ( float degrees)
inlinestatic

Definition at line 350 of file Math.hpp.

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

◆ rotate()

static mat4 math::rotate ( float angle,
const vec3 & axis )
inlinestatic

Definition at line 378 of file Math.hpp.

◆ toMat4()

static mat4 math::toMat4 ( const quat & q)
inlinestatic

Definition at line 459 of file Math.hpp.

Here is the call graph for this function:

◆ translate()

static mat4 math::translate ( const mat4 & matrix,
const vec3 & translation )
inlinestatic

Definition at line 368 of file Math.hpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following file: