<ahref="a00506.html">Go to the documentation of this file.</a><divclass="fragment"><divclass="line"><aname="l00001"></a><spanclass="lineno"> 1</span> </div><divclass="line"><aname="l00014"></a><spanclass="lineno"> 14</span> <spanclass="preprocessor">#pragma once</span></div><divclass="line"><aname="l00015"></a><spanclass="lineno"> 15</span> </div><divclass="line"><aname="l00016"></a><spanclass="lineno"> 16</span> <spanclass="comment">// Dependency:</span></div><divclass="line"><aname="l00017"></a><spanclass="lineno"> 17</span> <spanclass="preprocessor">#include <cfloat></span></div><divclass="line"><aname="l00018"></a><spanclass="lineno"> 18</span> <spanclass="preprocessor">#include <limits></span></div><divclass="line"><aname="l00019"></a><spanclass="lineno"> 19</span> <spanclass="preprocessor">#include "../glm.hpp"</span></div><divclass="line"><aname="l00020"></a><spanclass="lineno"> 20</span> <spanclass="preprocessor">#include "../geometric.hpp"</span></div><divclass="line"><aname="l00021"></a><spanclass="lineno"> 21</span> <spanclass="preprocessor">#include "../gtx/closest_point.hpp"</span></div><divclass="line"><aname="l00022"></a><spanclass="lineno"> 22</span> <spanclass="preprocessor">#include "../gtx/vector_query.hpp"</span></div><divclass="line"><aname="l00023"></a><spanclass="lineno"> 23</span> </div><divclass="line"><aname="l00024"></a><spanclass="lineno"> 24</span> <spanclass="preprocessor">#ifndef GLM_ENABLE_EXPERIMENTAL</span></div><divclass="line"><aname="l00025"></a><spanclass="lineno"> 25</span> <spanclass="preprocessor"># error "GLM: GLM_GTX_closest_point is an experimental extension and may change in the future. Use #define GLM_ENABLE_EXPERIMENTAL before including it, if you really want to use it."</span></div><divclass="line"><aname="l00026"></a><spanclass="lineno"> 26</span> <spanclass="preprocessor">#endif</span></div><divclass="line"><aname="l00027"></a><spanclass="lineno"> 27</span> </div><divclass="line"><aname="l00028"></a><spanclass="lineno"> 28</span> <spanclass="preprocessor">#if GLM_MESSAGES == GLM_ENABLE && !defined(GLM_EXT_INCLUDED)</span></div><divclass="line"><aname="l00029"></a><spanclass="lineno"> 29</span> <spanclass="preprocessor"># pragma message("GLM: GLM_GTX_closest_point extension included")</span></div><divclass="line"><aname="l00030"></a><spanclass="lineno"> 30</span> <spanclass="preprocessor">#endif</span></div><divclass="line"><aname="l00031"></a><spanclass="lineno"> 31</span> </div><divclass="line"><aname="l00032"></a><spanclass="lineno"> 32</span> <spanclass="keyword">namespace </span><aclass="code"href="a00792.html">glm</a></div><divclass="line"><aname="l00033"></a><spanclass="lineno"> 33</span> {</div><divclass="line"><aname="l00036"></a><spanclass="lineno"> 36</span> </div><divclass="line"><aname="l00040"></a><spanclass="lineno"> 40</span> <spanclass="keyword">template</span><<spanclass="keyword">typename</span> genType></div><divclass="line"><aname="l00041"></a><spanclass="lineno"> 41</span>  GLM_FUNC_DECL <spanclass="keywordtype">bool</span><aclass="code"href="a00748.html#gad3697a9700ea379739a667ea02573488">intersectRayPlane</a>(</div><divclass="line"><aname="l00042"></a><spanclass="lineno"> 42</span>  genType <spanclass="keyword">const</span>& orig, genType <spanclass="keyword">const</span>& dir,</div><divclass="line"><aname="l00043"></a><spanclass="lineno"> 43</span>  genType <spanclass="keyword">const</span>& planeOrig, genType <spanclass="keyword">const</span>& planeNormal,</div><divclass="line"><aname="l00044"></a><spanclass="lineno"> 44</span> <spanclass="keyword">typename</span> genType::value_type & intersectionDistance);</div><
<divclass="ttc"id="a00697_html_gaa68de6c53e20dfb2dac2d20197562e3f"><divclass="ttname"><ahref="a00697.html#gaa68de6c53e20dfb2dac2d20197562e3f">glm::distance</a></div><divclass="ttdeci">GLM_FUNC_DECL T distance(vec< L, T, Q > const &p0, vec< L, T, Q > const &p1)</div><divclass="ttdoc">Returns the distance betwwen p0 and p1, i.e., length(p0 - p1). </div></div>
<divclass="ttc"id="a00748_html_gad28c00515b823b579c608aafa1100c1d"><divclass="ttname"><ahref="a00748.html#gad28c00515b823b579c608aafa1100c1d">glm::intersectRaySphere</a></div><divclass="ttdeci">GLM_FUNC_DECL bool intersectRaySphere(genType const &rayStarting, genType const &rayNormalizedDirection, genType const &sphereCenter, const typename genType::value_type sphereRadius, genType &intersectionPosition, genType &intersectionNormal)</div><divclass="ttdoc">Compute the intersection of a ray and a sphere. </div></div>
<divclass="ttc"id="a00748_html_gad3697a9700ea379739a667ea02573488"><divclass="ttname"><ahref="a00748.html#gad3697a9700ea379739a667ea02573488">glm::intersectRayPlane</a></div><divclass="ttdeci">GLM_FUNC_DECL bool intersectRayPlane(genType const &orig, genType const &dir, genType const &planeOrig, genType const &planeNormal, typename genType::value_type &intersectionDistance)</div><divclass="ttdoc">Compute the intersection of a ray and a plane. </div></div>
<divclass="ttc"id="a00748_html_ga9d29b9b3acb504d43986502f42740df4"><divclass="ttname"><ahref="a00748.html#ga9d29b9b3acb504d43986502f42740df4">glm::intersectLineTriangle</a></div><divclass="ttdeci">GLM_FUNC_DECL bool intersectLineTriangle(genType const &orig, genType const &dir, genType const &vert0, genType const &vert1, genType const &vert2, genType &position)</div><divclass="ttdoc">Compute the intersection of a line and a triangle. </div></div>
<divclass="ttc"id="a00748_html_ga65bf2c594482f04881c36bc761f9e946"><divclass="ttname"><ahref="a00748.html#ga65bf2c594482f04881c36bc761f9e946">glm::intersectRayTriangle</a></div><divclass="ttdeci">GLM_FUNC_DECL bool intersectRayTriangle(vec< 3, T, Q > const &orig, vec< 3, T, Q > const &dir, vec< 3, T, Q > const &v0, vec< 3, T, Q > const &v1, vec< 3, T, Q > const &v2, vec< 2, T, Q >&baryPosition, T &distance)</div><divclass="ttdoc">Compute the intersection of a ray and a triangle. </div></div>