<!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: csDMath3 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>csDMath3 Class Reference<br> <small> [<a class="el" href="group__geom__utils.html">Geometry utilities</a>]</small> </h1><!-- doxytag: class="csDMath3" -->Various assorted 3D mathematical functions. <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="classcsDMath3-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 void </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDMath3.html#7e9556159d8202d99d9d9055b7b9e818">Between</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &v1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v2, <a class="el" href="classcsDVector3.html">csDVector3</a> &v, double pct, double wid)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculates a vector lying a specified distance between two other vectors. <a href="#7e9556159d8202d99d9d9055b7b9e818"></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="classcsDMath3.html#79fcafbd249db05a3c99e28f527ac787">CalcNormal</a> (<a class="el" href="classcsDVector3.html">csDVector3</a> &norm, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, const <a class="el" href="classcsDVector3.html">csDVector3</a> &u)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the normal given two (u,v) vectors. <a href="#79fcafbd249db05a3c99e28f527ac787"></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="classcsDMath3.html#ca587c135c4534014b3544eb67370976">CalcNormal</a> (<a class="el" href="classcsDVector3.html">csDVector3</a> &norm, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v2, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v3)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate a plane normal given three vectors. <a href="#ca587c135c4534014b3544eb67370976"></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="classcsDMath3.html#fdf5bcdfaab065f376e872e8d5ac1c5f">CalcPlane</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &v1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v2, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v3, <a class="el" href="classcsDVector3.html">csDVector3</a> &normal, double &D)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the plane equation given three vectors. <a href="#fdf5bcdfaab065f376e872e8d5ac1c5f"></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="classcsDMath3.html#2b5a9cca86f2742c78b4bffb078f7a65">DoubleArea3</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &a, const <a class="el" href="classcsDVector3.html">csDVector3</a> &b, const <a class="el" href="classcsDVector3.html">csDVector3</a> &c)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute twice the area of triangle composed by three points. <a href="#2b5a9cca86f2742c78b4bffb078f7a65"></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="classcsDMath3.html#1e3101ca30ba235f6e6ebe4785602b7a">PlanesClose</a> (const <a class="el" href="classcsDPlane.html">csDPlane</a> &p1, const <a class="el" href="classcsDPlane.html">csDPlane</a> &p2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if two planes are close together. <a href="#1e3101ca30ba235f6e6ebe4785602b7a"></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="classcsDMath3.html#651dcf5133964175047989b2fbeb43cc">PlanesEqual</a> (const <a class="el" href="classcsDPlane.html">csDPlane</a> &p1, const <a class="el" href="classcsDPlane.html">csDPlane</a> &p2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if two planes are almost equal. <a href="#651dcf5133964175047989b2fbeb43cc"></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="classcsDMath3.html#48a54d79b557e0e8094cf371d61076cd">SetMinMax</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &v, <a class="el" href="classcsDVector3.html">csDVector3</a> &min, <a class="el" href="classcsDVector3.html">csDVector3</a> &max)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Set the min and max vector if this vector exceeds their current limits. <a href="#48a54d79b557e0e8094cf371d61076cd"></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="classcsDMath3.html#40a3dc332936b63e7ee56b98c52e5def">Visible</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, const <a class="el" href="classcsDPlane.html">csDPlane</a> &pl)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Check if the plane is visible from the given point. <a href="#40a3dc332936b63e7ee56b98c52e5def"></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="classcsDMath3.html#72ba2209398b3b2c680513b793df6bce">Visible</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, const <a class="el" href="classcsDVector3.html">csDVector3</a> &t1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &t2, const <a class="el" href="classcsDVector3.html">csDVector3</a> &t3)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests if the front face of a triangle is visible from the given point. <a href="#72ba2209398b3b2c680513b793df6bce"></a><br></td></tr> <tr><td class="memItemLeft" nowrap align="right" valign="top">static int </td><td class="memItemRight" valign="bottom"><a class="el" href="classcsDMath3.html#e152ed51b1678b74b871341ccc8dbd7a">WhichSide3D</a> (const <a class="el" href="classcsDVector3.html">csDVector3</a> &p, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v1, const <a class="el" href="classcsDVector3.html">csDVector3</a> &v2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Tests which side of a plane the given 3D point is on. <a href="#e152ed51b1678b74b871341ccc8dbd7a"></a><br></td></tr> </table> <hr><a name="_details"></a><h2>Detailed Description</h2> Various assorted 3D mathematical functions. <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#l00436">436</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="7e9556159d8202d99d9d9055b7b9e818"></a><!-- doxytag: member="csDMath3::Between" ref="7e9556159d8202d99d9d9055b7b9e818" args="(const csDVector3 &v1, const csDVector3 &v2, csDVector3 &v, double pct, double wid)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDMath3::Between </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v1</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>v2</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">double </td> <td class="paramname"> <em>pct</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double </td> <td class="paramname"> <em>wid</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> Calculates a vector lying a specified distance between two other vectors. <p> Given vectors v1 and v2, this function will calculate and return vector v lying between them. If pct != -1, vector v will be the point which is pct % of the way from v1 to v2. Otherwise, if pct equals -1, v will be the point along 'v1-v2' which is distance wid from v1. </div> </div><p> <a class="anchor" name="79fcafbd249db05a3c99e28f527ac787"></a><!-- doxytag: member="csDMath3::CalcNormal" ref="79fcafbd249db05a3c99e28f527ac787" args="(csDVector3 &norm, const csDVector3 &v, const csDVector3 &u)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDMath3::CalcNormal </td> <td>(</td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>norm</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>u</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> Compute the normal given two (u,v) vectors. <p> This function will calculat the normal to a polygon with two edges represented by v and u. The result is stored in norm. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00528">528</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> </div> </div><p> <a class="anchor" name="ca587c135c4534014b3544eb67370976"></a><!-- doxytag: member="csDMath3::CalcNormal" ref="ca587c135c4534014b3544eb67370976" args="(csDVector3 &norm, const csDVector3 &v1, const csDVector3 &v2, const csDVector3 &v3)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDMath3::CalcNormal </td> <td>(</td> <td class="paramtype"><a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>norm</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>v1</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>v2</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>v3</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> Calculate a plane normal given three vectors. <p> This function will calculate the normal to the plane formed by vectors v1, v2, and v3, and store the result in norm. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00517">517</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> </div> </div><p> <a class="anchor" name="fdf5bcdfaab065f376e872e8d5ac1c5f"></a><!-- doxytag: member="csDMath3::CalcPlane" ref="fdf5bcdfaab065f376e872e8d5ac1c5f" args="(const csDVector3 &v1, const csDVector3 &v2, const csDVector3 &v3, csDVector3 &normal, double &D)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDMath3::CalcPlane </td> <td>(</td> <td class="paramtype">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </td> <td class="paramname"> <em>v1</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>v2</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>v3</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>normal</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">double & </td> <td class="paramname"> <em>D</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> Calculate the plane equation given three vectors. <p> Given three vectors v1, v2, and v3, forming a plane, this function will calculate the plane equation and return the result in 'normal' and 'D'. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00538">538</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> </div> </div><p> <a class="anchor" name="2b5a9cca86f2742c78b4bffb078f7a65"></a><!-- doxytag: member="csDMath3::DoubleArea3" ref="2b5a9cca86f2742c78b4bffb078f7a65" args="(const csDVector3 &a, const csDVector3 &b, const csDVector3 &c)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static double csDMath3::DoubleArea3 </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">const <a class="el" href="classcsDVector3.html">csDVector3</a> & </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>c</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> Compute twice the area of triangle composed by three points. <p> This function returns 2 x the area of the triangle formed by the points a, b, and c. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00504">504</a> of file <a class="el" href="math3d__d_8h-source.html">math3d_d.h</a>.</p> <p>References <a class="el" href="classcsDVector3.html#a19961661f3d095fe2087f1a8a29a0d8">csDVector3::Norm()</a>.</p> </div> </div><p> <a class="anchor" name="1e3101ca30ba235f6e6ebe4785602b7a"></a><!-- doxytag: member="csDMath3::PlanesClose" ref="1e3101ca30ba235f6e6ebe4785602b7a" args="(const csDPlane &p1, const csDPlane &p2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDMath3::PlanesClose </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><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> Check if two planes are close together. <p> Two planes are close if there are almost equal OR if the normalized versions are almost equal. </div> </div><p> <a class="anchor" name="651dcf5133964175047989b2fbeb43cc"></a><!-- doxytag: member="csDMath3::PlanesEqual" ref="651dcf5133964175047989b2fbeb43cc" args="(const csDPlane &p1, const csDPlane &p2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDMath3::PlanesEqual </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><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> Check if two planes are almost equal. <p> The function returns true iff each component of the plane equation for one plane is within .001 of the corresponding component of the other plane. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00551">551</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#l00036">ABS</a>, <a class="el" href="math3d__d_8h-source.html#l00365">csDPlane::DD</a>, and <a class="el" href="math3d__d_8h-source.html#l00362">csDPlane::norm</a>.</p> </div> </div><p> <a class="anchor" name="48a54d79b557e0e8094cf371d61076cd"></a><!-- doxytag: member="csDMath3::SetMinMax" ref="48a54d79b557e0e8094cf371d61076cd" args="(const csDVector3 &v, csDVector3 &min, csDVector3 &max)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static void csDMath3::SetMinMax </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>min</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>max</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> Set the min and max vector if this vector exceeds their current limits. <p> This function will check each component of vector v against the maximum and minimum values specified by min and max. If the limits are exceeded, new min or max values will be set. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00491">491</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#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="40a3dc332936b63e7ee56b98c52e5def"></a><!-- doxytag: member="csDMath3::Visible" ref="40a3dc332936b63e7ee56b98c52e5def" args="(const csDVector3 &p, const csDPlane &pl)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDMath3::Visible </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>pl</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> Check if the plane is visible from the given point. <p> This function does a back-face culling test to see whether the front face of plane pl is visible from point p. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00470">470</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="72ba2209398b3b2c680513b793df6bce"></a><!-- doxytag: member="csDMath3::Visible" ref="72ba2209398b3b2c680513b793df6bce" args="(const csDVector3 &p, const csDVector3 &t1, const csDVector3 &t2, const csDVector3 &t3)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static bool csDMath3::Visible </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>t1</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>t2</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>t3</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> Tests if the front face of a triangle is visible from the given point. <p> Visibility test (backface culling) to see if the triangle formed by t1, t2, and t3 is visible from point p. </div> </div><p> <a class="anchor" name="e152ed51b1678b74b871341ccc8dbd7a"></a><!-- doxytag: member="csDMath3::WhichSide3D" ref="e152ed51b1678b74b871341ccc8dbd7a" args="(const csDVector3 &p, const csDVector3 &v1, const csDVector3 &v2)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">static int csDMath3::WhichSide3D </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>v1</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>v2</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> Tests which side of a plane the given 3D point is on. <p> Return -1 if point p is left of plane '0-v1-v2', 1 if point p is right of plane '0-v1-v2', or 0 if point p lies on plane '0-v1-v2'. Plane '0-v1-v2' is the plane passing through points <0,0,0>, v1, and v2. <p>Definition at line <a class="el" href="math3d__d_8h-source.html#l00446">446</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#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> <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>