The Dirtchamber
A mixed reality testing environment for real-time global illumination algorithms
math_tools.h
Go to the documentation of this file.
1 /*
2  * Dune D3D library - Tobias Alexander Franke 2011
3  * For copyright and license see LICENSE
4  * http://www.tobias-franke.eu
5  */
6 
9 #ifndef DUNE_MATH_TOOLS
10 #define DUNE_MATH_TOOLS
11 
12 #include <DirectXMath.h>
13 
14 namespace dune
15 {
16  const float PI = 3.1415926f;
17  const float DEG_TO_RAD = PI/180.f;
18 
20  float halton(int index, int base);
21  DirectX::XMMATRIX make_projection(float z_near, float z_far);
22 
24  namespace approx
25  {
26  inline double sin(double x);
27  inline double exp(double x);
28  }
29 
31  namespace pbrt
32  {
33  DirectX::XMMATRIX translate(float x, float y, float z);
34  DirectX::XMMATRIX rotate(float angle, float x, float y, float z);
35  }
36 }
37 
38 #endif
float halton(int index, int base)
Get a number of the Halton sequence.
Definition: math_tools.cpp:15