mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-17 11:59:28 +00:00
Add glm 0.9.2
This commit is contained in:
parent
21545e1a24
commit
c4b531ed5e
218 changed files with 46187 additions and 0 deletions
40
ExternalLibs/glm/gtx/projection.inl
Normal file
40
ExternalLibs/glm/gtx/projection.inl
Normal file
|
@ -0,0 +1,40 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2005-12-21
|
||||
// Updated : 2009-03-06
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/projection.inl
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace projection{
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec2<T> proj(
|
||||
detail::tvec2<T> const & x,
|
||||
detail::tvec2<T> const & Normal)
|
||||
{
|
||||
return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec3<T> proj(
|
||||
detail::tvec3<T> const & x,
|
||||
detail::tvec3<T> const & Normal)
|
||||
{
|
||||
return dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
GLM_FUNC_QUALIFIER detail::tvec4<T> proj(
|
||||
detail::tvec4<T> const & x,
|
||||
detail::tvec4<T> const & Normal)
|
||||
{
|
||||
return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal;
|
||||
}
|
||||
|
||||
}//namespace projection
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
Loading…
Add table
Add a link
Reference in a new issue