<!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: csgeom/tcovbuf.h Source File (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><a href="classes.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> <h1>csgeom/tcovbuf.h</h1><a href="tcovbuf_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span> <a name="l00002"></a>00002 <span class="comment"> Copyright (C) 2002-2005 by Jorrit Tyberghein</span> <a name="l00003"></a>00003 <span class="comment"></span> <a name="l00004"></a>00004 <span class="comment"> This library is free software; you can redistribute it and/or</span> <a name="l00005"></a>00005 <span class="comment"> modify it under the terms of the GNU Library General Public</span> <a name="l00006"></a>00006 <span class="comment"> License as published by the Free Software Foundation; either</span> <a name="l00007"></a>00007 <span class="comment"> version 2 of the License, or (at your option) any later version.</span> <a name="l00008"></a>00008 <span class="comment"></span> <a name="l00009"></a>00009 <span class="comment"> This library is distributed in the hope that it will be useful,</span> <a name="l00010"></a>00010 <span class="comment"> but WITHOUT ANY WARRANTY; without even the implied warranty of</span> <a name="l00011"></a>00011 <span class="comment"> MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</span> <a name="l00012"></a>00012 <span class="comment"> Library General Public License for more details.</span> <a name="l00013"></a>00013 <span class="comment"></span> <a name="l00014"></a>00014 <span class="comment"> You should have received a copy of the GNU Library General Public</span> <a name="l00015"></a>00015 <span class="comment"> License along with this library; if not, write to the Free</span> <a name="l00016"></a>00016 <span class="comment"> Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.</span> <a name="l00017"></a>00017 <span class="comment">*/</span> <a name="l00018"></a>00018 <a name="l00019"></a>00019 <span class="preprocessor">#ifndef __CS_CSGEOM_TCOVBUF_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_CSGEOM_TCOVBUF_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00022"></a>00022 <span class="preprocessor">#include "csextern.h"</span> <a name="l00023"></a>00023 <a name="l00024"></a>00024 <span class="preprocessor">#include "<a class="code" href="scf__implementation_8h.html" title="Crystal Space Shared Class Facility (SCF) - implementation creation support.">csutil/scf_implementation.h</a>"</span> <a name="l00025"></a>00025 <span class="preprocessor">#include "<a class="code" href="dbghelp_8h.html" title="Debugging helper interface.">iutil/dbghelp.h</a>"</span> <a name="l00026"></a>00026 <span class="preprocessor">#include "<a class="code" href="ref_8h.html" title="Smart Pointers.">csutil/ref.h</a>"</span> <a name="l00027"></a>00027 <a name="l00034"></a>00034 <span class="keyword">struct </span><a class="code" href="structiGraphics2D.html" title="This is the interface for 2D renderer.">iGraphics2D</a>; <a name="l00035"></a>00035 <span class="keyword">struct </span><a class="code" href="structiGraphics3D.html" title="This is the standard 3D graphics interface.">iGraphics3D</a>; <a name="l00036"></a>00036 <span class="keyword">struct </span><a class="code" href="structiBugPlug.html" title="Using this interface you can communicate with the BugPlug plugin.">iBugPlug</a>; <a name="l00037"></a>00037 <a name="l00038"></a>00038 <span class="keyword">class </span><a class="code" href="classcsBox2.html" title="A bounding box in 2D space.">csBox2</a>; <a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>; <a name="l00040"></a>00040 <span class="keyword">class </span><a class="code" href="classcsString.html" title="Thin wrapper around csStringFast&lt;&gt; with its default buffer size.">csString</a>; <a name="l00041"></a>00041 <span class="keyword">class </span><a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>; <a name="l00042"></a>00042 <span class="keyword">class </span><a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>; <a name="l00043"></a>00043 <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">class </span><a class="code" href="classcsTiledCoverageBuffer.html" title="The tiled coverage Buffer.">csTiledCoverageBuffer</a>; <a name="l00046"></a>00046 <a name="l00047"></a>00047 <a name="l00048"></a>00048 <span class="keyword">enum</span> <a name="l00049"></a>00049 { <a name="l00050"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d68915fcf5472a817829e063132971aac">00050</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d68915fcf5472a817829e063132971aac">SHIFT_TILECOL</a> = 6, <a name="l00051"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d8c0cf2728532579e735d14077f640f7a">00051</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d8c0cf2728532579e735d14077f640f7a">SHIFT_TILEROW</a> = 5, <a name="l00052"></a>00052 <a name="l00053"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">00053</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">NUM_TILECOL</a> = (1<<<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d68915fcf5472a817829e063132971aac">SHIFT_TILECOL</a>), <a name="l00054"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d24b855de56bb460d4e3ff5c513f5bb74">00054</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d24b855de56bb460d4e3ff5c513f5bb74">NUM_TILEROW</a> = (1<<<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d8c0cf2728532579e735d14077f640f7a">SHIFT_TILEROW</a>), <a name="l00055"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dbbcdaead3f6a5a914b54109a1f98bc61">00055</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dbbcdaead3f6a5a914b54109a1f98bc61">NUM_DEPTHROW</a> = (<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d24b855de56bb460d4e3ff5c513f5bb74">NUM_TILEROW</a>/8), <a name="l00056"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dac6893982ba126875e79f19828851b08">00056</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dac6893982ba126875e79f19828851b08">NUM_DEPTHCOL</a> = (<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">NUM_TILECOL</a>/8), <a name="l00057"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d2ba665d86acc5832076ba849a2b34019">00057</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d2ba665d86acc5832076ba849a2b34019">NUM_DEPTH</a> = (<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dbbcdaead3f6a5a914b54109a1f98bc61">NUM_DEPTHROW</a> * <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4dac6893982ba126875e79f19828851b08">NUM_DEPTHCOL</a>), <a name="l00058"></a>00058 <a name="l00059"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d84b2d632630129f85d672ee0d739837c">00059</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d84b2d632630129f85d672ee0d739837c">TILECOL_EMPTY</a> = 0, <a name="l00060"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d1aafac7ccca4be5da7cad24262e8ba61">00060</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d1aafac7ccca4be5da7cad24262e8ba61">TILECOL_FULL</a> = ((<a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a>)~0), <a name="l00061"></a>00061 <a name="l00062"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d3203b99558ccc5cdf902b682155d12e9">00062</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d3203b99558ccc5cdf902b682155d12e9">TEST_OCCLUDER_QUALITY</a> = 1, <a name="l00063"></a><a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d08f31c7eac3917681ae0c21c2a5c3f09">00063</a> <a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d08f31c7eac3917681ae0c21c2a5c3f09">TB_DUMMY</a> = -1 <span class="comment">//to force it to signed</span> <a name="l00064"></a>00064 }; <a name="l00065"></a>00065 <a name="l00066"></a><a class="code" href="group__geom__utils.html#gb6d30c9dd13c542edf1c21a298f40003">00066</a> <span class="keyword">typedef</span> <a class="code" href="group__util.html#g1134b580f8da4de94ca6b1de4d37975e" title="unsigned 32-bit integer (0..4 294 967 295)">uint32</a> <a class="code" href="group__geom__utils.html#gb6d30c9dd13c542edf1c21a298f40003">csTileCol</a>; <a name="l00067"></a>00067 <a name="l00071"></a><a class="code" href="classcsBox2Int.html">00071</a> <span class="keyword">class </span><a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a> <a name="l00072"></a>00072 { <a name="l00073"></a>00073 <span class="keyword">public</span>: <a name="l00074"></a><a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">00074</a> <span class="keywordtype">int</span> <a class="code" href="classcsBox2Int.html#e83bd9c2f7636e2fbf13c866eece5f9c">minx</a>, <a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">miny</a>; <a name="l00075"></a><a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">00075</a> <span class="keywordtype">int</span> <a class="code" href="classcsBox2Int.html#242f9eda2ec1cc1f7906ecbae279b6e4">maxx</a>, <a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">maxy</a>; <a name="l00076"></a><a class="code" href="classcsBox2Int.html#a7ea1d912ac465cb6af4c1d2166c1232">00076</a> <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& <a class="code" href="classcsBox2Int.html#a7ea1d912ac465cb6af4c1d2166c1232">operator+= </a>(<span class="keyword">const</span> <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& box) <a name="l00077"></a>00077 { <a name="l00078"></a>00078 <span class="keywordflow">if</span> (box.<a class="code" href="classcsBox2Int.html#e83bd9c2f7636e2fbf13c866eece5f9c">minx</a> < <a class="code" href="classcsBox2Int.html#e83bd9c2f7636e2fbf13c866eece5f9c">minx</a>) <a class="code" href="classcsBox2Int.html#e83bd9c2f7636e2fbf13c866eece5f9c">minx</a> = box.<a class="code" href="classcsBox2Int.html#e83bd9c2f7636e2fbf13c866eece5f9c">minx</a>; <a name="l00079"></a>00079 <span class="keywordflow">if</span> (box.<a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">miny</a> < <a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">miny</a>) <a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">miny</a> = box.<a class="code" href="classcsBox2Int.html#05df13df184110a7c2ac8c82c506b502">miny</a>; <a name="l00080"></a>00080 <span class="keywordflow">if</span> (box.<a class="code" href="classcsBox2Int.html#242f9eda2ec1cc1f7906ecbae279b6e4">maxx</a> > <a class="code" href="classcsBox2Int.html#242f9eda2ec1cc1f7906ecbae279b6e4">maxx</a>) <a class="code" href="classcsBox2Int.html#242f9eda2ec1cc1f7906ecbae279b6e4">maxx</a> = box.<a class="code" href="classcsBox2Int.html#242f9eda2ec1cc1f7906ecbae279b6e4">maxx</a>; <a name="l00081"></a>00081 <span class="keywordflow">if</span> (box.<a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">maxy</a> > <a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">maxy</a>) <a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">maxy</a> = box.<a class="code" href="classcsBox2Int.html#3b157027b06af550395c701df8104db6">maxy</a>; <a name="l00082"></a>00082 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00083"></a>00083 } <a name="l00084"></a>00084 }; <a name="l00085"></a>00085 <a name="l00090"></a><a class="code" href="structcsTestRectData.html">00090</a> <span class="keyword">struct </span><a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a> <a name="l00091"></a>00091 { <a name="l00092"></a><a class="code" href="structcsTestRectData.html#bec8eaf87f248f1dbe869a1f00633037">00092</a> <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a> <a class="code" href="structcsTestRectData.html#bec8eaf87f248f1dbe869a1f00633037">bbox</a>; <a name="l00093"></a><a class="code" href="structcsTestRectData.html#243f40f57d099bebf19c6ea2ff9c71c0">00093</a> <span class="keywordtype">int</span> <a class="code" href="structcsTestRectData.html#243f40f57d099bebf19c6ea2ff9c71c0">startrow</a>, <a class="code" href="structcsTestRectData.html#cff60b56d2bfdaf5a26c0fd511f1de38">endrow</a>; <a name="l00094"></a><a class="code" href="structcsTestRectData.html#8a0f66e0e8cdfe0a8298b4f09115758e">00094</a> <span class="keywordtype">int</span> <a class="code" href="structcsTestRectData.html#8a0f66e0e8cdfe0a8298b4f09115758e">startcol</a>, <a class="code" href="structcsTestRectData.html#97b65db273f301eeba24c5ae1d1789c8">endcol</a>; <a name="l00095"></a><a class="code" href="structcsTestRectData.html#419583d8d20dd134f11eb57bcfd697af">00095</a> <span class="keywordtype">int</span> <a class="code" href="structcsTestRectData.html#419583d8d20dd134f11eb57bcfd697af">start_x</a>, <a class="code" href="structcsTestRectData.html#c13bc2f1dbb06f03653aaee2765d665f">end_x</a>; <a name="l00096"></a>00096 }; <a name="l00097"></a>00097 <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="comment">// Line operations in a tile.</span> <a name="l00100"></a>00100 <span class="keyword">enum</span> <a name="l00101"></a>00101 { <a name="l00102"></a><a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a2556a7be2645b19f5ff990038d361fd2b7">00102</a> <a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a2556a7be2645b19f5ff990038d361fd2b7">OP_LINE</a> = 1, <span class="comment">// General line.</span> <a name="l00103"></a><a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a250709060a34bdfdeb374668d1d95b81c7">00103</a> <a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a250709060a34bdfdeb374668d1d95b81c7">OP_VLINE</a> = 2, <span class="comment">// Vertical line.</span> <a name="l00104"></a><a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a252fa51968ec47f4502bb539926f1e63f3">00104</a> <a class="code" href="group__geom__utils.html#ggba01db17f4a2bfbc3db60dc172972a252fa51968ec47f4502bb539926f1e63f3">OP_FULLVLINE</a> = 3 <span class="comment">// Full vertical line (from 0 to 63).</span> <a name="l00105"></a>00105 }; <a name="l00106"></a>00106 <a name="l00107"></a>00107 <span class="comment">// A definition for a line operation.</span> <a name="l00108"></a><a class="code" href="structcsLineOperation.html">00108</a> <span class="keyword">struct </span><a class="code" href="structcsLineOperation.html">csLineOperation</a> <a name="l00109"></a>00109 { <a name="l00110"></a><a class="code" href="structcsLineOperation.html#f0be70aec82bab3827f51865bf403c0b">00110</a> <a class="code" href="group__util.html#gdde6aaee8457bee49c2a92621fe22b79" title="unsigned 8-bit integer (0..255)">uint8</a> <a class="code" href="structcsLineOperation.html#f0be70aec82bab3827f51865bf403c0b">op</a>; <span class="comment">// One of OP_...</span> <a name="l00111"></a>00111 <span class="comment">// All coordinates are with 0,0 relative to top-left of tile.</span> <a name="l00112"></a>00112 <span class="comment">// x coordinates are also shifted 16 to the left.</span> <a name="l00113"></a><a class="code" href="structcsLineOperation.html#eab582df930cf295b905b13a908684a8">00113</a> <span class="keywordtype">int</span> <a class="code" href="structcsLineOperation.html#eab582df930cf295b905b13a908684a8">x1</a>; <span class="comment">// Start of line.</span> <a name="l00114"></a><a class="code" href="structcsLineOperation.html#d5776d2c94f9f275f6e1dcf5fcc03035">00114</a> <span class="keywordtype">int</span> <a class="code" href="structcsLineOperation.html#d5776d2c94f9f275f6e1dcf5fcc03035">y1</a>; <span class="comment">// Start of line. Not used with OP_FULLVLINE.</span> <a name="l00115"></a><a class="code" href="structcsLineOperation.html#36e054bf67951d2c45e99c95765be04a">00115</a> <span class="keywordtype">int</span> <a class="code" href="structcsLineOperation.html#36e054bf67951d2c45e99c95765be04a">x2</a>; <span class="comment">// End of line. Only used with OP_LINE.</span> <a name="l00116"></a><a class="code" href="structcsLineOperation.html#0e43c08e03df580a51f94f1ca023b805">00116</a> <span class="keywordtype">int</span> <a class="code" href="structcsLineOperation.html#0e43c08e03df580a51f94f1ca023b805">y2</a>; <span class="comment">// End of line. Not used with OP_FULLVLINE.</span> <a name="l00117"></a><a class="code" href="structcsLineOperation.html#ed0ca49f48d05f4589e9a12665d59f13">00117</a> <span class="keywordtype">int</span> <a class="code" href="structcsLineOperation.html#ed0ca49f48d05f4589e9a12665d59f13">dx</a>; <span class="comment">// Slope to add to x1 (shifted 16 to left).</span> <a name="l00118"></a>00118 }; <a name="l00119"></a>00119 <a name="l00125"></a><a class="code" href="classcsCoverageTile.html">00125</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsCoverageTile.html" title="Coverage tile.">csCoverageTile</a> <a name="l00126"></a>00126 { <a name="l00127"></a><a class="code" href="classcsCoverageTile.html#9776186fa257ccba40bd2083de2db1fd">00127</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classcsTiledCoverageBuffer.html" title="The tiled coverage Buffer.">csTiledCoverageBuffer</a>; <a name="l00128"></a>00128 <a name="l00129"></a>00129 <span class="keyword">private</span>: <a name="l00130"></a>00130 <span class="comment">// If true entire tile is full.</span> <a name="l00131"></a>00131 <span class="keywordtype">bool</span> tile_full; <a name="l00132"></a>00132 <span class="comment">// If true tile is queued as empty but 'coverage' and other</span> <a name="l00133"></a>00133 <span class="comment">// data structures may not yet reflect this.</span> <a name="l00134"></a>00134 <span class="keywordtype">bool</span> queue_tile_empty; <a name="l00135"></a>00135 <a name="l00136"></a>00136 <span class="comment">// The coverage bits.</span> <a name="l00137"></a>00137 csTileCol coverage[<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">NUM_TILECOL</a>]; <a name="l00138"></a>00138 <a name="l00139"></a>00139 <span class="comment">// The cache on which we will write lines before or-ing that to the</span> <a name="l00140"></a>00140 <span class="comment">// real coverage bits.</span> <a name="l00141"></a>00141 <span class="keyword">static</span> csTileCol coverage_cache[<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">NUM_TILECOL</a>]; <a name="l00142"></a>00142 <a name="l00143"></a>00143 <span class="comment">// This is an array of precalculated bit-sets for vertical line</span> <a name="l00144"></a>00144 <span class="comment">// segments that start at 'n' and go to 63.</span> <a name="l00145"></a>00145 <span class="keyword">static</span> csTileCol precalc_end_lines[<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d24b855de56bb460d4e3ff5c513f5bb74">NUM_TILEROW</a>]; <a name="l00146"></a>00146 <span class="comment">// This is an array of precalculated bit-sets for vertical line</span> <a name="l00147"></a>00147 <span class="comment">// segments that start at 0 and go to 'n'.</span> <a name="l00148"></a>00148 <span class="keyword">static</span> csTileCol precalc_start_lines[<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d24b855de56bb460d4e3ff5c513f5bb74">NUM_TILEROW</a>]; <a name="l00149"></a>00149 <span class="comment">// If true the two arrays above are initialized.</span> <a name="l00150"></a>00150 <span class="keyword">static</span> <span class="keywordtype">bool</span> precalc_init; <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="comment">// For every block a depth value (4 blocks on every row, ordered</span> <a name="l00153"></a>00153 <span class="comment">// by rows).</span> <a name="l00154"></a>00154 <span class="keywordtype">float</span> depth[<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d2ba665d86acc5832076ba849a2b34019">NUM_DEPTH</a>]; <a name="l00155"></a>00155 <span class="comment">// Minimum depth of all blocks.</span> <a name="l00156"></a>00156 <span class="keywordtype">float</span> tile_min_depth; <a name="l00157"></a>00157 <span class="comment">// Maximum depth of all blocks.</span> <a name="l00158"></a>00158 <span class="keywordtype">float</span> tile_max_depth; <a name="l00159"></a>00159 <a name="l00160"></a>00160 <span class="comment">// Line Operations that are waiting to be executed.</span> <a name="l00161"></a>00161 <span class="keywordtype">int</span> num_operations; <a name="l00162"></a>00162 <span class="keywordtype">int</span> max_operations; <a name="l00163"></a>00163 <a class="code" href="structcsLineOperation.html">csLineOperation</a>* operations; <a name="l00164"></a>00164 <a name="l00165"></a>00165 <span class="comment">// A temporary values that are used to test if the objects in the write</span> <a name="l00166"></a>00166 <span class="comment">// queue can actually help cull the object.</span> <a name="l00167"></a>00167 <span class="keywordtype">bool</span> covered; <a name="l00168"></a>00168 <span class="keywordtype">bool</span> fully_covered; <a name="l00169"></a>00169 <a name="l00170"></a>00170 <span class="comment">// Add an operation.</span> <a name="l00171"></a>00171 <a class="code" href="structcsLineOperation.html">csLineOperation</a>& AddOperation (); <a name="l00172"></a>00172 <a name="l00173"></a>00173 <span class="comment">// Check if the precalc tables are precalculated. If not</span> <a name="l00174"></a>00174 <span class="comment">// precalculate them.</span> <a name="l00175"></a>00175 <span class="keyword">static</span> <span class="keywordtype">void</span> MakePrecalcTables (); <a name="l00176"></a>00176 <a name="l00177"></a>00177 <span class="comment">// Count how many objects were occluded away that covered this tile.</span> <a name="l00178"></a>00178 <span class="keywordtype">int</span> objects_culled; <a name="l00179"></a>00179 <a name="l00180"></a>00180 <span class="keyword">public</span>: <a name="l00181"></a><a class="code" href="classcsCoverageTile.html#30ce700265b71bda2506355fa0776da4">00181</a> <a class="code" href="classcsCoverageTile.html" title="Coverage tile.">csCoverageTile</a> () : <a name="l00182"></a>00182 tile_full (false), <a name="l00183"></a>00183 queue_tile_empty (true), <a name="l00184"></a>00184 num_operations (0), <a name="l00185"></a>00185 max_operations (16), <a name="l00186"></a>00186 covered (false) <a name="l00187"></a>00187 { <a name="l00188"></a>00188 operations = <span class="keyword">new</span> <a class="code" href="structcsLineOperation.html">csLineOperation</a> [16]; <a name="l00189"></a>00189 MakePrecalcTables (); <a name="l00190"></a>00190 MakeEmpty (); <a name="l00191"></a>00191 } <a name="l00192"></a>00192 <a name="l00193"></a><a class="code" href="classcsCoverageTile.html#adf40a2a53c39cc88bdcc647487b1bd2">00193</a> ~<a class="code" href="classcsCoverageTile.html" title="Coverage tile.">csCoverageTile</a> () <a name="l00194"></a>00194 { <a name="l00195"></a>00195 <span class="keyword">delete</span>[] operations; <a name="l00196"></a>00196 } <a name="l00197"></a>00197 <a name="l00202"></a><a class="code" href="classcsCoverageTile.html#f8df75ef06a84326284ffbbbb3c5dc97">00202</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> MarkEmpty () <a name="l00203"></a>00203 { <a name="l00204"></a>00204 queue_tile_empty = <span class="keyword">true</span>; <a name="l00205"></a>00205 tile_full = <span class="keyword">false</span>; <a name="l00206"></a>00206 objects_culled = 0; <a name="l00207"></a>00207 } <a name="l00208"></a>00208 <a name="l00209"></a><a class="code" href="tcovbuf_8h.html#83b5e428618bba6f3dfda02333e9245c">00209</a> <span class="preprocessor">#define INIT_MIN_DEPTH 999999999.0f</span> <a name="l00210"></a><a class="code" href="tcovbuf_8h.html#2e0a38b07c25c81326fa6dc462cf8cbd">00210</a> <span class="preprocessor"></span><span class="preprocessor">#define INIT_MIN_DEPTH_CMP 999900000.0f</span> <a name="l00211"></a>00211 <span class="preprocessor"></span> <a name="l00216"></a><a class="code" href="classcsCoverageTile.html#aa1874e77ee4cceaa571189b6f844962">00216</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> MakeEmpty () <a name="l00217"></a>00217 { <a name="l00218"></a>00218 tile_full = <span class="keyword">false</span>; queue_tile_empty = <span class="keyword">false</span>; <a name="l00219"></a>00219 memset (coverage, 0, <span class="keyword">sizeof</span> (csTileCol)*<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4ddeb2adbdaf8341c9142f4a008e03452e">NUM_TILECOL</a>); <a name="l00220"></a>00220 memset (depth, 0, <span class="keyword">sizeof</span> (<span class="keywordtype">float</span>)*<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d2ba665d86acc5832076ba849a2b34019">NUM_DEPTH</a>); <a name="l00221"></a>00221 tile_min_depth = <a class="code" href="tcovbuf_8h.html#83b5e428618bba6f3dfda02333e9245c">INIT_MIN_DEPTH</a>; <a name="l00222"></a>00222 tile_max_depth = 0; <a name="l00223"></a>00223 objects_culled = 0; <a name="l00224"></a>00224 } <a name="l00225"></a>00225 <a name="l00231"></a><a class="code" href="classcsCoverageTile.html#0788c954f666ff9e4cb97f865db0d684">00231</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> MakeEmptyQuick () <a name="l00232"></a>00232 { <a name="l00233"></a>00233 queue_tile_empty = <span class="keyword">false</span>; <a name="l00234"></a>00234 memset (depth, 0, <span class="keyword">sizeof</span> (<span class="keywordtype">float</span>)*<a class="code" href="group__geom__utils.html#gg16af7b253440dadd46a80a4b9fddba4d2ba665d86acc5832076ba849a2b34019">NUM_DEPTH</a>); <a name="l00235"></a>00235 tile_min_depth = <a class="code" href="tcovbuf_8h.html#83b5e428618bba6f3dfda02333e9245c">INIT_MIN_DEPTH</a>; <a name="l00236"></a>00236 tile_max_depth = 0; <a name="l00237"></a>00237 objects_culled = 0; <a name="l00238"></a>00238 } <a name="l00239"></a>00239 <a name="l00243"></a><a class="code" href="classcsCoverageTile.html#fda4ea5802b90df0a47883d9d6cd09a1">00243</a> <span class="keyword">inline</span> <span class="keywordtype">void</span> ClearOperations () <a name="l00244"></a>00244 { <a name="l00245"></a>00245 num_operations = 0; <a name="l00246"></a>00246 } <a name="l00247"></a>00247 <a name="l00251"></a><a class="code" href="classcsCoverageTile.html#fe706b84d46a17dc439872c5b19fc471">00251</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsFull ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tile_full; } <a name="l00252"></a>00252 <a name="l00258"></a><a class="code" href="classcsCoverageTile.html#0f37b2f70713c6ce379bb5281acb0ae5">00258</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> IsEmpty ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> queue_tile_empty; } <a name="l00259"></a>00259 <a name="l00263"></a>00263 <span class="keywordtype">void</span> PushLine (<span class="keywordtype">int</span> x1, <span class="keywordtype">int</span> y1, <span class="keywordtype">int</span> x2, <span class="keywordtype">int</span> y2, <span class="keywordtype">int</span> dx); <a name="l00264"></a>00264 <a name="l00268"></a>00268 <span class="keywordtype">void</span> PushVLine (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y1, <span class="keywordtype">int</span> y2); <a name="l00269"></a>00269 <a name="l00273"></a>00273 <span class="keywordtype">void</span> PushFullVLine (<span class="keywordtype">int</span> x); <a name="l00274"></a>00274 <a name="l00278"></a>00278 <span class="keywordtype">void</span> PerformOperations (); <a name="l00279"></a>00279 <a name="l00285"></a>00285 <span class="keywordtype">void</span> FlushOperations (); <a name="l00286"></a>00286 <a name="l00291"></a>00291 <span class="keywordtype">void</span> PerformOperationsOnlyFValue (csTileCol& fvalue); <a name="l00292"></a>00292 <a name="l00299"></a>00299 <span class="keywordtype">void</span> FlushOperationsOnlyFValue (csTileCol& fvalue); <a name="l00300"></a>00300 <a name="l00301"></a>00301 <span class="comment">//-----------------------------------------------------------------</span> <a name="l00302"></a>00302 <a name="l00312"></a>00312 <span class="keywordtype">bool</span> Flush (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00313"></a>00313 <a name="l00317"></a>00317 <span class="keywordtype">bool</span> FlushIgnoreDepth (csTileCol& fvalue); <a name="l00318"></a>00318 <a name="l00323"></a>00323 <span class="keywordtype">bool</span> FlushForEmpty (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00324"></a>00324 <a name="l00329"></a>00329 <span class="keywordtype">bool</span> FlushForEmptyNoDepth (csTileCol& fvalue); <a name="l00330"></a>00330 <a name="l00335"></a>00335 <span class="keywordtype">bool</span> FlushForFull (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00336"></a>00336 <a name="l00341"></a>00341 <span class="keywordtype">bool</span> FlushNoDepth (csTileCol& fvalue); <a name="l00342"></a>00342 <a name="l00347"></a>00347 <span class="keywordtype">bool</span> FlushGeneral (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00348"></a>00348 <a name="l00353"></a>00353 <span class="keywordtype">void</span> FlushForEmptyConstFValue (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00354"></a>00354 <a name="l00359"></a>00359 <span class="keywordtype">void</span> FlushForFullConstFValue (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00360"></a>00360 <a name="l00366"></a>00366 <span class="keywordtype">bool</span> FlushNoDepthConstFValue (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00367"></a>00367 <a name="l00373"></a>00373 <span class="keywordtype">bool</span> FlushGeneralConstFValue (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00374"></a>00374 <a name="l00375"></a>00375 <span class="comment">//-----------------------------------------------------------------</span> <a name="l00376"></a>00376 <a name="l00381"></a>00381 <span class="keywordtype">bool</span> TestCoverageFlush (csTileCol& fvalue, <span class="keywordtype">float</span> mindepth, <a name="l00382"></a>00382 <span class="keywordtype">bool</span>& do_depth_test); <a name="l00383"></a>00383 <a name="l00387"></a>00387 <span class="keywordtype">bool</span> TestCoverageFlushForFull (csTileCol& fvalue, <span class="keywordtype">float</span> mindepth, <a name="l00388"></a>00388 <span class="keywordtype">bool</span>& do_depth_test); <a name="l00389"></a>00389 <a name="l00393"></a>00393 <span class="keywordtype">bool</span> TestCoverageFlushGeneral (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth, <a name="l00394"></a>00394 <span class="keywordtype">bool</span>& do_depth_test); <a name="l00395"></a>00395 <a name="l00396"></a>00396 <span class="comment">//-----------------------------------------------------------------</span> <a name="l00397"></a>00397 <a name="l00402"></a>00402 <span class="keywordtype">bool</span> TestDepthFlush (csTileCol& fvalue, <span class="keywordtype">float</span> mindepth); <a name="l00403"></a>00403 <a name="l00407"></a>00407 <span class="keywordtype">bool</span> TestDepthFlushGeneral (csTileCol& fvalue, <span class="keywordtype">float</span> maxdepth); <a name="l00408"></a>00408 <a name="l00409"></a>00409 <span class="comment">//-----------------------------------------------------------------</span> <a name="l00410"></a>00410 <a name="l00419"></a>00419 <span class="keywordtype">bool</span> TestFullRect (<span class="keywordtype">float</span> testdepth); <a name="l00420"></a>00420 <a name="l00425"></a>00425 <span class="keywordtype">bool</span> TestDepthRect (<span class="keywordtype">int</span> start, <span class="keywordtype">int</span> end, <span class="keywordtype">float</span> testdepth); <a name="l00426"></a>00426 <a name="l00432"></a>00432 <span class="keywordtype">bool</span> TestDepthRect (<span class="keyword">const</span> csTileCol& vermask, <span class="keywordtype">int</span> start, <span class="keywordtype">int</span> end, <a name="l00433"></a>00433 <span class="keywordtype">float</span> testdepth); <a name="l00434"></a>00434 <a name="l00439"></a>00439 <span class="keywordtype">bool</span> TestCoverageRect (<span class="keywordtype">int</span> start, <span class="keywordtype">int</span> end, <span class="keywordtype">float</span> testdepth, <a name="l00440"></a>00440 <span class="keywordtype">bool</span>& do_depth_test); <a name="l00441"></a>00441 <a name="l00447"></a>00447 <span class="keywordtype">bool</span> TestCoverageRect (<span class="keyword">const</span> csTileCol& vermask, <span class="keywordtype">int</span> start, <span class="keywordtype">int</span> end, <a name="l00448"></a>00448 <span class="keywordtype">float</span> testdepth, <span class="keywordtype">bool</span>& do_depth_test); <a name="l00449"></a>00449 <a name="l00450"></a>00450 <span class="comment">//-----------------------------------------------------------------</span> <a name="l00455"></a>00455 <span class="comment"></span> <span class="keywordtype">bool</span> <a class="code" href="classcsTiledCoverageBuffer.html#c5508823055df9a85990f8148cf5556c" title="Test a point with the coverage buffer.">TestPoint</a> (<span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y, <span class="keywordtype">float</span> testdepth); <a name="l00456"></a>00456 <a name="l00460"></a>00460 <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> Debug_Dump (); <a name="l00461"></a>00461 <a name="l00465"></a>00465 <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> Debug_Dump_Cache (); <a name="l00466"></a>00466 }; <a name="l00467"></a>00467 <a name="l00476"></a><a class="code" href="classcsTiledCoverageBuffer.html">00476</a> <span class="keyword">class </span>CS_CRYSTALSPACE_EXPORT <a class="code" href="classcsTiledCoverageBuffer.html" title="The tiled coverage Buffer.">csTiledCoverageBuffer</a> : <a name="l00477"></a>00477 <span class="keyword">public</span> <a class="code" href="classscfImplementation1.html">scfImplementation1</a><csTiledCoverageBuffer,iDebugHelper> <a name="l00478"></a>00478 { <a name="l00479"></a>00479 <span class="keyword">public</span>: <a name="l00480"></a><a class="code" href="classcsTiledCoverageBuffer.html#1b4a9f608b691840ffa4e08e2739db5f">00480</a> <a class="code" href="structiBugPlug.html" title="Using this interface you can communicate with the BugPlug plugin.">iBugPlug</a>* bugplug; <span class="comment">// For debugging...</span> <a name="l00481"></a>00481 <a name="l00482"></a>00482 <span class="keyword">private</span>: <a name="l00483"></a>00483 <span class="keywordtype">int</span> width, height; <a name="l00484"></a>00484 <span class="keywordtype">int</span> width_po2; <span class="comment">// Width after correcting for power of two.</span> <a name="l00485"></a>00485 <span class="keywordtype">int</span> height_64; <span class="comment">// Height after making it a multiple of 64.</span> <a name="l00486"></a>00486 <span class="keywordtype">int</span> w_shift; <span class="comment">// Horizontal shift for width_po2 for tile multiples.</span> <a name="l00487"></a>00487 <span class="keywordtype">int</span> num_tile_rows; <a name="l00488"></a>00488 <a name="l00489"></a>00489 <span class="comment">// All tiles representing the screen (ordered by rows).</span> <a name="l00490"></a>00490 <span class="keywordtype">int</span> num_tiles; <a name="l00491"></a>00491 <a class="code" href="classcsCoverageTile.html" title="Coverage tile.">csCoverageTile</a>* tiles; <a name="l00492"></a>00492 <a name="l00493"></a>00493 <span class="comment">// For every row the following arrays contain the left-most and</span> <a name="l00494"></a>00494 <span class="comment">// right-most horizontal tile number that was affected by the polygon/outline.</span> <a name="l00495"></a>00495 <span class="comment">// DrawLine() will update these values.</span> <a name="l00496"></a>00496 <span class="keywordtype">int</span>* dirty_left; <a name="l00497"></a>00497 <span class="keywordtype">int</span>* dirty_right; <a name="l00498"></a>00498 <a name="l00505"></a>00505 <span class="keywordtype">void</span> DrawLine (<span class="keywordtype">int</span> x1, <span class="keywordtype">int</span> y1, <span class="keywordtype">int</span> x2, <span class="keywordtype">int</span> y2, <span class="keywordtype">int</span> yfurther = 0); <a name="l00506"></a>00506 <a name="l00515"></a>00515 <span class="keywordtype">bool</span> DrawPolygon (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts, <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& bbox); <a name="l00516"></a>00516 <a name="l00523"></a>00523 <span class="keywordtype">bool</span> DrawOutline (<span class="keyword">const</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>& trans, <a name="l00524"></a>00524 <span class="keywordtype">float</span> fov, <span class="keywordtype">float</span> sx, <span class="keywordtype">float</span> sy, <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>* verts, <span class="keywordtype">size_t</span> num_verts, <a name="l00525"></a>00525 <span class="keywordtype">bool</span>* used_verts, <a name="l00526"></a>00526 <span class="keywordtype">int</span>* edges, <span class="keywordtype">size_t</span> num_edges, <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& bbox, <a name="l00527"></a>00527 <span class="keywordtype">float</span>& max_depth, <span class="keywordtype">bool</span> splat_outline); <a name="l00528"></a>00528 <a name="l00532"></a>00532 <span class="keyword">inline</span> <a class="code" href="classcsCoverageTile.html" title="Coverage tile.">csCoverageTile</a>* GetTile (<span class="keywordtype">int</span> tx, <span class="keywordtype">int</span> ty) <a name="l00533"></a>00533 { <a name="l00534"></a>00534 <a class="code" href="cssysdef_8h.html#c380bd47888ecfe73e7b7a40b6f827a1" title="Assertion.">CS_ASSERT</a> (tx >= 0); <a name="l00535"></a>00535 <a class="code" href="cssysdef_8h.html#c380bd47888ecfe73e7b7a40b6f827a1" title="Assertion.">CS_ASSERT</a> (ty >= 0 && ty < num_tile_rows); <a name="l00536"></a>00536 <span class="keywordflow">return</span> &tiles[(ty<<w_shift) + tx]; <a name="l00537"></a>00537 } <a name="l00538"></a>00538 <a name="l00542"></a>00542 <span class="keyword">inline</span> <span class="keywordtype">void</span> MarkTileDirty (<span class="keywordtype">int</span> tx, <span class="keywordtype">int</span> ty) <a name="l00543"></a>00543 { <a name="l00544"></a>00544 <a class="code" href="cssysdef_8h.html#c380bd47888ecfe73e7b7a40b6f827a1" title="Assertion.">CS_ASSERT</a> (ty >= 0 && ty < num_tile_rows); <a name="l00545"></a>00545 <span class="keywordflow">if</span> (tx < dirty_left[ty]) dirty_left[ty] = tx; <a name="l00546"></a>00546 <span class="keywordflow">if</span> (tx > dirty_right[ty]) dirty_right[ty] = tx; <a name="l00547"></a>00547 } <a name="l00548"></a>00548 <a name="l00549"></a>00549 <span class="keyword">public</span>: <a name="l00551"></a>00551 <a class="code" href="classcsTiledCoverageBuffer.html" title="The tiled coverage Buffer.">csTiledCoverageBuffer</a> (<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h); <a name="l00553"></a>00553 <span class="keyword">virtual</span> ~<a class="code" href="classcsTiledCoverageBuffer.html" title="The tiled coverage Buffer.">csTiledCoverageBuffer</a> (); <a name="l00554"></a>00554 <a name="l00556"></a>00556 <span class="keywordtype">void</span> Setup (<span class="keywordtype">int</span> w, <span class="keywordtype">int</span> h); <a name="l00557"></a>00557 <a name="l00559"></a>00559 <span class="keywordtype">void</span> Initialize (); <a name="l00560"></a>00560 <a name="l00570"></a>00570 <span class="keywordtype">bool</span> TestPolygon (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts, <span class="keywordtype">float</span> min_depth); <a name="l00571"></a>00571 <a name="l00575"></a>00575 <span class="keywordtype">void</span> InsertPolygonInverted (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts, <a name="l00576"></a>00576 <span class="keywordtype">float</span> max_depth); <a name="l00577"></a>00577 <a name="l00584"></a>00584 <span class="keywordtype">void</span> InsertPolygonInvertedNoDepth (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts); <a name="l00585"></a>00585 <a name="l00596"></a>00596 <span class="keywordtype">int</span> InsertPolygon (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts, <span class="keywordtype">float</span> max_depth, <a name="l00597"></a>00597 <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& modified_bbox); <a name="l00598"></a>00598 <a name="l00610"></a>00610 <span class="keywordtype">int</span> InsertPolygonNoDepth (<a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>* verts, <span class="keywordtype">size_t</span> num_verts); <a name="l00611"></a>00611 <a name="l00625"></a>00625 <span class="keywordtype">int</span> InsertOutline (<span class="keyword">const</span> <a class="code" href="classcsReversibleTransform.html" title="A class which defines a reversible transformation from one coordinate system to another...">csReversibleTransform</a>& trans, <a name="l00626"></a>00626 <span class="keywordtype">float</span> fov, <span class="keywordtype">float</span> sx, <span class="keywordtype">float</span> sy, <a class="code" href="classcsVector3.html" title="A 3D vector.">csVector3</a>* verts, <span class="keywordtype">size_t</span> num_verts, <a name="l00627"></a>00627 <span class="keywordtype">bool</span>* used_verts, <a name="l00628"></a>00628 <span class="keywordtype">int</span>* edges, <span class="keywordtype">size_t</span> num_edges, <span class="keywordtype">bool</span> splat_outline, <a name="l00629"></a>00629 <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& modified_bbox); <a name="l00630"></a>00630 <a name="l00636"></a>00636 <span class="keywordtype">bool</span> PrepareTestRectangle (<span class="keyword">const</span> <a class="code" href="classcsBox2.html" title="A bounding box in 2D space.">csBox2</a>& rect, <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data); <a name="l00637"></a>00637 <a name="l00644"></a>00644 <span class="keywordtype">bool</span> TestRectangle (<span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data, <span class="keywordtype">float</span> min_depth); <a name="l00645"></a>00645 <a name="l00653"></a>00653 <span class="keywordtype">bool</span> QuickTestRectangle (<span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data, <span class="keywordtype">float</span> min_depth); <a name="l00654"></a>00654 <a name="l00659"></a>00659 <span class="keywordtype">void</span> MarkCulledObject (<span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data); <a name="l00660"></a>00660 <a name="l00665"></a>00665 <span class="keywordtype">int</span> CountNotCulledObjects (<span class="keyword">const</span> <a class="code" href="classcsBox2Int.html" title="A 2D bounding box with integer coordinates.">csBox2Int</a>& bbox); <a name="l00666"></a>00666 <a name="l00672"></a>00672 <span class="keywordtype">int</span> PrepareWriteQueueTest (<span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data, <span class="keywordtype">float</span> min_depth); <a name="l00673"></a>00673 <a name="l00681"></a>00681 <span class="keywordtype">int</span> AddWriteQueueTest (<span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& maindata, <a name="l00682"></a>00682 <span class="keyword">const</span> <a class="code" href="structcsTestRectData.html" title="A structure used by TestRectangle() and initialized by PrepareTestRectangle().">csTestRectData</a>& data, <span class="keywordtype">bool</span>& relevant); <a name="l00683"></a>00683 <a name="l00689"></a>00689 <span class="keywordtype">bool</span> TestPoint (<span class="keyword">const</span> <a class="code" href="classcsVector2.html" title="A 2D vector.">csVector2</a>& point, <span class="keywordtype">float</span> min_depth); <a name="l00690"></a>00690 <a name="l00696"></a>00696 <span class="keywordtype">int</span> StatusNoDepth (); <a name="l00697"></a>00697 <a name="l00698"></a>00698 <span class="comment">// Debugging functions.</span> <a name="l00699"></a>00699 <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> Debug_UnitTest (); <a name="l00700"></a>00700 <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a> Debug_Benchmark (<span class="keywordtype">int</span> num_iterations); <a name="l00701"></a>00701 <span class="keywordtype">void</span> Debug_Dump (<a class="code" href="structiGraphics3D.html" title="This is the standard 3D graphics interface.">iGraphics3D</a>* g3d, <span class="keywordtype">int</span> zoom = 1); <a name="l00702"></a>00702 <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> Debug_Dump (); <a name="l00703"></a>00703 <a name="l00704"></a><a class="code" href="classcsTiledCoverageBuffer.html#a7d1f565e23e9816447ac9962fcb9139">00704</a> <span class="keyword">virtual</span> <span class="keywordtype">int</span> GetSupportedTests ()<span class="keyword"> const</span> <a name="l00705"></a>00705 <span class="keyword"> </span>{ <a name="l00706"></a>00706 <span class="keywordflow">return</span> <a class="code" href="group__util.html#gca559d327ade26b0b01a4b81971425da" title="supports UnitTest().">CS_DBGHELP_UNITTEST</a> | <a name="l00707"></a>00707 <a class="code" href="group__util.html#gb947e222fa11aa06a0939357a6afa288" title="supports Benchmark().">CS_DBGHELP_BENCHMARK</a> | <a name="l00708"></a>00708 <a class="code" href="group__util.html#ga37681913a5cf1a42c4d0fcda4854907" title="supports graphical Dump().">CS_DBGHELP_GFXDUMP</a> | <a name="l00709"></a>00709 <a class="code" href="group__util.html#g8d1ef1bb1e14f29cfeea992cbcdbc476" title="supports non graphical Dump().">CS_DBGHELP_TXTDUMP</a>; <a name="l00710"></a>00710 } <a name="l00711"></a><a class="code" href="classcsTiledCoverageBuffer.html#081562eaf6351770cc00779e6cf59ff1">00711</a> <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> UnitTest () <a name="l00712"></a>00712 { <a name="l00713"></a>00713 <span class="keywordflow">return</span> Debug_UnitTest (); <a name="l00714"></a>00714 } <a name="l00715"></a><a class="code" href="classcsTiledCoverageBuffer.html#af6cc73b5cb2f67340437c7e233f1738">00715</a> <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> StateTest () <a name="l00716"></a>00716 { <a name="l00717"></a>00717 <span class="keywordflow">return</span> 0; <a name="l00718"></a>00718 } <a name="l00719"></a><a class="code" href="classcsTiledCoverageBuffer.html#1a0ba4431d06a2884bce3f868171701c">00719</a> <span class="keyword">virtual</span> <a class="code" href="group__util.html#g28e82998c4c2d1197a1d412bba7da793" title="A time value measured in milliseconds (1/1000 of a second).">csTicks</a> Benchmark (<span class="keywordtype">int</span> num_iterations) <a name="l00720"></a>00720 { <a name="l00721"></a>00721 <span class="keywordflow">return</span> Debug_Benchmark (num_iterations); <a name="l00722"></a>00722 } <a name="l00723"></a><a class="code" href="classcsTiledCoverageBuffer.html#9e1346aba35ee17b3b5357ddfdf83f66">00723</a> <span class="keyword">virtual</span> <a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iString></a> Dump () <a name="l00724"></a>00724 { <a name="l00725"></a>00725 <span class="keywordflow">return</span> Debug_Dump (); <a name="l00726"></a>00726 } <a name="l00727"></a><a class="code" href="classcsTiledCoverageBuffer.html#ff892b34c5fecd465866e5af5366e720">00727</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> Dump (<a class="code" href="structiGraphics3D.html" title="This is the standard 3D graphics interface.">iGraphics3D</a>* g3d) <a name="l00728"></a>00728 { <a name="l00729"></a>00729 Debug_Dump (g3d, 1); <a name="l00730"></a>00730 } <a name="l00731"></a><a class="code" href="classcsTiledCoverageBuffer.html#4db2a44db8f35e2c2dd0f5b540db0f2d">00731</a> <span class="keyword">virtual</span> <span class="keywordtype">bool</span> DebugCommand (<span class="keyword">const</span> <span class="keywordtype">char</span>*) <a name="l00732"></a>00732 { <a name="l00733"></a>00733 <span class="keywordflow">return</span> <span class="keyword">false</span>; <a name="l00734"></a>00734 } <a name="l00735"></a>00735 }; <a name="l00736"></a>00736 <a name="l00739"></a>00739 <span class="preprocessor">#endif // __CS_CSGEOM_TCOVBUF_H__</span> <a name="l00740"></a>00740 <span class="preprocessor"></span> </pre></div><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>