<!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: imesh/terrain.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>imesh/terrain.h</h1><a href="terrain_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) 2003 by Jorrit Tyberghein, Daniel Duhprey</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_IMESH_TERRAIN_H__</span> <a name="l00020"></a>00020 <span class="preprocessor"></span><span class="preprocessor">#define __CS_IMESH_TERRAIN_H__</span> <a name="l00021"></a>00021 <span class="preprocessor"></span> <a name="l00026"></a>00026 <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="l00027"></a>00027 <a name="l00028"></a>00028 <span class="preprocessor">#include "<a class="code" href="csutil_2array_8h.html" title="Generic Array Template.">csutil/array.h</a>"</span> <a name="l00029"></a>00029 <a name="l00033"></a>00033 <span class="keyword">struct </span><a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>; <a name="l00034"></a>00034 <span class="keyword">struct </span><a class="code" href="structiMaterialWrapper.html" title="A material wrapper is an engine-level object that wraps around an actual material...">iMaterialWrapper</a>; <a name="l00035"></a>00035 <span class="keyword">struct </span><a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a>; <a name="l00036"></a>00036 <span class="keyword">struct </span><a class="code" href="structiTerraFormer.html" title="TerraFormer objects are used to retrieve terrain data.">iTerraFormer</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="classcsTransform.html" title="A class which defines a transformation from one coordinate system to another.">csTransform</a>; <a name="l00040"></a>00040 <a name="l00044"></a><a class="code" href="structiTerrainObjectState.html">00044</a> <span class="keyword">struct </span><a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</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="l00045"></a>00045 { <a name="l00046"></a>00046 SCF_INTERFACE (<a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</a>, 1, 0, 0); <a name="l00047"></a>00047 <a name="l00049"></a>00049 <a name="l00053"></a>00053 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#0f62a5a4b01bf992675c44d1e70a103e" title="Set/Get the material palette, this is used to specify materials on a bytemap representing...">SetMaterialPalette</a> (<span class="keyword">const</span> <a class="code" href="classcsArray.html" title="A templated array class.">csArray<iMaterialWrapper*></a>& pal) = 0; <a name="l00054"></a>00054 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsArray.html" title="A templated array class.">csArray<iMaterialWrapper*></a>& GetMaterialPalette () <span class="keyword">const</span> = 0; <a name="l00056"></a>00056 <a name="l00058"></a>00058 <a name="l00069"></a>00069 <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"This will only work for SimpleFormers."</span>) <a name="l00070"></a>00070 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#26bdbe507f56e3aa0c045d721cd07c29" title="In short, the materialmap paints the palette onto the terrain like an indexed image...">SetMaterialMap</a> (<span class="keyword">const</span> <a class="code" href="classcsArray.html" title="A templated array class.">csArray<char></a>& data, <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) = 0; <a name="l00071"></a>00071 <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"This will only work for SimpleFormers."</span>) <a name="l00072"></a>00072 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#26bdbe507f56e3aa0c045d721cd07c29" title="In short, the materialmap paints the palette onto the terrain like an indexed image...">SetMaterialMap</a> (<a class="code" href="structiImage.html" title="The iImage interface is used to work with image objects.">iImage</a>* map) = 0; <a name="l00074"></a>00074 <a name="l00076"></a>00076 <a name="l00092"></a>00092 <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"This will only work for SimpleFormers."</span>) <a name="l00093"></a>00093 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#237d3c0b0cd2708b1ab61789e169fee6" title="In short, the materialmap paints the palette onto the terrain like an indexed image...">SetMaterialAlphaMaps</a> (<span class="keyword">const</span> <a class="code" href="classcsArray.html" title="A templated array class.">csArray</a><<a class="code" href="classcsArray.html" title="A templated array class.">csArray<char></a> >& data, <a name="l00094"></a>00094 <span class="keywordtype">int</span> x, <span class="keywordtype">int</span> y) = 0; <a name="l00095"></a>00095 <a class="code" href="cssysdef_8h.html#69b27a22db26f4a2bb7a26a85d2ab06b" title="A variant of CS_DEPRECATED_METHOD that also emits the message msg on compilers that...">CS_DEPRECATED_METHOD_MSG</a>(<span class="stringliteral">"This will only work for SimpleFormers."</span>) <a name="l00096"></a>00096 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#237d3c0b0cd2708b1ab61789e169fee6" title="In short, the materialmap paints the palette onto the terrain like an indexed image...">SetMaterialAlphaMaps</a> (<span class="keyword">const</span> <a class="code" href="classcsArray.html" title="A templated array class.">csArray<iImage*></a>& maps) = 0; <a name="l00098"></a>00098 <a name="l00111"></a>00111 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#beaa14b5bd6e7891647eea81bb24acbb" title="Set a LOD parameter.">SetLODValue</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* parameter, <span class="keywordtype">float</span> value) = 0; <a name="l00115"></a>00115 <span class="keyword">virtual</span> <span class="keywordtype">float</span> <a class="code" href="structiTerrainObjectState.html#a09ec6f694cb539fd9cfb9a6950883af" title="Get a LOD parameter.">GetLODValue</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* parameter) <span class="keyword">const</span> = 0; <a name="l00116"></a>00116 <a name="l00118"></a>00118 <a name="l00125"></a>00125 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#c543bdd9649d97478b3233fdc741b390" title="Save/Restore preprocessing information, the algorithm will do some preprocessing...">SaveState</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *filename) = 0; <a name="l00126"></a>00126 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> RestoreState (<span class="keyword">const</span> <span class="keywordtype">char</span> *filename) = 0; <a name="l00128"></a>00128 <a name="l00130"></a>00130 <span class="keyword">virtual</span> <span class="keywordtype">int</span> <a class="code" href="structiTerrainObjectState.html#cece8ffc2dcd7458a5fdd341816602f2" title="Detects collision with a specific transform.">CollisionDetect</a> (<a class="code" href="structiMovable.html" title="This interface represents the position and orientation of an object relative to its...">iMovable</a> *m, <a class="code" href="classcsTransform.html" title="A class which defines a transformation from one coordinate system to another.">csTransform</a> *p) = 0; <a name="l00131"></a>00131 <a name="l00135"></a>00135 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiTerrainObjectState.html#a9fdf8fab6009b2969402372a19e871a" title="Enable or disable the use of static lighting.">SetStaticLighting</a> (<span class="keywordtype">bool</span> enable) = 0; <a name="l00139"></a>00139 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#db93b58c32238f27002c68b23678ce3c" title="Retrieve whether static lighting is enabled.">GetStaticLighting</a> () = 0; <a name="l00140"></a>00140 <a name="l00144"></a>00144 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiTerrainObjectState.html#f3a5be3939e0779414c1711ee6d8bbeb" title="Enable or disable shadow casting by this terrain mesh.">SetCastShadows</a> (<span class="keywordtype">bool</span> enable) = 0; <a name="l00148"></a>00148 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainObjectState.html#5153800085d50c2d0b59635d737cea8d" title="Retrieve whether shadow casting is enabled.">GetCastShadows</a> () = 0; <a name="l00149"></a>00149 <a name="l00154"></a>00154 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiTerrainObjectState.html#90700c53106c168a7216c0a9805a1518" title="Set the name of the materalmap file, the width, height, and if it is raw or a plain...">SetMaterialMapFile</a> (<span class="keyword">const</span> <span class="keywordtype">char</span>* file, <span class="keywordtype">int</span> width, <span class="keywordtype">int</span> height, <a name="l00155"></a>00155 <span class="keywordtype">bool</span> raw = <span class="keyword">false</span>) = 0; <a name="l00156"></a>00156 <a name="l00161"></a>00161 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="structiTerrainObjectState.html#8c9001dd1487ccfa67d300b4b6d81c24" title="Get the name of the materalmap file, the width, height, and if it is raw or a plain...">GetMaterialMapFile</a> (<span class="keywordtype">int</span>& width, <span class="keywordtype">int</span>& height, <a name="l00162"></a>00162 <span class="keywordtype">bool</span>& raw) = 0; <a name="l00163"></a>00163 <a name="l00164"></a>00164 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetTopNeighbor(<a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</a> *top)=0; <a name="l00165"></a>00165 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetRightNeighbor(<a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</a> *right)=0; <a name="l00166"></a>00166 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetLeftNeighbor(<a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</a> *left)=0; <a name="l00167"></a>00167 <span class="keyword">virtual</span> <span class="keywordtype">void</span> SetBottomNeighbor(<a class="code" href="structiTerrainObjectState.html" title="This will override the settings for material in the parent.">iTerrainObjectState</a> *bottom)=0; <a name="l00168"></a>00168 <a name="l00169"></a>00169 }; <a name="l00170"></a>00170 <a name="l00176"></a><a class="code" href="structiTerrainFactoryState.html">00176</a> <span class="keyword">struct </span><a class="code" href="structiTerrainFactoryState.html" title="Allows the setting of a set of generic terrain parameters outside any specific algorithm...">iTerrainFactoryState</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="l00177"></a>00177 { <a name="l00178"></a>00178 SCF_INTERFACE (<a class="code" href="structiTerrainFactoryState.html" title="Allows the setting of a set of generic terrain parameters outside any specific algorithm...">iTerrainFactoryState</a>, 1, 0, 0); <a name="l00179"></a>00179 <a name="l00181"></a>00181 <a name="l00189"></a>00189 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiTerrainFactoryState.html#f8e6ef21a36272194f8364412af623e2" title="The terraformer defines the height, scale and other properties related to the formation...">SetTerraFormer</a> (<a class="code" href="structiTerraFormer.html" title="TerraFormer objects are used to retrieve terrain data.">iTerraFormer</a> *form) = 0; <a name="l00190"></a>00190 <span class="keyword">virtual</span> <a class="code" href="structiTerraFormer.html" title="TerraFormer objects are used to retrieve terrain data.">iTerraFormer</a> *GetTerraFormer () = 0; <a name="l00192"></a>00192 <a name="l00194"></a>00194 <a name="l00199"></a>00199 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="structiTerrainFactoryState.html#88d5f1284224c1d615ee3e7adfa738be" title="This specifies the max region the renderer will sample from.">SetSamplerRegion</a> (<span class="keyword">const</span> <a class="code" href="classcsBox2.html" title="A bounding box in 2D space.">csBox2</a>& region) = 0; <a name="l00200"></a>00200 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classcsBox2.html" title="A bounding box in 2D space.">csBox2</a>& GetSamplerRegion () = 0; <a name="l00202"></a>00202 <a name="l00204"></a>00204 <a name="l00211"></a>00211 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="structiTerrainFactoryState.html#31a7bfa60b58cd2465dbc3510b08a743" title="Save/Restore preprocessing information, the algorithm will do some preprocessing...">SaveState</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> *filename) = 0; <a name="l00212"></a>00212 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> RestoreState (<span class="keyword">const</span> <span class="keywordtype">char</span> *filename) = 0; <a name="l00214"></a>00214 }; <a name="l00215"></a>00215 <a name="l00218"></a>00218 <span class="preprocessor">#endif // __CS_IMESH_TERRAIN_H__</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>