Classes | Macros | Functions
rhino/demo/c/dr_libs/old/dr_math.h File Reference
#include <math.h>
Include dependency graph for rhino/demo/c/dr_libs/old/dr_math.h:

Go to the source code of this file.

Classes

struct  mat4
 
struct  quat
 
struct  transform_t
 
struct  vec2
 
struct  vec3
 
struct  vec4
 

Macros

#define DR_MATHCALL   static inline
 
#define DR_PI   3.14159265358979323846
 
#define DR_PIF   3.14159265358979323846f
 

Functions

DR_MATHCALL float dr_degrees (float radians)
 
DR_MATHCALL float dr_radians (float degrees)
 
DR_MATHCALL mat4 mat4_identity ()
 
DR_MATHCALL mat4 mat4_mul (mat4 a, mat4 b)
 
DR_MATHCALL vec4 mat4_mul_vec4 (mat4 m, vec4 v)
 
DR_MATHCALL mat4 mat4_ortho (float left, float right, float bottom, float top, float znear, float zfar)
 
DR_MATHCALL mat4 mat4_perspective (float fovy, float aspect, float znear, float zfar)
 
DR_MATHCALL mat4 mat4_rotate (float angleInRadians, vec3 axis)
 
DR_MATHCALL mat4 mat4_scale (vec3 scale)
 
DR_MATHCALL mat4 mat4_translate (vec3 translation)
 
DR_MATHCALL mat4 mat4_vulkan_clip_correction ()
 
DR_MATHCALL mat4 mat4f (vec4 col0, vec4 col1, vec4 col2, vec4 col3)
 
DR_MATHCALL quat quat_identity ()
 
DR_MATHCALL quat quatf (float x, float y, float z, float w)
 
DR_MATHCALL quat quatv (const float *v)
 
DR_MATHCALL transform_t transform_identity ()
 
DR_MATHCALL transform_t transform_init (vec3 position, quat rotation, vec3 scale)
 
DR_MATHCALL transform_t transform_translate (transform_t transform, vec3 offset)
 
DR_MATHCALL vec2 vec2_add (vec2 a, vec2 b)
 
DR_MATHCALL float vec2_angle (vec2 a, vec2 b)
 
DR_MATHCALL vec2 vec2_div (vec2 a, vec2 b)
 
DR_MATHCALL float vec2_dot (vec2 a, vec2 b)
 
DR_MATHCALL float vec2_length (vec2 a)
 
DR_MATHCALL float vec2_length2 (vec2 a)
 
DR_MATHCALL vec2 vec2_mul (vec2 a, vec2 b)
 
DR_MATHCALL vec2 vec2_mul_1f (vec2 a, float x)
 
DR_MATHCALL vec2 vec2_normalize (vec2 a)
 
DR_MATHCALL vec2 vec2_one ()
 
DR_MATHCALL vec2 vec2_rotate (vec2 a, float angleInRadians)
 
DR_MATHCALL vec2 vec2_sub (vec2 a, vec2 b)
 
DR_MATHCALL vec2 vec2_zero ()
 
DR_MATHCALL vec2 vec2f (float x, float y)
 
DR_MATHCALL vec2 vec2v (const float *v)
 
DR_MATHCALL vec3 vec3_add (vec3 a, vec3 b)
 
DR_MATHCALL vec3 vec3_cross (vec3 a, vec3 b)
 
DR_MATHCALL vec3 vec3_div (vec3 a, vec3 b)
 
DR_MATHCALL float vec3_dot (vec3 a, vec3 b)
 
DR_MATHCALL float vec3_length (vec3 a)
 
DR_MATHCALL float vec3_length2 (vec3 a)
 
DR_MATHCALL vec3 vec3_mul (vec3 a, vec3 b)
 
DR_MATHCALL vec3 vec3_mul_1f (vec3 a, float x)
 
DR_MATHCALL vec3 vec3_normalize (vec3 a)
 
DR_MATHCALL vec3 vec3_one ()
 
DR_MATHCALL vec3 vec3_sub (vec3 a, vec3 b)
 
DR_MATHCALL vec3 vec3_triangle_normal (vec3 p1, vec3 p2, vec3 p3)
 
DR_MATHCALL vec3 vec3_zero ()
 
