<!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: csDSquaredDist 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>csDSquaredDist Class Reference<br> <small> [<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small> </h1><!-- doxytag: class="csDSquaredDist" -->Some functions to perform squared distance calculations. <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="classcsDSquaredDist-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 double </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDSquaredDist.html#5eeb2d83a4db087602ea64a832c7c97a">PointLine</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, const <a class="el" href="classcsDVector3.html">csDVector3</a> &l1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &l2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the squared distance between a point and a line. <a href="#5eeb2d83a4db087602ea64a832c7c97a"></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="classcsDSquaredDist.html#91c22dd69568bc3245d59d4da5f5fe30">PointPlane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, const <a class="el" href="classcsDPlane.html">csDPlane</a> &plane)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the squared distance between a point and a normalized plane. <a href="#91c22dd69568bc3245d59d4da5f5fe30"></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="classcsDSquaredDist.html#9fc7a8fc00057d57b74c08186c2e8eb3">PointPoint</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &p2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the squared distance between two points. <a href="#9fc7a8fc00057d57b74c08186c2e8eb3"></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="classcsDSquaredDist.html#01246763b61d36d4aebfecaafc632983">PointPoly</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, <a class="el" href="classcsDVector3.html">csDVector3</a> *V, int n, const <a class="el" href="classcsDPlane.html">csDPlane</a> &plane, double sqdist=-1)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the squared distance between a point and a polygon. <a href="#01246763b61d36d4aebfecaafc632983"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Some functions to perform squared distance calculations. <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#l00569">569</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="5eeb2d83a4db087602ea64a832c7c97a"></a><!-- doxytag: member="csDSquaredDist::PointLine" ref="5eeb2d83a4db087602ea64a832c7c97a" args="(const csDVector3 &p, const csDVector3 &l1, const csDVector3 &l2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDSquaredDist::PointLine </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>p</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>l1</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>l2</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> Returns the squared distance between a point and a line. <p> </div> </div><p> <a class="anchor" name="91c22dd69568bc3245d59d4da5f5fe30"></a><!-- doxytag: member="csDSquaredDist::PointPlane" ref="91c22dd69568bc3245d59d4da5f5fe30" args="(const csDVector3 &p, const csDPlane &plane)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDSquaredDist::PointPlane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>p</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>plane</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the squared distance between a point and a normalized plane. <p> <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00581">581</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> <p>References <a class="el" href="math3d__d_8h-source.html#l00405">csDPlane::Classify()</a>.</p> </div> </div><p> <a class="anchor" name="9fc7a8fc00057d57b74c08186c2e8eb3"></a><!-- doxytag: member="csDSquaredDist::PointPoint" ref="9fc7a8fc00057d57b74c08186c2e8eb3" args="(const csDVector3 &p1, const csDVector3 &p2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDSquaredDist::PointPoint </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</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="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>p2</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td width="100%"><code> [inline, static]</code></td> </tr> </table> </div> <div class="memdoc"> <p> Returns the squared distance between two points. <p> <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00573">573</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> <p>References <a class="el" href="math3d__d_8h-source.html#l00043">dSqr()</a>, <a class="el" href="math3d__d_8h-source.html#l00055">csDVector3::x</a>, <a class="el" href="math3d__d_8h-source.html#l00057">csDVector3::y</a>, and <a class="el" href="math3d__d_8h-source.html#l00059">csDVector3::z</a>.</p> </div> </div><p> <a class="anchor" name="01246763b61d36d4aebfecaafc632983"></a><!-- doxytag: member="csDSquaredDist::PointPoly" ref="01246763b61d36d4aebfecaafc632983" args="(const csDVector3 &p, csDVector3 *V, int n, const csDPlane &plane, double sqdist=-1)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDSquaredDist::PointPoly </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</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>V</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">int </td> <td class="paramname"> <em>n</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>plane</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>sqdist</em> = <code>-1</code></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> Returns the squared distance between a point and a polygon. <p> If sqdist is >= 0, then it is used as the pre-calculated point to plane distance. V is an array of vertices, n is the number of vertices, and plane is the polygon plane. </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>