parent
631c13ad84
commit
7566152ba0
16 changed files with 0 additions and 539 deletions
@ -1,33 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2009-04-29
|
||||
// Updated : 2009-04-29
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtc/matrix_operation.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtc_matrix_operation |
||||
#define glm_gtc_matrix_operation |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
|
||||
namespace glm{ |
||||
namespace gtc{ |
||||
//! GLM_GTC_matrix_operation extension: Matrix operation functions
|
||||
namespace matrix_operation |
||||
{ |
||||
|
||||
}//namespace matrix_operation
|
||||
}//namespace gtc
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_operation.inl" |
||||
|
||||
namespace glm{using namespace gtc::matrix_operation;} |
||||
|
||||
#endif//glm_gtc_matrix_operation
|
@ -1,17 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2009-04-29 |
||||
// Updated : 2009-04-29 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtc/matrix_operation.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm{ |
||||
namespace gtc{ |
||||
namespace matrix_operation |
||||
{ |
||||
|
||||
}//namespace matrix_operation |
||||
}//namespace gtc |
||||
}//namespace glm |
@ -1,40 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2009-04-29
|
||||
// Updated : 2010-02-07
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtc/matrix_projection.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
// - GLM_GTC_matrix_operation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtc_matrix_projection |
||||
#define glm_gtc_matrix_projection |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
|
||||
namespace glm |
||||
{ |
||||
namespace test{ |
||||
bool main_gtc_matrix_projection(); |
||||
}//namespace test
|
||||
|
||||
namespace gtc{ |
||||
//! GLM_GTC_matrix_projection: Varius ways to build and operate on projection matrices
|
||||
namespace matrix_projection |
||||
{ |
||||
|
||||
|
||||
}//namespace matrix_projection
|
||||
}//namespace gtc
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_projection.inl" |
||||
|
||||
namespace glm{using namespace gtc::matrix_projection;} |
||||
|
||||
#endif//glm_gtc_matrix_projection
|
@ -1,17 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2009-04-29 |
||||
// Updated : 2010-02-07 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtc/matrix_projection.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm{ |
||||
namespace gtc{ |
||||
namespace matrix_projection |
||||
{ |
||||
|
||||
}//namespace matrix_projection |
||||
}//namespace gtc |
||||
}//namespace glm |
@ -1,43 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2005-12-21
|
||||
// Updated : 2008-04-23
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/determinant.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_determinant |
||||
#define glm_gtx_determinant |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
#include "../gtc/matrix_operation.hpp" |
||||
|
||||
namespace glm |
||||
{ |
||||
namespace test{ |
||||
void main_gtx_determinant(); |
||||
}//namespace test
|
||||
|
||||
namespace gtx{ |
||||
//! GLM_GTX_determinant extension: Compute the determinant of a matrix
|
||||
namespace determinant |
||||
{ |
||||
using namespace gtc::matrix_operation; |
||||
|
||||
}//namespace determinant
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#define GLM_GTX_determinant namespace gtx::determinant |
||||
#ifndef GLM_GTX_GLOBAL |
||||
namespace glm {using GLM_GTX_determinant;} |
||||
#endif//GLM_GTC_GLOBAL
|
||||
|
||||
#include "determinant.inl" |
||||
|
||||
#endif//glm_gtx_determinant
|
@ -1,13 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2009 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2005-12-21 |
||||
// Updated : 2005-12-21 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtx/determinant.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm |
||||
{ |
||||
|
||||
} |
@ -1,48 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2005-12-27
|
||||
// Updated : 2006-12-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/matrix_access.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_matrix_access |
||||
#define glm_gtx_matrix_access |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
|
||||
namespace glm{ |
||||
namespace gtx{ |
||||
//! GLM_GTX_matrix_access extension: Set a column or a row of a matrix
|
||||
namespace matrix_access |
||||
{ |
||||
//! Set a specific row to a matrix.
|
||||
//! From GLM_GTX_matrix_access extension.
|
||||
template <typename genType>
|
||||
genType row( |
||||
const genType& m,
|
||||
int index,
|
||||
typename genType::row_type const & x); |
||||
|
||||
//! Set a specific column to a matrix.
|
||||
//! From GLM_GTX_matrix_access extension.
|
||||
template <typename genType>
|
||||
genType column( |
||||
const genType& m,
|
||||
int index,
|
||||
typename genType::col_type const & x); |
||||
|
||||
}//namespace matrix_access
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_access.inl" |
||||
|
||||
namespace glm{using namespace gtx::matrix_access;} |
||||
|
||||
#endif//glm_gtx_matrix_access
|
@ -1,40 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2005-12-27 |
||||
// Updated : 2005-12-27 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtx/matrix_access.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm{ |
||||
namespace gtx{ |
||||
namespace matrix_access{ |
||||
|
||||
template <typename genType> |
||||
inline genType row( |
||||
genType const & m, |
||||
int index, |
||||
typename genType::row_type const & x) |
||||
{ |
||||
genType Result = m; |
||||
for(typename genType::size_type i = 0; i < genType::row_size(); ++i) |
||||
Result[i][index] = x[i]; |
||||
return Result; |
||||
} |
||||
|
||||
template <typename genType> |
||||
inline genType column( |
||||
genType const & m, |
||||
int index, |
||||
typename genType::col_type const & x) |
||||
{ |
||||
genType Result = m; |
||||
Result[index] = x; |
||||
return Result; |
||||
} |
||||
|
||||
}//namespace matrix_access |
||||
}//namespace gtx |
||||
}//namespace glm |
||||
|
@ -1,63 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2005-12-21
|
||||
// Updated : 2009-04-29
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/matrix_projection.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
// - GLM_GTC_matrix_projection
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_matrix_projection |
||||
#define glm_gtx_matrix_projection |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
#include "../gtc/matrix_projection.hpp" |
||||
|
||||
namespace glm |
||||
{ |
||||
namespace test{ |
||||
void main_gtx_matrix_projection(); |
||||
}//namespace test
|
||||
|
||||
namespace gtx{ |
||||
//! GLM_GTX_matrix_projection: Varius ways to build and operate on projection matrices
|
||||
namespace matrix_projection |
||||
{ |
||||
using namespace gtc::matrix_projection; |
||||
|
||||
//! Builds a perspective projection matrix based on a field of view
|
||||
//! From GLM_GTX_matrix_projection extension.
|
||||
template <typename valType>
|
||||
detail::tmat4x4<valType> perspectiveFov( |
||||
valType const & fov,
|
||||
valType const & width,
|
||||
valType const & height,
|
||||
valType const & zNear,
|
||||
valType const & zFar); |
||||
|
||||
//! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite .
|
||||
//! From GLM_GTX_matrix_projection extension.
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> infinitePerspective( |
||||
T fovy, T aspect, T zNear); |
||||
|
||||
//! Creates a matrix for a symmetric perspective-view frustum with far plane at infinite for graphics hardware that doesn't support depth clamping.
|
||||
//! From GLM_GTX_matrix_projection extension.
|
||||
template <typename T>
|
||||
detail::tmat4x4<T> tweakedInfinitePerspective( |
||||
T fovy, T aspect, T zNear); |
||||
|
||||
}//namespace matrix_projection
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_projection.inl" |
||||
|
||||
namespace glm{using namespace gtx::matrix_projection;} |
||||
|
||||
#endif//glm_gtx_matrix_projection
|
@ -1,81 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2005-12-21 |
||||
// Updated : 2009-04-29 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtx/matrix_projection.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm{ |
||||
namespace gtx{ |
||||
namespace matrix_projection |
||||
{ |
||||
template <typename valType> |
||||
inline detail::tmat4x4<valType> perspectiveFov |
||||
( |
||||
valType const & fov, |
||||
valType const & width, |
||||
valType const & height, |
||||
valType const & zNear, |
||||
valType const & zFar |
||||
) |
||||
{ |
||||
valType rad = glm::radians(fov); |
||||
valType h = glm::cos(valType(0.5) * rad) / glm::sin(valType(0.5) * rad); |
||||
valType w = h * height / width; |
||||
|
||||
detail::tmat4x4<valType> Result(valType(0)); |
||||
Result[0][0] = w; |
||||
Result[1][1] = h; |
||||
Result[2][2] = (zFar + zNear) / (zFar - zNear); |
||||
Result[2][3] = valType(1); |
||||
Result[3][2] = -(valType(2) * zFar * zNear) / (zFar - zNear); |
||||
return Result; |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tmat4x4<T> infinitePerspective( |
||||
T fovy, |
||||
T aspect, |
||||
T zNear) |
||||
{ |
||||
T range = tan(radians(fovy / T(2))) * zNear; |
||||
T left = -range * aspect; |
||||
T right = range * aspect; |
||||
T bottom = -range; |
||||
T top = range; |
||||
|
||||
detail::tmat4x4<T> Result(T(0)); |
||||
Result[0][0] = (T(2) * zNear) / (right - left); |
||||
Result[1][1] = (T(2) * zNear) / (top - bottom); |
||||
Result[2][2] = - T(1); |
||||
Result[2][3] = - T(1); |
||||
Result[3][2] = - T(2) * zNear; |
||||
return Result; |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tmat4x4<T> tweakedInfinitePerspective( |
||||
T fovy, |
||||
T aspect, |
||||
T zNear) |
||||
{ |
||||
T range = tan(radians(fovy / T(2))) * zNear; |
||||
T left = -range * aspect; |
||||
T right = range * aspect; |
||||
T bottom = -range; |
||||
T top = range; |
||||
|
||||
detail::tmat4x4<T> Result(T(0)); |
||||
Result[0][0] = (T(2) * zNear) / (right - left); |
||||
Result[1][1] = (T(2) * zNear) / (top - bottom); |
||||
Result[2][2] = T(0.0001) - T(1); |
||||
Result[2][3] = T(-1); |
||||
Result[3][2] = - (T(0.0001) - T(2)) * zNear; |
||||
return Result; |
||||
} |
||||
|
||||
}//namespace matrix_projection |
||||
}//namespace gtc |
||||
}//namespace glm |
@ -1,79 +0,0 @@ |
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2005-12-21
|
||||
// Updated : 2009-02-19
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/matrix_selection.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_matrix_selection |
||||
#define glm_gtx_matrix_selection |
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp" |
||||
|
||||
namespace glm |
||||
{ |
||||
namespace test{ |
||||
void main_gtx_matrix_selection(); |
||||
}//namespace test
|
||||
|
||||
namespace gtx{ |
||||
//! GLM_GTX_matrix_selection extension: Access to matrix columns or rows.
|
||||
namespace matrix_selection |
||||
{ |
||||
//! Returns a 2 components vector that contains the row of the matrix m witch values is the ones of the row index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec2<T> row( |
||||
const detail::tmat2x2<T>& m,
|
||||
int index); |
||||
|
||||
//! Returns a 3 components vector that contains the row of the matrix m witch values is the ones of the row index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec3<T> row( |
||||
const detail::tmat3x3<T>& m,
|
||||
int index); |
||||
|
||||
//! Returns a 4 components vector that contains the row of the matrix m witch values is the ones of the row index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec4<T> row( |
||||
const detail::tmat4x4<T>& m,
|
||||
int index); |
||||
|
||||
//! Returns a 2 components vector that contains the row of the matrix m witch values is the ones of the column index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec2<T> column( |
||||
const detail::tmat2x2<T>& m,
|
||||
int index); |
||||
|
||||
//! Returns a 3 components vector that contains the row of the matrix m witch values is the ones of the column index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec3<T> column( |
||||
const detail::tmat3x3<T>& m,
|
||||
int index); |
||||
|
||||
//! Returns a 4 components vector that contains the row of the matrix m witch values is the ones of the column index.
|
||||
//! From GLM_GTX_matrix_selection extension.
|
||||
template <typename T>
|
||||
detail::tvec4<T> column( |
||||
const detail::tmat4x4<T>& m,
|
||||
int index); |
||||
|
||||
}//namespace matrix_selection
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "matrix_selection.inl" |
||||
|
||||
namespace glm{using namespace gtx::matrix_selection;} |
||||
|
||||
#endif//glm_gtx_matrix_selection
|
@ -1,65 +0,0 @@ |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net) |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
// Created : 2005-12-21 |
||||
// Updated : 2009-02-19 |
||||
// Licence : This source is under MIT License |
||||
// File : glm/gtx/matrix_selection.inl |
||||
/////////////////////////////////////////////////////////////////////////////////////////////////// |
||||
|
||||
namespace glm{ |
||||
namespace gtx{ |
||||
namespace matrix_selection |
||||
{ |
||||
template <typename T> |
||||
inline detail::tvec2<T> row( |
||||
const detail::tmat2x2<T>& m, |
||||
int index) |
||||
{ |
||||
return detail::tvec2<T>(m[0][index], m[1][index]); |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tvec3<T> row( |
||||
const detail::tmat3x3<T>& m, |
||||
int index) |
||||
{ |
||||
return detail::tvec3<T>(m[0][index], m[1][index], m[2][index]); |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tvec4<T> row( |
||||
const detail::tmat4x4<T>& m, |
||||
int index) |
||||
{ |
||||
return detail::tvec4<T>(m[0][index], m[1][index], m[2][index], m[3][index]); |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tvec2<T> column( |
||||
const detail::tmat2x2<T>& m, |
||||
int index) |
||||
{ |
||||
return m[index]; |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tvec3<T> column( |
||||
const detail::tmat3x3<T>& m, |
||||
int index) |
||||
{ |
||||
return m[index]; |
||||
} |
||||
|
||||
template <typename T> |
||||
inline detail::tvec4<T> column( |
||||
const detail::tmat4x4<T>& m, |
||||
int index) |
||||
{ |
||||
return m[index]; |
||||
} |
||||
|
||||
}//namespace matrix_selection |
||||
}//namespace gtx |
||||
}//namespace glm |
||||
|
Loading…
Reference in New Issue