Math.hh 1.32 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
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wunused-parameter"
#pragma GCC diagnostic ignored "-Wtype-limits"
Robert Menzel's avatar
Robert Menzel committed
27
28
29
#define GLM_SWIZZL
#include <glm/glm.hpp>
#include <glm/ext.hpp>
30
#pragma GCC diagnostic pop
Robert Menzel's avatar
Robert Menzel committed
31
32
33
34

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

35
#endif // ACGL_MATH_HH