Promoted extension to GTC

This commit is contained in:
Christophe Riccio 2010-04-30 10:53:48 +01:00
parent 679e46ae98
commit ee7b52c8ee
2 changed files with 0 additions and 230 deletions

View File

@ -1,230 +0,0 @@
///////////////////////////////////////////////////////////////////////////////////////////////////
// OpenGL Mathematics Copyright (c) 2005 - 2010 G-Truc Creation (www.g-truc.net)
///////////////////////////////////////////////////////////////////////////////////////////////////
// Created : 2009-05-06
// Updated : 2009-05-06
// Licence : This source is under MIT License
// File : glm/gtx/type_ptr.hpp
///////////////////////////////////////////////////////////////////////////////////////////////////
// Dependency:
// - GLM core
///////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef glm_gtx_type_ptr
#define glm_gtx_type_ptr
// Dependency:
#include "../glm.hpp"
namespace glm
{
namespace test{
void main_gtx_type_ptr();
}//namespace test
namespace gtx{
//! GLM_GTX_type_ptr extension: Get access to vectors & matrices value type address.
namespace type_ptr{
//! Get the const address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tvec2<valType> const & vec)
{
return &(vec.x);
}
//! Get the address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tvec2<valType> & vec)
{
return &(vec.x);
}
//! Get the const address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tvec3<valType> const & vec)
{
return &(vec.x);
}
//! Get the address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tvec3<valType> & vec)
{
return &(vec.x);
}
//! Get the const address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tvec4<valType> const & vec)
{
return &(vec.x);
}
//! Get the address of the vector content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tvec4<valType> & vec)
{
return &(vec.x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat2x2<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat2x2<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat3x3<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat3x3<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat4x4<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat4x4<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat2x3<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat2x3<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat3x2<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat3x2<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat2x4<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat2x4<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat4x2<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat4x2<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat3x4<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat3x4<valType> & mat)
{
return &(mat[0].x);
}
//! Get the const address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType const * value_ptr(detail::tmat4x3<valType> const & mat)
{
return &(mat[0].x);
}
//! Get the address of the matrix content.
//! From GLM_GTX_type_ptr extension.
template<typename valType>
inline valType * value_ptr(detail::tmat4x3<valType> & mat)
{
return &(mat[0].x);
}
}//namespace type_ptr
}//namespace gtx
}//namespace glm
#include "type_ptr.inl"
namespace glm{using namespace gtx::type_ptr;}
#endif//glm_gtx_type_ptr

View File