<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Crystal Space 1.2.1: csDIntersect3 Class Reference (Crystal Space 1.2.1 Public API Reference)</title> <link href="tabs.css" rel="stylesheet" type="text/css"> <link href="doxygen.css" rel="stylesheet" type="text/css"> </head><body> <table border="0" cellpadding="0" cellspacing="0" width="100%" class="head"> <tr height="59"> <td class="head" width="202" valign="bottom" style="padding-left:0;"><a href="http://www.crystalspace3d.org/"><img src="csblur.png" width="236" height="59" alt="CrystalSpace" border="0"></a></td> <td class="head"><h2>Public API Reference</h2></td> </tr> <tr height="11"> <td colspan="2" class="headshadow" valign="top" style="padding-left:0;"><img src="csblurb.png" width="236" height="11" alt="" border="0"></td> </tr> </table> <div class="content"> <!-- Generated by Doxygen 1.5.3 --> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li class="current"><a href="classes.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="classes.html"><span>Alphabetical List</span></a></li> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul> </div> <h1>csDIntersect3 Class Reference<br> <small> [<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small> </h1><!-- doxytag: class="csDIntersect3" -->Some functions to perform various intersection calculations with 3D line segments. <a href="#_details">More...</a> <p> <code>#include <<a class="el" href="math3d__d_8h-source.html">csgeom/math3d_d.h</a>></code> <p> <p> <a href="classcsDIntersect3-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0"> <tr><td></td></tr> <tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#d2a9df5d1039e29f1b83c3743a4fdfbb">Plane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, const <a class="el" href="classcsDPlane.html">csDPlane</a> &p, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect, double &dist)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with a plane. <a href="#d2a9df5d1039e29f1b83c3743a4fdfbb"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#fdd04145593c11388cbbcc46f48d77c1">Plane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, double A, double B, double C, double D, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect, double &dist)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with a plane. <a href="#fdd04145593c11388cbbcc46f48d77c1"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#b72491fd0c9414104e0f4a68714449f6">Plane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, const <a class="el" href="classcsDVector3.html">csDVector3</a> &normal, const <a class="el" href="classcsDVector3.html">csDVector3</a> &a, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with a plane. <a href="#b72491fd0c9414104e0f4a68714449f6"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static bool </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#936caad70304674285929fcb6fd0de82">Planes</a> (const <a class="el" href="classcsDPlane.html">csDPlane</a> &p1, const <a class="el" href="classcsDPlane.html">csDPlane</a> &p2, const <a class="el" href="classcsDPlane.html">csDPlane</a> &p3, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect 3 planes, to get the point that is part of all three planes. <a href="#936caad70304674285929fcb6fd0de82"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#0d6c4d29287a57ceb13b89d733d6f5fd">XFrustum</a> (double A, const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with the frustum plane Ax + z = 0. <a href="#0d6c4d29287a57ceb13b89d733d6f5fd"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#bd55b67ef0955e2c936059f3c105c072">YFrustum</a> (double B, const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with the frustum plane By + z = 0. <a href="#bd55b67ef0955e2c936059f3c105c072"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#298fdb80a8b985dd0fd64a5e5c9f207f">Z0Plane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with the z = 0 plane. <a href="#298fdb80a8b985dd0fd64a5e5c9f207f"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static double </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDIntersect3.html#ce4eee79acddb020de3f59d03f7e203a">ZPlane</a> (double zval, const <a class="el" href="classcsDVector3.html">csDVector3</a> &u, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, <a class="el" href="classcsDVector3.html">csDVector3</a> &isect)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Intersect a 3D segment with the plane z = zval. <a href="#ce4eee79acddb020de3f59d03f7e203a"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Some functions to perform various intersection calculations with 3D line segments. <p> This is a static class and contains only static member functions. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00599">599</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> <hr><h2>Member Function Documentation</h2> <a class="anchor" name="d2a9df5d1039e29f1b83c3743a4fdfbb"></a><!-- doxytag: member="csDIntersect3::Plane" ref="d2a9df5d1039e29f1b83c3743a4fdfbb" args="(const csDVector3 &u, const csDVector3 &v, const csDPlane &p, csDVector3 &isect, double &dist)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDIntersect3::Plane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDPlane.html">csDPlane</a> & </td> <td class="paramname"> <em>p</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"> <em>dist</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with a plane. <p> Returns true if there is an intersection, with the intersection point returned in isect. The distance from u to the intersection point is returned in dist. The distance that is returned is a normalized distance with respect to the given input vector. i.e. a distance of 0.5 means that the intersection point is halfway u and v. </div> </div><p> <a class="anchor" name="fdd04145593c11388cbbcc46f48d77c1"></a><!-- doxytag: member="csDIntersect3::Plane" ref="fdd04145593c11388cbbcc46f48d77c1" args="(const csDVector3 &u, const csDVector3 &v, double A, double B, double C, double D, csDVector3 &isect, double &dist)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDIntersect3::Plane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>B</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>C</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>D</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"> <em>dist</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with a plane. <p> Returns true if there is an intersection, with the intersection point returned in isect. The distance from u to the intersection point is returned in dist. The distance that is returned is a normalized distance with respect to the given input vector. i.e. a distance of 0.5 means that the intersection point is halfway u and v. </div> </div><p> <a class="anchor" name="b72491fd0c9414104e0f4a68714449f6"></a><!-- doxytag: member="csDIntersect3::Plane" ref="b72491fd0c9414104e0f4a68714449f6" args="(const csDVector3 &u, const csDVector3 &v, const csDVector3 &normal, const csDVector3 &a, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDIntersect3::Plane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>normal</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>a</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with a plane. <p> Returns true if there is an intersection, with the intersection point returned in isect. </div> </div><p> <a class="anchor" name="936caad70304674285929fcb6fd0de82"></a><!-- doxytag: member="csDIntersect3::Planes" ref="936caad70304674285929fcb6fd0de82" args="(const csDPlane &p1, const csDPlane &p2, const csDPlane &p3, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDIntersect3::Planes </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDPlane.html">csDPlane</a> & </td> <td class="paramname"> <em>p1</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDPlane.html">csDPlane</a> & </td> <td class="paramname"> <em>p2</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDPlane.html">csDPlane</a> & </td> <td class="paramname"> <em>p3</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect 3 planes, to get the point that is part of all three planes. <p> Returns true, if there is a single point that fits. If some planes are parallel, then it will return false. </div> </div><p> <a class="anchor" name="0d6c4d29287a57ceb13b89d733d6f5fd"></a><!-- doxytag: member="csDIntersect3::XFrustum" ref="0d6c4d29287a57ceb13b89d733d6f5fd" args="(double A, const csDVector3 &u, const csDVector3 &v, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDIntersect3::XFrustum </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>A</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with the frustum plane Ax + z = 0. <p> Assumes an intersection, and returns the intersection point in isect. </div> </div><p> <a class="anchor" name="bd55b67ef0955e2c936059f3c105c072"></a><!-- doxytag: member="csDIntersect3::YFrustum" ref="bd55b67ef0955e2c936059f3c105c072" args="(double B, const csDVector3 &u, const csDVector3 &v, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDIntersect3::YFrustum </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>B</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with the frustum plane By + z = 0. <p> Assumes an intersection, and returns the intersection point in isect. </div> </div><p> <a class="anchor" name="298fdb80a8b985dd0fd64a5e5c9f207f"></a><!-- doxytag: member="csDIntersect3::Z0Plane" ref="298fdb80a8b985dd0fd64a5e5c9f207f" args="(const csDVector3 &u, const csDVector3 &v, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDIntersect3::Z0Plane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with the z = 0 plane. <p> Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. </div> </div><p> <a class="anchor" name="ce4eee79acddb020de3f59d03f7e203a"></a><!-- doxytag: member="csDIntersect3::ZPlane" ref="ce4eee79acddb020de3f59d03f7e203a" args="(double zval, const csDVector3 &u, const csDVector3 &v, csDVector3 &isect)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDIntersect3::ZPlane </td> <td>(</td> <td class="paramtype">double </td> <td class="paramname"> <em>zval</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>u</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>isect</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Intersect a 3D segment with the plane z = zval. <p> Assumes that there is an intersection (fails if the segment is parallel to the plane), and returns the distance from u to the intersection point. The intersection point is returned in isect. </div> </div><p> <hr>The documentation for this class was generated from the following file:<ul> <li>csgeom/<a class="el" href="math3d__d_8h-source.html">math3d_d.h</a></ul> <hr size="1"><address><small>Generated for Crystal Space 1.2.1 by <a href="http://www.doxygen.org/index.html">doxygen</a> 1.5.3 </small></address> </div></body> </html>