DR_MATHCALL vec3 vec3f (float x, float y, float z)
 
DR_MATHCALL vec3 vec3v (const float *v)
 
DR_MATHCALL vec4 vec4_add (vec4 a, vec4 b)
 
DR_MATHCALL vec4 vec4_div (vec4 a, vec4 b)
 
DR_MATHCALL vec4 vec4_mul (vec4 a, vec4 b)
 
DR_MATHCALL vec4 vec4_mul_1f (vec4 a, float x)
 
DR_MATHCALL vec4 vec4_mul_mat4 (vec4 v, mat4 m)
 
DR_MATHCALL vec4 vec4_one ()
 
DR_MATHCALL vec4 vec4_sub (vec4 a, vec4 b)
 
DR_MATHCALL vec4 vec4_zero ()
 
DR_MATHCALL vec4 vec4f (float x, float y, float z, float w)
 
DR_MATHCALL vec4 vec4v (const float *v)
 

Macro Definition Documentation

◆ DR_MATHCALL

#define DR_MATHCALL   static inline

Definition at line 23 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ DR_PI

#define DR_PI   3.14159265358979323846

Definition at line 26 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ DR_PIF

#define DR_PIF   3.14159265358979323846f

Definition at line 27 of file rhino/demo/c/dr_libs/old/dr_math.h.

Function Documentation

◆ dr_degrees()

DR_MATHCALL float dr_degrees ( float  radians)

Definition at line 69 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ dr_radians()

DR_MATHCALL float dr_radians ( float  degrees)

Definition at line 75 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_identity()

DR_MATHCALL mat4 mat4_identity ( )

Definition at line 378 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_mul()

DR_MATHCALL mat4 mat4_mul ( mat4  a,
mat4  b 
)

Definition at line 484 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_mul_vec4()

DR_MATHCALL vec4 mat4_mul_vec4 ( mat4  m,
vec4  v 
)

Definition at line 528 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_ortho()

DR_MATHCALL mat4 mat4_ortho ( float  left,
float  right,
float  bottom,
float  top,
float  znear,
float  zfar 
)

Definition at line 389 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_perspective()

DR_MATHCALL mat4 mat4_perspective ( float  fovy,
float  aspect,
float  znear,
float  zfar 
)

Definition at line 408 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_rotate()

DR_MATHCALL mat4 mat4_rotate ( float  angleInRadians,
vec3  axis 
)

Definition at line 443 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_scale()

DR_MATHCALL mat4 mat4_scale ( vec3  scale)

Definition at line 472 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_translate()

DR_MATHCALL mat4 mat4_translate ( vec3  translation)

Definition at line 432 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4_vulkan_clip_correction()

DR_MATHCALL mat4 mat4_vulkan_clip_correction ( )

Definition at line 421 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ mat4f()

DR_MATHCALL mat4 mat4f ( vec4  col0,
vec4  col1,
vec4  col2,
vec4  col3 
)

Definition at line 367 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ quat_identity()

DR_MATHCALL quat quat_identity ( )

Definition at line 565 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ quatf()

DR_MATHCALL quat quatf ( float  x,
float  y,
float  z,
float  w 
)

Definition at line 550 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ quatv()

DR_MATHCALL quat quatv ( const float *  v)

Definition at line 560 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ transform_identity()

DR_MATHCALL transform_t transform_identity ( )

Definition at line 597 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ transform_init()

DR_MATHCALL transform_t transform_init ( vec3  position,
quat  rotation,
vec3  scale 
)

Definition at line 587 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ transform_translate()

DR_MATHCALL transform_t transform_translate ( transform_t  transform,
vec3  offset 
)

Definition at line 608 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_add()

DR_MATHCALL vec2 vec2_add ( vec2  a,
vec2  b 
)

Definition at line 289 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_angle()

DR_MATHCALL float vec2_angle ( vec2  a,
vec2  b 
)

Definition at line 344 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_div()

DR_MATHCALL vec2 vec2_div ( vec2  a,
vec2  b 
)

Definition at line 310 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_dot()

DR_MATHCALL float vec2_dot ( vec2  a,
vec2  b 
)

Definition at line 316 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_length()

DR_MATHCALL float vec2_length ( vec2  a)

Definition at line 327 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_length2()

