<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Irrlicht 3D Engine: ITerrainSceneNode.h Source File</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css" /> <link href="navtree.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="resize.js"></script> <script type="text/javascript" src="navtree.js"></script> <script type="text/javascript"> $(document).ready(initResizable); </script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/search.js"></script> <script type="text/javascript"> $(document).ready(function() { searchBox.OnSelectItem(0); }); </script> </head> <body> <div id="top"><!-- do not remove this div! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectlogo"><img alt="Logo" src="irrlichtlogo.png"/></td> <td style="padding-left: 0.5em;"> <div id="projectname">Irrlicht 3D Engine </div> </td> <td> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <img id="MSearchSelect" src="search/mag_sel.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> </span><span class="right"> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </span> </div> </td> </tr> </tbody> </table> </div> <!-- Generated by Doxygen 1.7.5.1 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <script type="text/javascript" src="dynsections.js"></script> </div> <div id="side-nav" class="ui-resizable side-nav-resizable"> <div id="nav-tree"> <div id="nav-tree-contents"> </div> </div> <div id="splitbar" style="-moz-user-select:none;" class="ui-resizable-handle"> </div> </div> <script type="text/javascript"> initNavTree('_i_terrain_scene_node_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">ITerrainSceneNode.h</div> </div> </div> <div class="contents"> <a href="_i_terrain_scene_node_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// Copyright (C) 2002-2012 Nikolaus Gebhardt</span> <a name="l00002"></a>00002 <span class="comment">// This file is part of the "Irrlicht Engine".</span> <a name="l00003"></a>00003 <span class="comment">// For conditions of distribution and use, see copyright notice in irrlicht.h</span> <a name="l00004"></a>00004 <a name="l00005"></a>00005 <span class="comment">// The code for the TerrainSceneNode is based on the terrain renderer by</span> <a name="l00006"></a>00006 <span class="comment">// Soconne and the GeoMipMapSceneNode developed by Spintz. They made their</span> <a name="l00007"></a>00007 <span class="comment">// code available for Irrlicht and allowed it to be distributed under this</span> <a name="l00008"></a>00008 <span class="comment">// licence. I only modified some parts. A lot of thanks go to them.</span> <a name="l00009"></a>00009 <a name="l00010"></a>00010 <span class="preprocessor">#ifndef __I_TERRAIN_SCENE_NODE_H__</span> <a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define __I_TERRAIN_SCENE_NODE_H__</span> <a name="l00012"></a>00012 <span class="preprocessor"></span> <a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="_e_terrain_elements_8h.html">ETerrainElements.h</a>"</span> <a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="_i_scene_node_8h.html">ISceneNode.h</a>"</span> <a name="l00015"></a>00015 <span class="preprocessor">#include "<a class="code" href="_i_dynamic_mesh_buffer_8h.html">IDynamicMeshBuffer.h</a>"</span> <a name="l00016"></a>00016 <span class="preprocessor">#include "<a class="code" href="irr_array_8h.html">irrArray.h</a>"</span> <a name="l00017"></a>00017 <a name="l00018"></a>00018 <span class="keyword">namespace </span>irr <a name="l00019"></a>00019 { <a name="l00020"></a>00020 <span class="keyword">namespace </span>io <a name="l00021"></a>00021 { <a name="l00022"></a>00022 <span class="keyword">class </span>IReadFile; <a name="l00023"></a>00023 } <span class="comment">// end namespace io</span> <a name="l00024"></a>00024 <span class="keyword">namespace </span>scene <a name="l00025"></a>00025 { <a name="l00026"></a>00026 <span class="keyword">class </span>IMesh; <a name="l00027"></a>00027 <a name="l00029"></a>00029 <a name="l00049"></a><a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html">00049</a> <span class="keyword">class </span><a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html" title="A scene node for displaying terrain using the geo mip map algorithm.">ITerrainSceneNode</a> : <span class="keyword">public</span> <a class="code" href="classirr_1_1scene_1_1_i_scene_node.html" title="Scene node interface.">ISceneNode</a> <a name="l00050"></a>00050 { <a name="l00051"></a>00051 <span class="keyword">public</span>: <a name="l00053"></a><a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a152a472837bbce22d1221086a47d8af5">00053</a> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a152a472837bbce22d1221086a47d8af5" title="Constructor.">ITerrainSceneNode</a>(<a class="code" href="classirr_1_1scene_1_1_i_scene_node.html" title="Scene node interface.">ISceneNode</a>* parent, <a class="code" href="classirr_1_1scene_1_1_i_scene_manager.html" title="The Scene Manager manages scene nodes, mesh recources, cameras and all the other stuff.">ISceneManager</a>* mgr, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <span class="keywordtype">id</span>, <a name="l00054"></a>00054 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& position = <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>(0.0f, 0.0f, 0.0f), <a name="l00055"></a>00055 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& rotation = <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>(0.0f, 0.0f, 0.0f), <a name="l00056"></a>00056 <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& scale = <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>(1.0f, 1.0f, 1.0f) ) <a name="l00057"></a>00057 : <a class="code" href="classirr_1_1scene_1_1_i_scene_node.html" title="Scene node interface.">ISceneNode</a> (parent, mgr, id, position, rotation, scale) {} <a name="l00058"></a>00058 <a name="l00060"></a>00060 <a name="l00061"></a>00061 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3d<f32></a>& <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a02a14fe28f5a326fca819c36bee2e92e" title="Get the bounding box of the terrain.">getBoundingBox</a>() <span class="keyword">const</span> =0; <a name="l00062"></a>00062 <a name="l00064"></a>00064 <a name="l00065"></a>00065 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3d<f32></a>& <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a02a14fe28f5a326fca819c36bee2e92e" title="Get the bounding box of the terrain.">getBoundingBox</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchX, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchZ) <span class="keyword">const</span> =0; <a name="l00066"></a>00066 <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a0f09a8260f325570ce58f0fc6993aff9" title="Get the number of indices currently in the meshbuffer.">getIndexCount</a>() <span class="keyword">const</span> =0; <a name="l00070"></a>00070 <a name="l00072"></a>00072 <a name="l00073"></a>00073 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh.html" title="Class which holds the geometry of an object.">IMesh</a>* <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a6b5f5fca80e77f392e23d83dc61ae88e" title="Get pointer to the mesh.">getMesh</a>() =0; <a name="l00074"></a>00074 <a name="l00076"></a>00076 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html" title="Struct for holding a mesh with a single material.">IMeshBuffer</a>* <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a3383e2d453c22c31091ad8652de2bb8a" title="Get pointer to the buffer used by the terrain (most users will not need this)">getRenderBuffer</a>() =0; <a name="l00077"></a>00077 <a name="l00078"></a>00078 <a name="l00080"></a>00080 <a name="l00082"></a>00082 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#ae23af8c2066da39ad10714dcf95dd8f1" title="Gets the meshbuffer data based on a specified level of detail.">getMeshBufferForLOD</a>(<a class="code" href="classirr_1_1scene_1_1_i_dynamic_mesh_buffer.html">IDynamicMeshBuffer</a>& mb, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> LOD=0) <span class="keyword">const</span> =0; <a name="l00083"></a>00083 <a name="l00085"></a>00085 <a name="l00093"></a>00093 <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#aec6d83c4882fad10a0b35ca5a7ec0935" title="Gets the indices for a specified patch at a specified Level of Detail.">getIndicesForPatch</a>(<a class="code" href="classirr_1_1core_1_1array.html">core::array<u32></a>& indices, <a name="l00094"></a>00094 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchX, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchZ, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> LOD=0) =0; <a name="l00095"></a>00095 <a name="l00097"></a>00097 <a name="l00100"></a>00100 <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a0d310851f0ebf1fce18d3a2c0f3dceab" title="Populates an array with the CurrentLOD of each patch.">getCurrentLODOfPatches</a>(<a class="code" href="classirr_1_1core_1_1array.html">core::array<s32></a>& LODs) <span class="keyword">const</span> =0; <a name="l00101"></a>00101 <a name="l00103"></a>00103 <a name="l00106"></a>00106 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a41b7f1ee70511d648cc11217347160ad" title="Manually sets the LOD of a patch.">setLODOfPatch</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchX, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> patchZ, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> LOD=0) =0; <a name="l00107"></a>00107 <a name="l00109"></a>00109 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a804241f60c853e74fcb8687cd887f1b7" title="Get center of terrain.">getTerrainCenter</a>() <span class="keyword">const</span> =0; <a name="l00110"></a>00110 <a name="l00112"></a>00112 <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a9289839822ea77496af62f311f01c8bb" title="Get height of a point of the terrain.">getHeight</a>(<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> x, <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> y) <span class="keyword">const</span> =0; <a name="l00113"></a>00113 <a name="l00115"></a>00115 <a name="l00117"></a>00117 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#af2c07f67c1c5319de4a796ec57950ec3" title="Sets the movement camera threshold.">setCameraMovementDelta</a>(<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> delta) =0; <a name="l00118"></a>00118 <a name="l00120"></a>00120 <a name="l00122"></a>00122 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#ad11f3e54c291487c49868728a5228b5e" title="Sets the rotation camera threshold.">setCameraRotationDelta</a>(<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> delta) =0; <a name="l00123"></a>00123 <a name="l00125"></a>00125 <a name="l00126"></a>00126 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a95cf695e54f1ef3376f7a3666c2dd834" title="Sets whether or not the node should dynamically update its associated selector when the geomipmap dat...">setDynamicSelectorUpdate</a>(<span class="keywordtype">bool</span> bVal) =0; <a name="l00127"></a>00127 <a name="l00129"></a>00129 <a name="l00135"></a>00135 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#af98b54e1a59c014d60ea888eba6010d7" title="Override the default generation of distance thresholds.">overrideLODDistance</a>(<a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> LOD, <a class="code" href="namespaceirr.html#a1325b02603ad449f92c68fc640af9b28" title="64 bit floating point variable.">f64</a> newDistance) =0; <a name="l00136"></a>00136 <a name="l00138"></a>00138 <a name="l00147"></a>00147 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#aacfb35db09be74e32c22a10c7e13bbcc" title="Scales the base texture, similar to makePlanarTextureMapping.">scaleTexture</a>(<a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> scale = 1.0f, <a class="code" href="namespaceirr.html#a0277be98d67dc26ff93b1a6a1d086b07" title="32 bit floating point variable.">f32</a> scale2=0.0f) =0; <a name="l00148"></a>00148 <a name="l00150"></a>00150 <a name="l00155"></a>00155 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#ae5c598195e3faafb7cc58b71beb7ee1b" title="Initializes the terrain data. Loads the vertices from the heightMapFile.">loadHeightMap</a>(<a class="code" href="classirr_1_1io_1_1_i_read_file.html" title="Interface providing read acess to a file.">io::IReadFile</a>* file, <a name="l00156"></a>00156 <a class="code" href="classirr_1_1video_1_1_s_color.html" title="Class representing a 32 bit ARGB color.">video::SColor</a> vertexColor=<a class="code" href="classirr_1_1video_1_1_s_color.html" title="Class representing a 32 bit ARGB color.">video::SColor</a>(255,255,255,255), <a name="l00157"></a>00157 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> smoothFactor=0) =0; <a name="l00158"></a>00158 <a name="l00160"></a>00160 <a name="l00170"></a>00170 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classirr_1_1scene_1_1_i_terrain_scene_node.html#a43d92272d8d860dda1c74b9fe795f062" title="Initializes the terrain data. Loads the vertices from the heightMapFile.">loadHeightMapRAW</a>(<a class="code" href="classirr_1_1io_1_1_i_read_file.html" title="Interface providing read acess to a file.">io::IReadFile</a>* file, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> bitsPerPixel=16, <a name="l00171"></a>00171 <span class="keywordtype">bool</span> signedData=<span class="keyword">false</span>, <span class="keywordtype">bool</span> floatVals=<span class="keyword">false</span>, <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> width=0, <a name="l00172"></a>00172 <a class="code" href="classirr_1_1video_1_1_s_color.html" title="Class representing a 32 bit ARGB color.">video::SColor</a> vertexColor=<a class="code" href="classirr_1_1video_1_1_s_color.html" title="Class representing a 32 bit ARGB color.">video::SColor</a>(255,255,255,255), <a name="l00173"></a>00173 <a class="code" href="namespaceirr.html#ac66849b7a6ed16e30ebede579f9b47c6" title="32 bit signed variable.">s32</a> smoothFactor=0) =0; <a name="l00174"></a>00174 <a name="l00175"></a>00175 }; <a name="l00176"></a>00176 <a name="l00177"></a>00177 } <span class="comment">// end namespace scene</span> <a name="l00178"></a>00178 } <span class="comment">// end namespace irr</span> <a name="l00179"></a>00179 <a name="l00180"></a>00180 <a name="l00181"></a>00181 <span class="preprocessor">#endif // __I_TERRAIN_SCENE_NODE_H__</span> <a name="l00182"></a>00182 <span class="preprocessor"></span> </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="_i_terrain_scene_node_8h.html">ITerrainSceneNode.h</a> </li> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <li class="footer"> <a href="http://irrlicht.sourceforge.net" target="_blank">Irrlicht Engine</a> Documentation © 2003-2012 by Nikolaus Gebhardt. Generated on Sun Nov 17 2013 20:18:40 for Irrlicht 3D Engine by <a href="http://www.doxygen.org/index.html" target="_blank">Doxygen</a> 1.7.5.1 </li> </ul> </div> </body> </html>