Tony-LunarG | b0b195d | 2015-05-13 15:01:06 -0600 | [diff] [blame] | 1 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 2 | // OpenGL Mathematics Copyright (c) 2005 - 2014 G-Truc Creation (www.g-truc.net) |
| 3 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 4 | // Created : 2005-12-21 |
| 5 | // Updated : 2009-03-06 |
| 6 | // Licence : This source is under MIT License |
| 7 | // File : glm/gtx/projection.inl |
| 8 | /////////////////////////////////////////////////////////////////////////////////////////////////// |
| 9 | |
| 10 | namespace glm |
| 11 | { |
| 12 | template <typename vecType> |
| 13 | GLM_FUNC_QUALIFIER vecType proj |
| 14 | ( |
| 15 | vecType const & x, |
| 16 | vecType const & Normal |
| 17 | ) |
| 18 | { |
| 19 | return glm::dot(x, Normal) / glm::dot(Normal, Normal) * Normal; |
| 20 | } |
| 21 | }//namespace glm |