Commit 00b79d73 authored by Philip Trettner's avatar Philip Trettner
Browse files

Merge branch 'master' of dawes.informatik.rwth-aachen.de:/data/git-repository/acgl/libraries/acgl

parents fe00ab5c 0f7c9ed5
...@@ -5,6 +5,27 @@ ...@@ -5,6 +5,27 @@
# #
CMAKE_MINIMUM_REQUIRED (VERSION 2.6) CMAKE_MINIMUM_REQUIRED (VERSION 2.6)
################################################################################
# Macro to sort acgl into directories
################################################################################
MACRO (RECURSE_GROUPS dirname)
FILE(GLOB_RECURSE allfiles "${dirname}/*.*")
SET(ALL_FILES ${ALL_FILES} ${allfiles})
STRING(REGEX REPLACE ".*/([^/]*)" "\\1" maindir "${dirname}")
FOREACH(file ${allfiles})
STRING(REGEX REPLACE "${dirname}/(.*)/[^/]*" "\\1" loopdirname "${file}")
STRING(REGEX REPLACE "/" "\\\\" loopdirname "${loopdirname}")
IF(NOT "${file}" MATCHES "${dirname}/(.*)/[^/]*")
source_group("${maindir}" FILES ${file})
ELSE()
source_group("${maindir}\\${loopdirname}" FILES ${file})
ENDIF()
ENDFOREACH()
ENDMACRO (RECURSE_GROUPS)
################################################################################ ################################################################################
# Global Settings # Global Settings
################################################################################ ################################################################################
......
...@@ -12,6 +12,9 @@ FILE(GLOB_RECURSE SOURCE_FILES_CPP "${ACGL_BASE_DIR}/src/*.cpp") ...@@ -12,6 +12,9 @@ FILE(GLOB_RECURSE SOURCE_FILES_CPP "${ACGL_BASE_DIR}/src/*.cpp")
FILE(GLOB_RECURSE HEADER_FILES_H "${ACGL_BASE_DIR}/include/*.h") FILE(GLOB_RECURSE HEADER_FILES_H "${ACGL_BASE_DIR}/include/*.h")
FILE(GLOB_RECURSE HEADER_FILES_HH "${ACGL_BASE_DIR}/include/*.hh") FILE(GLOB_RECURSE HEADER_FILES_HH "${ACGL_BASE_DIR}/include/*.hh")
FILE(GLOB_RECURSE HEADER_FILES_HPP "${ACGL_BASE_DIR}/include/*.hpp") FILE(GLOB_RECURSE HEADER_FILES_HPP "${ACGL_BASE_DIR}/include/*.hpp")
#group files in msvc
RECURSE_GROUPS ("${ACGL_BASE_DIR}/include")
RECURSE_GROUPS ("${ACGL_BASE_DIR}/src")
SET(HEADER_FILES ${HEADER_FILES} ${HEADER_FILES_H} ${HEADER_FILES_HH} ${HEADER_FILES_HPP}) SET(HEADER_FILES ${HEADER_FILES} ${HEADER_FILES_H} ${HEADER_FILES_HH} ${HEADER_FILES_HPP})
SET(SOURCE_FILES ${SOURCE_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CC} ${SOURCE_FILES_CPP}) SET(SOURCE_FILES ${SOURCE_FILES} ${SOURCE_FILES_C} ${SOURCE_FILES_CC} ${SOURCE_FILES_CPP})
...@@ -28,3 +31,7 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES debug) ...@@ -28,3 +31,7 @@ ENDIF(CMAKE_BUILD_TYPE MATCHES debug)
IF(CMAKE_BUILD_TYPE MATCHES DEBUG) IF(CMAKE_BUILD_TYPE MATCHES DEBUG)
ADD_DEFINITIONS(-DDEBUG) ADD_DEFINITIONS(-DDEBUG)
ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG) ENDIF(CMAKE_BUILD_TYPE MATCHES DEBUG)
IF(WIN32)
ADD_DEFINITIONS(-DWIN32)
ENDIF(WIN32)
...@@ -112,7 +112,7 @@ public: ...@@ -112,7 +112,7 @@ public:
glm::vec4 getChromAbParam(); glm::vec4 getChromAbParam();
//! the full physical screen resolution, offscreen rendering should get performed at a higher resolution! //! the full physical screen resolution, offscreen rendering should get performed at a higher resolution!
//! 'full' means it's the size used fpr both eyes! //! 'full' means it's the size used for both eyes!
glm::uvec2 getPhysicalScreenResolution(); glm::uvec2 getPhysicalScreenResolution();
//! returns the stereo projection from the stored camera adjusted for the rift //! returns the stereo projection from the stored camera adjusted for the rift
......
...@@ -44,6 +44,8 @@ ...@@ -44,6 +44,8 @@
// gcc >= 4.6: // gcc >= 4.6:
# pragma GCC diagnostic push # pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wtype-limits" # pragma GCC diagnostic ignored "-Wtype-limits"
# pragma GCC diagnostic ignored "-Wunused-but-set-variable"
# pragma GCC diagnostic ignored "-Wstrict-aliasing"
# endif # endif
// gcc: // gcc:
# pragma GCC diagnostic ignored "-Wunused-parameter" # pragma GCC diagnostic ignored "-Wunused-parameter"
...@@ -51,8 +53,10 @@ ...@@ -51,8 +53,10 @@
// //
///////////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////////
#define GLM_FORCE_RADIANS
#include <glm/glm.hpp> #include <glm/glm.hpp>
#include <glm/gtx/transform.hpp>
#include <glm/ext.hpp> #include <glm/ext.hpp>
......
...@@ -4,6 +4,8 @@ ...@@ -4,6 +4,8 @@
* Distributed under the terms of the MIT License (see LICENSE.TXT). * * Distributed under the terms of the MIT License (see LICENSE.TXT). *
**********************************************************************/ **********************************************************************/
#ifdef ACGL_INCLUDE_UNSUPPORTED
#ifndef ACGL_SCENE_COORDINATESYSTEM_HH #ifndef ACGL_SCENE_COORDINATESYSTEM_HH
#define ACGL_SCENE_COORDINATESYSTEM_HH #define ACGL_SCENE_COORDINATESYSTEM_HH
...@@ -66,3 +68,5 @@ private: ...@@ -66,3 +68,5 @@ private:
} // ACGL } // ACGL
#endif // ACGL_SCENE_COORDINATESYSTEM_HH #endif // ACGL_SCENE_COORDINATESYSTEM_HH
#endif
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include <glm/gtx/quaternion.hpp> #include <glm/gtx/quaternion.hpp>
#include "CameraBase.hh" #include "CameraBase.hh"
#include "MoveableObject.hh"
/* /*
* What you definitly want to set: * What you definitly want to set:
...@@ -48,7 +49,7 @@ ...@@ -48,7 +49,7 @@
namespace ACGL{ namespace ACGL{
namespace Scene{ namespace Scene{
class GenericCamera : public CameraBase class GenericCamera : public CameraBase, public MoveableObject
{ {
public: public:
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
...@@ -220,22 +221,8 @@ class GenericCamera : public CameraBase ...@@ -220,22 +221,8 @@ class GenericCamera : public CameraBase
// actually used. // actually used.
// //
/// Gets the orthonormal rotation matrix (mat3) /// forward to MovableObject to implement the full CameraBase interface:
const glm::mat3 &getRotationMatrix3() const { return mRotationMatrix; } glm::vec3 getPosition() const { return MoveableObject::getPosition(); }
/// Gets the inverse orthonormal rotation matrix (mat3)
glm::mat3 getInverseRotationMatrix3() const { return glm::transpose(mRotationMatrix); }
/// Gets the orthonormal rotation matrix as a mat4
glm::mat4 getRotationMatrix4() const { return glm::mat4(mRotationMatrix); }
/// Sets the rotation matrix (mat3)
void setRotationMatrix( glm::mat3 _matrix );
/// Sets the rotation matrix (mat3-part of a mat4)
void setRotationMatrix( glm::mat4 _matrix );
/// Sets the complete camera lookat (position and rotation)
void setLookAtMatrix( const glm::vec3 &_position, const glm::vec3 &_target, const glm::vec3 &_up );
/// Gets the translation matrix of this camera
glm::mat4 getTranslationMatrix4() const;
/////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////
// //
...@@ -302,51 +289,6 @@ class GenericCamera : public CameraBase ...@@ -302,51 +289,6 @@ class GenericCamera : public CameraBase
// //
/////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Set the position of the camera.
* @param _position New position of the camera.
*/
void setPosition( const glm::vec3 &_position ) { mPosition = _position; }
virtual glm::vec3 getPosition() const { return mPosition; }
/// Moves the camera by a given vector (in eyespace)
void move( const glm::vec3 &_vector );
void moveRight( float _distance ) { move( glm::vec3(_distance,0,0) ); }
void moveBack( float _distance ) { move( glm::vec3(0,0,_distance) ); }
void moveUp( float _distance ) { move( glm::vec3(0,_distance,0) ); }
void moveLeft( float _distance ) { move( glm::vec3(-_distance,0,0) ); }
void moveForward( float _distance ) { move( glm::vec3(0,0,-_distance) ); }
void moveDown( float _distance ) { move( glm::vec3(0,-_distance,0) ); }
/**
* Set the distance of the camera to the object we're looking at.
* Will change the target!
* @param _distance New focal distance of the camera.
*/
void setLookAtDistance( float _distance );
/// Gets the look-at distance
float getLookAtDistance() const { return mLookAtDistance; }
/// Will change the look at distance!
/// Will change the rotation!
/// Uses stored up-vector as reference
void setTarget( const glm::vec3 &_target ) { setTarget(_target, getUpDirection()); }
/// Will change the look at distance!
/// Will change the rotation!
/// Uses given up-vector as reference
void setTarget( const glm::vec3 &_target, const glm::vec3 &_up );
/// Gets the reconstructed target
glm::vec3 getTarget() const { return mPosition + getForwardDirection() * getLookAtDistance(); }
/// Get the unit up direction
glm::vec3 getUpDirection () const;
/// Get the unit right direction
glm::vec3 getRightDirection () const;
/// Get the unit forward direction
glm::vec3 getForwardDirection() const;
/** /**
* Look around with a mouse, works like a FPS camera: * Look around with a mouse, works like a FPS camera:
* No roll possible. * No roll possible.
...@@ -364,13 +306,6 @@ class GenericCamera : public CameraBase ...@@ -364,13 +306,6 @@ class GenericCamera : public CameraBase
/// States: update the storeStateToString() & setStateFromString() functions whenever adding a new state! /// States: update the storeStateToString() & setStateFromString() functions whenever adding a new state!
/// ///
/// Current camera position
glm::vec3 mPosition;
/// Current camera rotation
glm::mat3 mRotationMatrix;
/// Current camera projection mode /// Current camera projection mode
ProjectionMode mProjectionMode; ProjectionMode mProjectionMode;
/// stereo view mode /// stereo view mode
...@@ -392,9 +327,6 @@ class GenericCamera : public CameraBase ...@@ -392,9 +327,6 @@ class GenericCamera : public CameraBase
/// Current camera far clipping plane /// Current camera far clipping plane
float mFarClippingPlane; float mFarClippingPlane;
/// Current camera focal distance
float mLookAtDistance;
/// viewport in pixel: /// viewport in pixel:
glm::uvec2 mViewportSize; glm::uvec2 mViewportSize;
}; };
......
/***********************************************************************
* Copyright 2014 Computer Graphics Group RWTH Aachen University. *
* All rights reserved. *
* Distributed under the terms of the MIT License (see LICENSE.TXT). *
**********************************************************************/
/*
* A moveable object is an interface for something that can be moved around and has an orientation.
* This means it has access functions for a modelmatrix containing a position and orientation as
* well as just getting the position or the rotation.
* It can be moved relative to its own orientation.
*
*
* ModelMatrix = Rotation * Translation
* ( it is translated in space and then rotated around that spot )
*
*/
#pragma once
#include <ACGL/ACGL.hh>
#include <ACGL/Math/Math.hh>
#include <glm/gtx/quaternion.hpp>
namespace ACGL{
namespace Scene{
class MoveableObject
{
public:
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Constructor / Destructor / save&store
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Default Constructor.
*/
MoveableObject();
/**
* Destructor.
*/
virtual ~MoveableObject() {}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Set / Get the matrices:
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////////////////
//
// Generic rotation and translation matrices.
//
/// Gets the orthonormal rotation matrix (mat3)
const glm::mat3 &getRotationMatrix3() const { return mRotationMatrix; }
/// Gets the inverse orthonormal rotation matrix (mat3)
glm::mat3 getInverseRotationMatrix3() const { return glm::transpose(mRotationMatrix); }
/// Gets the orthonormal rotation matrix as a mat4
glm::mat4 getRotationMatrix4() const { return glm::mat4(mRotationMatrix); }
/// Sets the rotation matrix (mat3)
void setRotationMatrix( glm::mat3 _matrix );
/// Sets the rotation matrix (mat3-part of a mat4)
void setRotationMatrix( glm::mat4 _matrix );
/// Sets the complete lookat (position and rotation)
void setLookAtMatrix( const glm::vec3 &_position, const glm::vec3 &_target, const glm::vec3 &_up );
/// Gets the translation matrix of this object (no rotational element)
glm::mat4 getTranslationMatrix4() const;
///////////////////////////////////////////////////////////////////////////////////////////
//
// Generic model matrices.
//
/// Gets the currently active view matrix (depends on stereo mode and current eye)
glm::mat4 getModelMatrix() const;
/// Gets the currently active view matrix (depends on stereo mode and current eye)
glm::mat4 getInverseModelMatrix() const;
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// Set / Get properties that move the object around (or rotate etc.)
//
///////////////////////////////////////////////////////////////////////////////////////////////////////////////
/**
* Set the position of the camera.
* @param _position New position of the object.
*/
void setPosition( const glm::vec3 &_position ) { mPosition = _position; }
glm::vec3 getPosition() const { return mPosition; }
/// Moves the object by a given vector (relative to own orientation)
void move( const glm::vec3 &_vector );
void moveRight( float _distance ) { move( glm::vec3(_distance,0,0) ); }
void moveBack( float _distance ) { move( glm::vec3(0,0,_distance) ); }
void moveUp( float _distance ) { move( glm::vec3(0,_distance,0) ); }
void moveLeft( float _distance ) { move( glm::vec3(-_distance,0,0) ); }
void moveForward( float _distance ) { move( glm::vec3(0,0,-_distance) ); }
void moveDown( float _distance ) { move( glm::vec3(0,-_distance,0) ); }
/**
* Set the distance of the object to the object it's looking at.
* Will change the target!
* @param _distance New distance of the object this is pointed at.
*/
void setLookAtDistance( float _distance );
/// Gets the look-at distance
float getLookAtDistance() const { return mLookAtDistance; }
/// Will change the look at distance!
/// Will change the rotation!
/// Uses stored up-vector as reference
void setTarget( const glm::vec3 &_target ) { setTarget(_target, getUpDirection()); }
/// Will change the look at distance!
/// Will change the rotation!
/// Uses given up-vector as reference
void setTarget( const glm::vec3 &_target, const glm::vec3 &_up );
/// Gets the reconstructed target
glm::vec3 getTarget() const { return mPosition + getForwardDirection() * getLookAtDistance(); }
/// Get the unit up direction
glm::vec3 getUpDirection () const;
/// Get the unit right direction
glm::vec3 getRightDirection () const;
/// Get the unit forward direction
glm::vec3 getForwardDirection() const;
protected:
/// Current position
glm::vec3 mPosition;
/// Current rotation
glm::mat3 mRotationMatrix;
/// might be used later to rotate around this position:
float mLookAtDistance;
};
} // Scene
} // ACGL
set(NAME glm) set(NAME glm_dummy)
file(GLOB ROOT_SOURCE *.cpp) file(GLOB ROOT_SOURCE *.cpp)
file(GLOB ROOT_INLINE *.inl) file(GLOB ROOT_INLINE *.inl)
file(GLOB ROOT_HEADER *.hpp) file(GLOB ROOT_HEADER *.hpp)
file(GLOB ROOT_TEXT ../*.txt)
file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp) file(GLOB_RECURSE CORE_SOURCE ./detail/*.cpp)
file(GLOB_RECURSE CORE_INLINE ./core/*.inl) file(GLOB_RECURSE CORE_INLINE ./detail/*.inl)
file(GLOB_RECURSE CORE_HEADER ./core/*.hpp) file(GLOB_RECURSE CORE_HEADER ./detail/*.hpp)
file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp) file(GLOB_RECURSE GTC_SOURCE ./gtc/*.cpp)
file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl) file(GLOB_RECURSE GTC_INLINE ./gtc/*.inl)
...@@ -16,10 +17,7 @@ file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp) ...@@ -16,10 +17,7 @@ file(GLOB_RECURSE GTX_SOURCE ./gtx/*.cpp)
file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl) file(GLOB_RECURSE GTX_INLINE ./gtx/*.inl)
file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp) file(GLOB_RECURSE GTX_HEADER ./gtx/*.hpp)
file(GLOB_RECURSE VIRTREV_SOURCE ./virtrev/*.cpp) source_group("Text Files" FILES ${ROOT_TEXT})
file(GLOB_RECURSE VIRTREV_INLINE ./virtrev/*.inl)
file(GLOB_RECURSE VIRTREV_HEADER ./virtrev/*.hpp)
source_group("Core Files" FILES ${CORE_SOURCE}) source_group("Core Files" FILES ${CORE_SOURCE})
source_group("Core Files" FILES ${CORE_INLINE}) source_group("Core Files" FILES ${CORE_INLINE})
source_group("Core Files" FILES ${CORE_HEADER}) source_group("Core Files" FILES ${CORE_HEADER})
...@@ -29,15 +27,14 @@ source_group("GTC Files" FILES ${GTC_HEADER}) ...@@ -29,15 +27,14 @@ source_group("GTC Files" FILES ${GTC_HEADER})
source_group("GTX Files" FILES ${GTX_SOURCE}) source_group("GTX Files" FILES ${GTX_SOURCE})
source_group("GTX Files" FILES ${GTX_INLINE}) source_group("GTX Files" FILES ${GTX_INLINE})
source_group("GTX Files" FILES ${GTX_HEADER}) source_group("GTX Files" FILES ${GTX_HEADER})
source_group("VIRTREV Files" FILES ${VIRTREV_SOURCE})
source_group("VIRTREV Files" FILES ${VIRTREV_INLINE})
source_group("VIRTREV Files" FILES ${VIRTREV_HEADER})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..)
add_executable(${NAME} add_executable(${NAME} ${ROOT_TEXT}
${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER} ${ROOT_SOURCE} ${ROOT_INLINE} ${ROOT_HEADER}
${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER} ${CORE_SOURCE} ${CORE_INLINE} ${CORE_HEADER}
${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER} ${GTC_SOURCE} ${GTC_INLINE} ${GTC_HEADER}
${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER} ${GTX_SOURCE} ${GTX_INLINE} ${GTX_HEADER})
${VIRTREV_SOURCE} ${VIRTREV_INLINE} ${VIRTREV_HEADER})
#add_library(glm STATIC glm.cpp)
#add_library(glm_shared SHARED glm.cpp)
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net) /// OpenGL Mathematics (glm.g-truc.net)
/// ///
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net) /// Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy /// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal /// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights /// in the Software without restriction, including without limitation the rights
...@@ -21,21 +21,14 @@ ...@@ -21,21 +21,14 @@
/// THE SOFTWARE. /// THE SOFTWARE.
/// ///
/// @ref core /// @ref core
/// @file glm/core/type_mat.hpp /// @file glm/common.hpp
/// @date 2010-01-26 / 2011-06-15 /// @date 2013-12-24 / 2013-12-24
/// @author Christophe Riccio /// @author Christophe Riccio
/////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_type_mat #ifndef GLM_COMMON_INCLUDED
#define glm_core_type_mat #define GLM_COMMON_INCLUDED
#include "type_gentype.hpp" #include "detail/func_common.hpp"
namespace glm{ #endif//GLM_COMMON_INCLUDED
namespace detail
{
}//namespace detail
}//namespace glm
#endif//glm_core_type_mat
///////////////////////////////////////////////////////////////////////////////////
/// OpenGL Mathematics (glm.g-truc.net)
///
/// Copyright (c) 2005 - 2013 G-Truc Creation (www.g-truc.net)
/// Permission is hereby granted, free of charge, to any person obtaining a copy
/// of this software and associated documentation files (the "Software"), to deal
/// in the Software without restriction, including without limitation the rights
/// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
/// copies of the Software, and to permit persons to whom the Software is
/// furnished to do so, subject to the following conditions:
///
/// The above copyright notice and this permission notice shall be included in
/// all copies or substantial portions of the Software.
///
/// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
/// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
/// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
/// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
/// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
/// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
/// THE SOFTWARE.
///
/// @ref core
/// @file glm/core/_detail.hpp
/// @date 2008-07-24 / 2011-06-14
/// @author Christophe Riccio
///////////////////////////////////////////////////////////////////////////////////
#ifndef glm_core_detail
#define glm_core_detail
#include "setup.hpp"
#include <cassert>
#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L))
#include <cstdint>
#endif
namespace glm{
namespace detail
{
class half;
#if(defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)) // C99 detected, 64 bit types available
typedef int64_t sint64;
typedef uint64_t uint64;
#elif(GLM_COMPILER & GLM_COMPILER_VC)
typedef signed __int64 sint64;
typedef unsigned __int64 uint64;
#elif(GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC | GLM_COMPILER_CLANG))
__extension__ typedef signed long long sint64;
__extension__ typedef unsigned long long uint64;
#elif(GLM_COMPILER & GLM_COMPILER_BC)
typedef Int64 sint64;
typedef Uint64 uint64;
#else//unknown compiler
typedef signed long long sint64;
typedef unsigned long long uint64;
#endif//GLM_COMPILER
template<bool C>
struct If
{
template<typename F, typename T>
static GLM_FUNC_QUALIFIER T apply(F functor, const T& val)
{
return functor(val);
}
};
template<>
struct If<false>
{
template<typename F, typename T>
static GLM_FUNC_QUALIFIER T apply(F, const T& val)
{
return val;
}
};
//template <typename T>
//struct traits
//{
// static const bool is_signed = false;