Math.hh 1.47 KB
Newer Older
Robert Menzel's avatar
Robert Menzel committed
1
2
3
4
5
6
7
8
////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2011, Computer Graphics Group RWTH Aachen University         //
// All rights reserved.                                                       //
////////////////////////////////////////////////////////////////////////////////

#ifndef ACGL_MATH_HH
#define ACGL_MATH_HH

Robert Menzel's avatar
Robert Menzel committed
9
10
#include <ACGL/ACGL.hh>

Robert Menzel's avatar
Robert Menzel committed
11
12
13
14
15
/*
 * For our basic vector math we use the GLM library.
 * This library has the advantage that it was designed to mimic the
 * syntax of GLSL for datatypes (vectors, matrices etc.) as well as functions.
 * It also supports swizzling similar to GLSL.
16
17
18
 *
 * Swizzling has to be defined before the glm.hpp gets first included, no not forget
 * this, you should never include glm yourself, but include always our ACGL/Math.hh!
19
20
21
22
 *
 * Pragmas: try to ignore warnings in GLM, so warnings can be activated for ACGL builds
 * and the log does not get flooded with GLM warnings that we can't fix anyway with the
 * risk of not seeing ACGL warnings.
Robert Menzel's avatar
Robert Menzel committed
23
 */
24
25
26
#if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4))
#   pragma GCC diagnostic push
#endif
27
28
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wtype-limits"
Robert Menzel's avatar
Robert Menzel committed
29
30
31
#define GLM_SWIZZL
#include <glm/glm.hpp>
#include <glm/ext.hpp>
32
33
34
35

#if (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 6)) || (__GNUC__ > 4))
#   pragma GCC diagnostic pop
#endif
Robert Menzel's avatar
Robert Menzel committed
36
37
38
39

#include <ACGL/Math/Constants.hh>
#include <ACGL/Math/Functions.hh>

40
#endif // ACGL_MATH_HH