mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-13 18:10:41 +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
73
ExternalLibs/glm/gtx/intersect.hpp
Normal file
73
ExternalLibs/glm/gtx/intersect.hpp
Normal file
|
@ -0,0 +1,73 @@
|
|||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// OpenGL Mathematics Copyright (c) 2005 - 2011 G-Truc Creation (www.g-truc.net)
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Created : 2007-04-03
|
||||
// Updated : 2009-01-20
|
||||
// Licence : This source is under MIT License
|
||||
// File : glm/gtx/intersect.hpp
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Dependency:
|
||||
// - GLM core
|
||||
// - GLM_GTX_closest_point
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef glm_gtx_intersect
|
||||
#define glm_gtx_intersect
|
||||
|
||||
// Dependency:
|
||||
#include "../glm.hpp"
|
||||
#include "../gtx/closest_point.hpp"
|
||||
|
||||
#if(defined(GLM_MESSAGES) && !defined(glm_ext))
|
||||
# pragma message("GLM: GLM_GTX_closest_point extension included")
|
||||
#endif
|
||||
|
||||
namespace glm{
|
||||
namespace gtx{
|
||||
namespace intersect ///< GLM_GTX_intersect extension: Add intersection functions
|
||||
{
|
||||
/// \addtogroup gtx_intersect
|
||||
/// @{
|
||||
|
||||
//! Compute the intersection of a ray and a triangle.
|
||||
//! From GLM_GTX_intersect extension.
|
||||
template <typename genType>
|
||||
bool intersectRayTriangle(
|
||||
genType const & orig, genType const & dir,
|
||||
genType const & vert0, genType const & vert1, genType const & vert2,
|
||||
genType & baryPosition);
|
||||
|
||||
//! Compute the intersection of a line and a triangle.
|
||||
//! From GLM_GTX_intersect extension.
|
||||
template <typename genType>
|
||||
bool intersectLineTriangle(
|
||||
genType const & orig, genType const & dir,
|
||||
genType const & vert0, genType const & vert1, genType const & vert2,
|
||||
genType & position);
|
||||
|
||||
//! Compute the intersection of a ray and a sphere.
|
||||
//! From GLM_GTX_intersect extension.
|
||||
template <typename genType>
|
||||
bool intersectRaySphere(
|
||||
genType const & orig, genType const & dir,
|
||||
genType const & center, typename genType::value_type radius,
|
||||
genType & position, genType & normal);
|
||||
|
||||
//! Compute the intersection of a line and a sphere.
|
||||
//! From GLM_GTX_intersect extension
|
||||
template <typename genType>
|
||||
bool intersectLineSphere(
|
||||
genType const & point0, genType const & point1,
|
||||
genType const & center, typename genType::value_type radius,
|
||||
genType & position, genType & normal);
|
||||
|
||||
/// @}
|
||||
}//namespace intersect
|
||||
}//namespace gtx
|
||||
}//namespace glm
|
||||
|
||||
#include "intersect.inl"
|
||||
|
||||
namespace glm{using namespace gtx::intersect;}
|
||||
|
||||
#endif//glm_gtx_intersect
|
Loading…
Add table
Add a link
Reference in a new issue