DR_MATHCALL float vec2_length2 ( vec2  a)

Definition at line 322 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_mul()

DR_MATHCALL vec2 vec2_mul ( vec2  a,
vec2  b 
)

Definition at line 300 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_mul_1f()

DR_MATHCALL vec2 vec2_mul_1f ( vec2  a,
float  x 
)

Definition at line 304 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_normalize()

DR_MATHCALL vec2 vec2_normalize ( vec2  a)

Definition at line 333 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_one()

DR_MATHCALL vec2 vec2_one ( )

Definition at line 283 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_rotate()

DR_MATHCALL vec2 vec2_rotate ( vec2  a,
float  angleInRadians 
)

Definition at line 349 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_sub()

DR_MATHCALL vec2 vec2_sub ( vec2  a,
vec2  b 
)

Definition at line 294 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2_zero()

DR_MATHCALL vec2 vec2_zero ( )

Definition at line 279 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2f()

DR_MATHCALL vec2 vec2f ( float  x,
float  y 
)

Definition at line 267 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec2v()

DR_MATHCALL vec2 vec2v ( const float *  v)

Definition at line 275 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_add()

DR_MATHCALL vec3 vec3_add ( vec3  a,
vec3  b 
)

Definition at line 187 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_cross()

DR_MATHCALL vec3 vec3_cross ( vec3  a,
vec3  b 
)

Definition at line 242 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_div()

DR_MATHCALL vec3 vec3_div ( vec3  a,
vec3  b 
)

Definition at line 208 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_dot()

DR_MATHCALL float vec3_dot ( vec3  a,
vec3  b 
)

Definition at line 214 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_length()

DR_MATHCALL float vec3_length ( vec3  a)

Definition at line 225 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_length2()

DR_MATHCALL float vec3_length2 ( vec3  a)

Definition at line 220 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_mul()

DR_MATHCALL vec3 vec3_mul ( vec3  a,
vec3  b 
)

Definition at line 198 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_mul_1f()

DR_MATHCALL vec3 vec3_mul_1f ( vec3  a,
float  x 
)

Definition at line 202 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_normalize()

DR_MATHCALL vec3 vec3_normalize ( vec3  a)

Definition at line 231 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_one()

DR_MATHCALL vec3 vec3_one ( )

Definition at line 181 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_sub()

DR_MATHCALL vec3 vec3_sub ( vec3  a,
vec3  b 
)

Definition at line 192 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_triangle_normal()

DR_MATHCALL vec3 vec3_triangle_normal ( vec3  p1,
vec3  p2,
vec3  p3 
)

Definition at line 252 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3_zero()

DR_MATHCALL vec3 vec3_zero ( )

Definition at line 177 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3f()

DR_MATHCALL vec3 vec3f ( float  x,
float  y,
float  z 
)

Definition at line 164 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec3v()

DR_MATHCALL vec3 vec3v ( const float *  v)

Definition at line 173 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_add()

DR_MATHCALL vec4 vec4_add ( vec4  a,
vec4  b 
)

Definition at line 113 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_div()

DR_MATHCALL vec4 vec4_div ( vec4  a,
vec4  b 
)

Definition at line 148 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_mul()

DR_MATHCALL vec4 vec4_mul ( vec4  a,
vec4  b 
)

Definition at line 124 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_mul_1f()

DR_MATHCALL vec4 vec4_mul_1f ( vec4  a,
float  x 
)

Definition at line 128 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_mul_mat4()

DR_MATHCALL vec4 vec4_mul_mat4 ( vec4  v,
mat4  m 
)

Definition at line 132 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_one()

DR_MATHCALL vec4 vec4_one ( )

Definition at line 106 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_sub()

DR_MATHCALL vec4 vec4_sub ( vec4  a,
vec4  b 
)

Definition at line 118 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4_zero()

DR_MATHCALL vec4 vec4_zero ( )

Definition at line 102 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4f()

DR_MATHCALL vec4 vec4f ( float  x,
float  y,
float  z,
float  w 
)

Definition at line 88 of file rhino/demo/c/dr_libs/old/dr_math.h.

◆ vec4v()

DR_MATHCALL vec4 vec4v ( const float *  v)

Definition at line 98 of file rhino/demo/c/dr_libs/old/dr_math.h.



picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:57