Files
bullet3/Extras/GIMPACT/docs/html/gim__basic__geometry__operations_8h.html
2007-06-22 17:32:28 +00:00

122 lines
16 KiB
HTML
Executable File
Raw Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>GIMPACT: C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_basic_geometry_operations.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.2 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li class="current"><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
</ul>
</div>
<h1>C:/desarrollo/GIMPACT/GIMPACT/include/GIMPACT/core/gim_basic_geometry_operations.h File Reference</h1><code>#include &quot;<a class="el" href="gim__linear__math_8h.html">GIMPACT/core/gim_linear_math.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g88f2010ce05a78385f0e26110ac02b4f">PLANEDIREPSILON</a>&nbsp;&nbsp;&nbsp;0.0000001f</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g473681d03795274f5467ee5388a1f9b1">PARALELENORMALS</a>&nbsp;&nbsp;&nbsp;0.000001f</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g55f3e2be5423f8d1808a9a7da846cfa5">TRIANGLE_NORMAL</a>(v1, v2, v3, n)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g4ca8d28cc15811e1da3617a1517aa29f">TRIANGLE_NORMAL_FAST</a>(v1, v2, v3, n)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g3a555c6ce6f2cba54d48cf5397616975">TRIANGLE_PLANE</a>(v1, v2, v3, plane)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">plane is a vec4f <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g3a555c6ce6f2cba54d48cf5397616975"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g488bb318b2847ded4f0d7d5ca9f6f62e">TRIANGLE_PLANE_FAST</a>(v1, v2, v3, plane)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">plane is a vec4f <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g488bb318b2847ded4f0d7d5ca9f6f62e"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g4f359987a785fce8ab0f3be33335f9d9">EDGE_PLANE</a>(e1, e2, n, plane)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Calc a plane from an edge an a normal. plane is a vec4f. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g4f359987a785fce8ab0f3be33335f9d9"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g1b5363d983752e564e3b52a0583b2959">DISTANCE_PLANE_POINT</a>(plane, point)&nbsp;&nbsp;&nbsp;(VEC_DOT(plane,point) - plane[3])</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gb27a4b066dd0037571c237814cf1593d">PROJECT_POINT_PLANE</a>(point, plane, projected)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gc5e074cfe96be68f9c9f17174243ff20">PLANE_MINOR_AXES</a>(plane, i0, i1)&nbsp;&nbsp;&nbsp;VEC_MINOR_AXES(plane, i0, i1)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Finds the 2 smallest cartesian coordinates of a plane normal. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gc5e074cfe96be68f9c9f17174243ff20"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Enumerations</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gf66d93ee53b6749cbe010ed1aac258c2">ePLANE_INTERSECTION_TYPE</a> { <a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ggf66d93ee53b6749cbe010ed1aac258c2b610ff2f6b34c4f166b982947ab67834">G_BACK_PLANE</a> = 0,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ggf66d93ee53b6749cbe010ed1aac258c26fdd4ef1775152f6ce3ba43cdfa5f456">G_COLLIDE_PLANE</a>,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ggf66d93ee53b6749cbe010ed1aac258c23a6c131d5f1b09aa457ab79f983e41c8">G_FRONT_PLANE</a>
}</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g854cc47acfc8a8dafbde3d9c5fce03af">eLINE_PLANE_INTERSECTION_TYPE</a> { <br>
&nbsp;&nbsp;<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03af0a55cb02b5849d13617df44447953449">G_FRONT_PLANE_S1</a> = 0,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03afb951a14195451f5733b255585a639f6d">G_FRONT_PLANE_S2</a>,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03af90beb17b7fe4f81a75055d6fe8cdf262">G_BACK_PLANE_S1</a>,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03afea2b3b335a5f61f2133bc0c584f2006a">G_BACK_PLANE_S2</a>,
<br>
&nbsp;&nbsp;<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03af6cd0ab01dfcb38eb7d5ae929cfa5a8d8">G_COLLIDE_PLANE_S1</a>,
<a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gg854cc47acfc8a8dafbde3d9c5fce03affe473cc3f5d401b231d0d013f9b04ae5">G_COLLIDE_PLANE_S2</a>
<br>
}</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gbbba9933965e587594244b81ceb32c04">POINT_IN_HULL</a> (const CLASS_POINT &amp;point, const CLASS_PLANE *planes, GUINT plane_count)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Verifies if a point is in the plane hull. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gbbba9933965e587594244b81ceb32c04"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g9d9bdeb390dca83bad7f836690f8855c">PLANE_CLIP_SEGMENT</a> (const CLASS_POINT &amp;s1, const CLASS_POINT &amp;s2, const CLASS_PLANE &amp;plane, CLASS_POINT &amp;clipped)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE <a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g854cc47acfc8a8dafbde3d9c5fce03af">eLINE_PLANE_INTERSECTION_TYPE</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gc1357f9a99f5709463c3c11874c993c4">PLANE_CLIP_SEGMENT2</a> (const CLASS_POINT &amp;s1, const CLASS_POINT &amp;s2, const CLASS_PLANE &amp;plane, CLASS_POINT &amp;clipped)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Confirms if the plane intersect the edge or nor. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gc1357f9a99f5709463c3c11874c993c4"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE <a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g854cc47acfc8a8dafbde3d9c5fce03af">eLINE_PLANE_INTERSECTION_TYPE</a>&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ga931e17a661df001eaa717335ae537ec">PLANE_CLIP_SEGMENT_CLOSEST</a> (const CLASS_POINT &amp;s1, const CLASS_POINT &amp;s2, const CLASS_PLANE &amp;plane, CLASS_POINT &amp;clipped1, CLASS_POINT &amp;clipped2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Confirms if the plane intersect the edge or not. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ga931e17a661df001eaa717335ae537ec"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T, typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g76424e5fa2f0f7697652e0088e296397">RAY_PLANE_COLLISION</a> (const CLASS_PLANE &amp;plane, const CLASS_POINT &amp;vDir, const CLASS_POINT &amp;vPoint, CLASS_POINT &amp;pout, T &amp;tparam)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Ray plane collision in one way. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g76424e5fa2f0f7697652e0088e296397"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T, typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE GUINT&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ge039e4c642dd58adc8e99d774db9342d">LINE_PLANE_COLLISION</a> (const CLASS_PLANE &amp;plane, const CLASS_POINT &amp;vDir, const CLASS_POINT &amp;vPoint, CLASS_POINT &amp;pout, T &amp;tparam, T tmin, T tmax)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">line collision <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#ge039e4c642dd58adc8e99d774db9342d"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT, typename CLASS_PLANE&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g27491c62dc80b8efd8be348f6b41f5cb">INTERSECT_PLANES</a> (const CLASS_PLANE &amp;p1, const CLASS_PLANE &amp;p2, CLASS_POINT &amp;p, CLASS_POINT &amp;d)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the Ray on which 2 planes intersect if they do. Written by Rodrigo Hernandez on ODE convex collision. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g27491c62dc80b8efd8be348f6b41f5cb"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gb66e93d424a6170788e539099622709d">CLOSEST_POINT_ON_SEGMENT</a> (CLASS_POINT &amp;cp, const CLASS_POINT &amp;v, const CLASS_POINT &amp;e1, const CLASS_POINT &amp;e2)</td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T, typename CLASS_POINT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g1e7d4f2ec752876cb69dbfc273aa808b">LINE_INTERSECTION_PARAMS</a> (const CLASS_POINT &amp;dir1, CLASS_POINT &amp;point1, const CLASS_POINT &amp;dir2, CLASS_POINT &amp;point2, T &amp;t1, T &amp;t2)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Finds the line params where these lines intersect. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g1e7d4f2ec752876cb69dbfc273aa808b"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename CLASS_POINT&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g8a9e46c990cbb6a4aa3e85e4c75aad85">SEGMENT_COLLISION</a> (const CLASS_POINT &amp;vA1, const CLASS_POINT &amp;vA2, const CLASS_POINT &amp;vB1, const CLASS_POINT &amp;vB2, CLASS_POINT &amp;vPointA, CLASS_POINT &amp;vPointB)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Find closest points on segments. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g8a9e46c990cbb6a4aa3e85e4c75aad85"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE bool&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g263c8b6948964b535bc3ea3e095a7bdf">BOX_AXIS_INTERSECT</a> (T pos, T dir, T bmin, T bmax, T &amp;tfirst, T &amp;tlast)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Line box intersection in one dimension. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#g263c8b6948964b535bc3ea3e095a7bdf"></a><br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">SIMD_FORCE_INLINE void&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gfe4f0bb3d7ff5247cdd216dd723da675">SORT_3_INDICES</a> (const T *values, GUINT *order_indices)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sorts 3 componets. <a href="group___g_e_o_m_e_t_r_i_c___o_p_e_r_a_t_i_o_n_s.html#gfe4f0bb3d7ff5247cdd216dd723da675"></a><br></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<dl class="author" compact><dt><b>Author:</b></dt><dd>Francisco Le<4C>n N<>jera type independant geometry routines </dd></dl>
<hr size="1"><address style="text-align: right;"><small>Generated on Wed Jun 13 16:58:21 2007 for GIMPACT by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.2 </small></address>
</body>
</html>