<!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: iengine/fview.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>iengine/fview.h</h1><a href="fview_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) 2000-2001 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_IENGINE_FVIEW_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IENGINE_FVIEW_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00029"></a>00029 <span class="preprocessor">#include "<a class="code" href="ref_8h.html" title="Smart Pointers.">csutil/ref.h</a>"</span> <a name="l00030"></a>00030 <span class="preprocessor">#include "<a class="code" href="scf_8h.html" title="Crystal Space Shared Class Facility (SCF).">csutil/scf.h</a>"</span> <a name="l00031"></a>00031 <a name="l00032"></a>00032 <span class="preprocessor">#include "<a class="code" href="frustum_8h.html" title="General frustum.">csgeom/frustum.h</a>"</span> <a name="l00033"></a>00033 <a name="l00034"></a>00034 <span class="preprocessor">#include "<a class="code" href="shadows_8h.html" title="Shadow interfaces.">iengine/shadows.h</a>"</span> <a name="l00035"></a>00035 <a name="l00036"></a>00036 <a name="l00037"></a>00037 <span class="keyword">struct </span><a class="code" href="structiFrustumView.html" title="This structure represents all information needed for the frustum visibility calculator...">iFrustumView</a>; <a name="l00038"></a>00038 <span class="keyword">struct </span><a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>; <a name="l00039"></a>00039 <span class="keyword">class </span><a class="code" href="classcsFrustum.html" title="A general frustum.">csFrustum</a>; <a name="l00040"></a>00040 <span class="keyword">class </span><a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>; <a name="l00041"></a>00041 <a name="l00048"></a><a class="code" href="structiFrustumViewUserdata.html">00048</a> <span class="keyword">struct </span><a class="code" href="structiFrustumViewUserdata.html" title="User data which can be attached to iFrustumView.">iFrustumViewUserdata</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00049"></a>00049 { <a name="l00050"></a>00050 SCF_INTERFACE(<a class="code" href="structiFrustumViewUserdata.html" title="User data which can be attached to iFrustumView.">iFrustumViewUserdata</a>,2,0,0); <a name="l00051"></a>00051 }; <a name="l00052"></a>00052 <a name="l00057"></a><a class="code" href="group__engine3d__vis.html#g7e3d6c29ca07c48d012ccf67a62492aa">00057</a> <span class="keyword">typedef</span> void (<a class="code" href="group__engine3d__vis.html#g7e3d6c29ca07c48d012ccf67a62492aa" title="Function that will be called for every visited object (during CastShadows() procedure...">csFrustumViewObjectFunc</a>)(<a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* mesh, <a name="l00058"></a>00058 <a class="code" href="structiFrustumView.html" title="This structure represents all information needed for the frustum visibility calculator...">iFrustumView</a>* lview, <span class="keywordtype">bool</span> vis); <a name="l00059"></a>00059 <a name="l00066"></a><a class="code" href="classcsFrustumContext.html">00066</a> <span class="keyword">class </span><a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a> <a name="l00067"></a>00067 { <a name="l00068"></a>00068 <span class="keyword">private</span>: <a name="l00074"></a>00074 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<iShadowBlockList></a> shadows; <a name="l00079"></a>00079 <span class="keywordtype">bool</span> shared; <a name="l00080"></a>00080 <a name="l00082"></a>00082 <span class="keywordtype">bool</span> mirror; <a name="l00083"></a>00083 <a name="l00088"></a>00088 <a class="code" href="classcsRef.html" title="A smart pointer.">csRef<csFrustum></a> light_frustum; <a name="l00089"></a>00089 <a name="l00090"></a>00090 <span class="keyword">public</span>: <a name="l00092"></a><a class="code" href="classcsFrustumContext.html#8d9529a7cdfeb808c820a076e721b0b5">00092</a> <a class="code" href="classcsFrustumContext.html#8d9529a7cdfeb808c820a076e721b0b5" title="Constructor.">csFrustumContext</a> () : <a name="l00093"></a>00093 shared (false), <a name="l00094"></a>00094 mirror (false) <a name="l00095"></a>00095 { } <a name="l00096"></a>00096 <a name="l00097"></a><a class="code" href="classcsFrustumContext.html#b58e123182e2dc3d986450eed61ab86e">00097</a> <a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>& <a class="code" href="classcsFrustumContext.html#b58e123182e2dc3d986450eed61ab86e">operator= </a>(<a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a> <span class="keyword">const</span>& c) <a name="l00098"></a>00098 { <a name="l00099"></a>00099 shadows = c.<a class="code" href="classcsFrustumContext.html#adadef3e193841f9928781a28a48e8ed" title="The list of shadow frustums.">shadows</a>; <a name="l00100"></a>00100 shared = c.<a class="code" href="classcsFrustumContext.html#76a3ba20c1ce2dbaa1bd9c9bf871c3e3" title="This flag is true if the list of shadows is shared with some other csFrustumView...">shared</a>; <a name="l00101"></a>00101 mirror = c.<a class="code" href="classcsFrustumContext.html#c662dc566a7248db21c15e21ff20bd13" title="True if space is mirrored.">mirror</a>; <a name="l00102"></a>00102 light_frustum = c.<a class="code" href="classcsFrustumContext.html#b7d79233dc2b1af41444da24d82cd879" title="The frustum for the light.">light_frustum</a>; <a name="l00103"></a>00103 <span class="keywordflow">return</span> *<span class="keyword">this</span>; <a name="l00104"></a>00104 } <a name="l00105"></a>00105 <a name="l00107"></a><a class="code" href="classcsFrustumContext.html#3687bd43d70a24429f54519b51758c17">00107</a> <a class="code" href="structiShadowBlockList.html" title="This is a list of shadow blocks.">iShadowBlockList</a>* <a class="code" href="classcsFrustumContext.html#3687bd43d70a24429f54519b51758c17" title="Get the list of shadows.">GetShadows</a> () { <span class="keywordflow">return</span> shadows; } <a name="l00109"></a><a class="code" href="classcsFrustumContext.html#84c9c8b78d5b6c195a4fef645fac3dc1">00109</a> <span class="keywordtype">void</span> <a class="code" href="classcsFrustumContext.html#84c9c8b78d5b6c195a4fef645fac3dc1" title="Set the list of shadows.">SetShadows</a> (<a class="code" href="structiShadowBlockList.html" title="This is a list of shadow blocks.">iShadowBlockList</a>* shad, <span class="keywordtype">bool</span> sh = <span class="keyword">true</span>) <a name="l00110"></a>00110 { <a name="l00111"></a>00111 shadows = shad; <a name="l00112"></a>00112 shared = sh; <a name="l00113"></a>00113 } <a name="l00115"></a><a class="code" href="classcsFrustumContext.html#86ae993cd6787fa649a1db507939ad98">00115</a> <span class="keywordtype">void</span> <a class="code" href="classcsFrustumContext.html#86ae993cd6787fa649a1db507939ad98" title="Set a new (already IncRef&#39;d) list of shadows.">SetNewShadows</a> (<a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<iShadowBlockList></a> shad, <span class="keywordtype">bool</span> sh = <span class="keyword">false</span>) <a name="l00116"></a>00116 { <a name="l00117"></a>00117 shadows = shad; <a name="l00118"></a>00118 shared = sh; <a name="l00119"></a>00119 } <a name="l00121"></a><a class="code" href="classcsFrustumContext.html#334326b0a807d1ec04d5872ab01d6eb4">00121</a> <span class="keywordtype">bool</span> <a class="code" href="classcsFrustumContext.html#334326b0a807d1ec04d5872ab01d6eb4" title="Get shared.">IsShared</a> () { <span class="keywordflow">return</span> shared; } <a name="l00122"></a>00122 <a name="l00124"></a><a class="code" href="classcsFrustumContext.html#430767d78adfed510892cc7cd648376b">00124</a> <span class="keywordtype">void</span> <a class="code" href="classcsFrustumContext.html#430767d78adfed510892cc7cd648376b" title="Set the light frustum.">SetLightFrustum</a> (<a class="code" href="classcsFrustum.html" title="A general frustum.">csFrustum</a>* lf) { light_frustum = lf; } <a name="l00126"></a><a class="code" href="classcsFrustumContext.html#c5ad78936f83d4c4fa58f2da4eba85aa">00126</a> <span class="keywordtype">void</span> <a class="code" href="classcsFrustumContext.html#c5ad78936f83d4c4fa58f2da4eba85aa" title="Set a new (already IncRef&#39;d) light frustrum.">SetNewLightFrustum</a> (<a class="code" href="classcsPtr.html" title="A pointer encapsulator.">csPtr<csFrustum></a> lf) { light_frustum = lf; } <a name="l00128"></a><a class="code" href="classcsFrustumContext.html#446fa5acfd77aec8d11b785a035a6172">00128</a> <a class="code" href="classcsFrustum.html" title="A general frustum.">csFrustum</a>* <a class="code" href="classcsFrustumContext.html#446fa5acfd77aec8d11b785a035a6172" title="Get the light frustum.">GetLightFrustum</a> () { <span class="keywordflow">return</span> light_frustum; } <a name="l00129"></a>00129 <a name="l00134"></a><a class="code" href="classcsFrustumContext.html#26896dde326a133382a80bf56e11627a">00134</a> <span class="keywordtype">void</span> <a class="code" href="classcsFrustumContext.html#26896dde326a133382a80bf56e11627a" title="Set/Disable mirrored space (default false).">SetMirrored</a> (<span class="keywordtype">bool</span> m) { mirror = m; } <a name="l00136"></a><a class="code" href="classcsFrustumContext.html#11e711bfe5c5ad66dbd347882e29f708">00136</a> <span class="keywordtype">bool</span> <a class="code" href="classcsFrustumContext.html#11e711bfe5c5ad66dbd347882e29f708" title="Is mirrored.">IsMirrored</a> () { <span class="keywordflow">return</span> mirror; } <a name="l00137"></a>00137 }; <a name="l00138"></a>00138 <a name="l00139"></a>00139 <a name="l00144"></a><a class="code" href="structiFrustumView.html">00144</a> <span class="keyword">struct </span><a class="code" href="structiFrustumView.html" title="This structure represents all information needed for the frustum visibility calculator...">iFrustumView</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="structiBase.html" title="This is the basic interface: all other interfaces should be derived from this one...">iBase</a> <a name="l00145"></a>00145 { <a name="l00146"></a>00146 SCF_INTERFACE(<a class="code" href="structiFrustumView.html" title="This structure represents all information needed for the frustum visibility calculator...">iFrustumView</a>,2,0,0); <a name="l00147"></a>00147 <a name="l00149"></a>00149 <span class="keyword">virtual</span> <a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>* <a class="code" href="structiFrustumView.html#58c7db1993db95e27cd2ac1ff6b6f06a" title="Get the current frustum context.">GetFrustumContext</a> () <span class="keyword">const</span> = 0; <a name="l00157"></a>00157 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#ae785aa003ad26401baf7a3d321e54ab" title="Create a new frustum context.">CreateFrustumContext</a> () = 0; <a name="l00162"></a>00162 <span class="keyword">virtual</span> <a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>* <a class="code" href="structiFrustumView.html#634eae886e7e131e05433bd13048592f" title="Create a copy of the current frustum context and return it.">CopyFrustumContext</a> () = 0; <a name="l00167"></a>00167 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#5e89b4e845c744aa6b4cd6a7b48dd3d9" title="This function is similar to CreateFrustumContext() but it sets the given frustum...">SetFrustumContext</a> (<a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>* ctxt) = 0; <a name="l00173"></a>00173 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#d110bc29ca6bac274f26d6de5dc3404e" title="Restore a frustum context.">RestoreFrustumContext</a> (<a class="code" href="classcsFrustumContext.html" title="This structure keeps track of the current frustum context.">csFrustumContext</a>* original) = 0; <a name="l00174"></a>00174 <a name="l00176"></a>00176 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#1f7bfdaf280d359f5df7ff8ff66bd2a1" title="Set the object function.">SetObjectFunction</a> (<a class="code" href="group__engine3d__vis.html#g7e3d6c29ca07c48d012ccf67a62492aa" title="Function that will be called for every visited object (during CastShadows() procedure...">csFrustumViewObjectFunc</a>* func) = 0; <a name="l00178"></a>00178 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#f1b1f8bba712d43be132db66f9b5a7de" title="Call the object function.">CallObjectFunction</a> (<a class="code" href="structiMeshWrapper.html" title="A mesh wrapper is an engine-level object that wraps around an actual mesh object...">iMeshWrapper</a>* mesh, <span class="keywordtype">bool</span> vis) = 0; <a name="l00179"></a>00179 <a name="l00181"></a>00181 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiFrustumView.html#fcb7f6c23175cfa02a64356d8f8e9e6a" title="Get the radius.">GetRadius</a> () <span class="keyword">const</span> = 0; <a name="l00183"></a>00183 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiFrustumView.html#0ac5018878a93e03bb984f02a796f0eb" title="Get the squared radius.">GetSquaredRadius</a> () <span class="keyword">const</span> = 0; <a name="l00185"></a>00185 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiFrustumView.html#843ed034923c327a1d64c481546824bc" title="Check if a mask corresponds with the shadow mask.">CheckShadowMask</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mask) = 0; <a name="l00187"></a>00187 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiFrustumView.html#ac19f83e50c23632c2075c3ec9893667" title="Check if a mask corresponds with the process mask.">CheckProcessMask</a> (<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> mask) = 0; <a name="l00188"></a>00188 <a name="l00190"></a>00190 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#7e182077ea289b68b04419b669ce12fa" title="Start new shadow list for this frustum.">StartNewShadowBlock</a> () = 0; <a name="l00191"></a>00191 <a name="l00193"></a>00193 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiFrustumView.html#c2199eb781071e976c520a910c5d5260" title="Set or clear userdata.">SetUserdata</a> (<a class="code" href="structiFrustumViewUserdata.html" title="User data which can be attached to iFrustumView.">iFrustumViewUserdata</a>* data) = 0; <a name="l00195"></a>00195 <span class="keyword">virtual</span> <a class="code" href="structiFrustumViewUserdata.html" title="User data which can be attached to iFrustumView.">iFrustumViewUserdata</a>* <a class="code" href="structiFrustumView.html#636602cfb5f6558cdc838ce8457604b1" title="Get userdata.">GetUserdata</a> () = 0; <a name="l00196"></a>00196 }; <a name="l00197"></a>00197 <a name="l00200"></a>00200 <span class="preprocessor">#endif // __CS_IENGINE_FVIEW_H__</span> <a name="l00201"></a>00201 <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>