2010-04-29 10:54:07 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
2011-01-20 11:40:14 +00:00
|
|
|
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
2010-04-29 10:54:07 +00:00
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Created : 2005-01-14
|
2011-01-19 12:27:30 +00:00
|
|
|
// Updated : 2011-01-19
|
2010-04-29 10:54:07 +00:00
|
|
|
// Licence : This source is under MIT License
|
|
|
|
// File : glm/glm.hpp
|
|
|
|
///////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef glm_glm
|
|
|
|
#define glm_glm
|
|
|
|
|
2011-01-19 12:27:30 +00:00
|
|
|
//! Workaround for compatibility with other libraries
|
2010-04-29 10:54:07 +00:00
|
|
|
#ifdef max
|
|
|
|
#undef max
|
|
|
|
#endif
|
|
|
|
|
2011-01-19 12:27:30 +00:00
|
|
|
//! Workaround for compatibility with other libraries
|
2010-04-29 10:54:07 +00:00
|
|
|
#ifdef min
|
|
|
|
#undef min
|
|
|
|
#endif
|
|
|
|
|
2011-01-19 12:27:30 +00:00
|
|
|
//! TODO: to delete
|
2010-04-29 10:54:07 +00:00
|
|
|
#define GLMvalType typename genType::value_type
|
2011-02-08 16:03:45 +00:00
|
|
|
//#define GLMcolType typename genType::col_type
|
|
|
|
//#define GLMrowType typename genType::row_type
|
2010-04-29 10:54:07 +00:00
|
|
|
|
|
|
|
#include <cmath>
|
|
|
|
#include <climits>
|
2010-04-29 10:56:52 +00:00
|
|
|
#include <cfloat>
|
2010-04-29 10:54:07 +00:00
|
|
|
#include <limits>
|
|
|
|
#include "./setup.hpp"
|
|
|
|
|
2011-01-19 15:01:17 +00:00
|
|
|
#if(defined(GLM_MESSAGES) && !defined(GLM_MESSAGE_CORE_INCLUDED_DISPLAYED))
|
|
|
|
# define GLM_MESSAGE_CORE_INCLUDED_DISPLAYED
|
|
|
|
# pragma message("GLM: Core library included")
|
2011-01-19 12:27:30 +00:00
|
|
|
#endif//GLM_MESSAGE
|
|
|
|
|
2010-04-29 10:54:07 +00:00
|
|
|
//! GLM namespace, it contains all GLSL based features.
|
|
|
|
namespace glm
|
|
|
|
{
|
|
|
|
namespace test
|
|
|
|
{
|
|
|
|
bool main_bug();
|
|
|
|
bool main_core();
|
|
|
|
}//namespace test
|
|
|
|
|
|
|
|
//! GLM core. Namespace that includes all the feature define by GLSL 1.30.8 specification. This namespace is included in glm namespace.
|
|
|
|
namespace core
|
|
|
|
{
|
|
|
|
//! Scalar, vectors and matrices
|
|
|
|
//! from section 4.1.2 Booleans, 4.1.3 Integers section, 4.1.4 Floats section,
|
|
|
|
//! 4.1.5 Vectors and section 4.1.6 Matrices of GLSL 1.30.8 specification.
|
|
|
|
//! This namespace resolves precision qualifier define in section 4.5 of GLSL 1.30.8 specification.
|
2010-04-30 15:50:05 +00:00
|
|
|
namespace type{}
|
2010-04-29 10:56:52 +00:00
|
|
|
|
2010-04-29 10:54:07 +00:00
|
|
|
//! Some of the functions defined in section 8 Built-in Functions of GLSL 1.30.8 specification.
|
|
|
|
//! Angle and trigonometry, exponential, common, geometric, matrix and vector relational functions.
|
|
|
|
namespace function{}
|
|
|
|
}
|
|
|
|
//namespace core
|
|
|
|
|
2010-04-29 10:56:52 +00:00
|
|
|
//! G-Truc Creation stable extensions.
|
|
|
|
namespace gtc{}
|
2010-04-29 10:54:07 +00:00
|
|
|
|
2010-04-29 10:56:52 +00:00
|
|
|
//! G-Truc Creation experimental extensions.
|
|
|
|
//! The interface could change between releases.
|
2010-04-29 10:54:07 +00:00
|
|
|
namespace gtx{}
|
|
|
|
|
|
|
|
//! VIRTREV extensions.
|
|
|
|
namespace img{}
|
|
|
|
|
|
|
|
} //namespace glm
|
|
|
|
|
|
|
|
#include "./core/_detail.hpp"
|
|
|
|
#include "./core/type.hpp"
|
|
|
|
|
2010-04-29 10:56:52 +00:00
|
|
|
#include "./core/func_trigonometric.hpp"
|
2010-04-29 10:54:07 +00:00
|
|
|
#include "./core/func_exponential.hpp"
|
2010-04-29 10:56:52 +00:00
|
|
|
#include "./core/func_common.hpp"
|
|
|
|
#include "./core/func_packing.hpp"
|
2010-04-29 10:54:07 +00:00
|
|
|
#include "./core/func_geometric.hpp"
|
|
|
|
#include "./core/func_matrix.hpp"
|
|
|
|
#include "./core/func_vector_relational.hpp"
|
2010-04-29 10:56:52 +00:00
|
|
|
#include "./core/func_integer.hpp"
|
2010-04-29 10:54:07 +00:00
|
|
|
#include "./core/func_noise.hpp"
|
|
|
|
#include "./core/_swizzle.hpp"
|
2010-04-29 10:56:52 +00:00
|
|
|
|
2011-01-20 12:16:28 +00:00
|
|
|
namespace glm
|
|
|
|
{
|
|
|
|
using namespace core::type;
|
|
|
|
using namespace core::type::precision;
|
|
|
|
using namespace core::function;
|
|
|
|
} //namespace glm
|
|
|
|
|
2011-01-20 11:01:17 +00:00
|
|
|
////////////////////
|
|
|
|
// check type sizes
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::int8) == 1, "int8 size isn't 1 byte on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::int16) == 2, "int16 size isn't 2 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::int32) == 4, "int32 size isn't 4 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::int64) == 8, "int64 size isn't 8 bytes on this platform");
|
|
|
|
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::uint8) == 1, "uint8 size isn't 1 byte on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::uint16) == 2, "uint16 size isn't 2 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::uint32) == 4, "uint32 size isn't 4 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::uint64) == 8, "uint64 size isn't 8 bytes on this platform");
|
|
|
|
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::float16) == 2, "float16 size isn't 2 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::float32) == 4, "float32 size isn't 4 bytes on this platform");
|
|
|
|
GLM_STATIC_ASSERT(sizeof(glm::detail::float64) == 8, "float64 size isn't 8 bytes on this platform");
|
|
|
|
|
2010-04-29 10:54:07 +00:00
|
|
|
#endif //glm_glm
|