<!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: IMeshBuffer.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_mesh_buffer_8h.html',''); </script> <div id="doc-content"> <div class="header"> <div class="headertitle"> <div class="title">IMeshBuffer.h</div> </div> </div> <div class="contents"> <a href="_i_mesh_buffer_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="preprocessor">#ifndef __I_MESH_BUFFER_H_INCLUDED__</span> <a name="l00006"></a>00006 <span class="preprocessor"></span><span class="preprocessor">#define __I_MESH_BUFFER_H_INCLUDED__</span> <a name="l00007"></a>00007 <span class="preprocessor"></span> <a name="l00008"></a>00008 <span class="preprocessor">#include "<a class="code" href="_i_reference_counted_8h.html">IReferenceCounted.h</a>"</span> <a name="l00009"></a>00009 <span class="preprocessor">#include "<a class="code" href="_s_material_8h.html">SMaterial.h</a>"</span> <a name="l00010"></a>00010 <span class="preprocessor">#include "<a class="code" href="aabbox3d_8h.html">aabbox3d.h</a>"</span> <a name="l00011"></a>00011 <span class="preprocessor">#include "<a class="code" href="_s3_d_vertex_8h.html">S3DVertex.h</a>"</span> <a name="l00012"></a>00012 <span class="preprocessor">#include "<a class="code" href="_s_vertex_index_8h.html">SVertexIndex.h</a>"</span> <a name="l00013"></a>00013 <span class="preprocessor">#include "<a class="code" href="_e_hardware_buffer_flags_8h.html">EHardwareBufferFlags.h</a>"</span> <a name="l00014"></a>00014 <span class="preprocessor">#include "<a class="code" href="_e_primitive_types_8h.html">EPrimitiveTypes.h</a>"</span> <a name="l00015"></a>00015 <a name="l00016"></a>00016 <span class="keyword">namespace </span>irr <a name="l00017"></a>00017 { <a name="l00018"></a>00018 <span class="keyword">namespace </span>scene <a name="l00019"></a>00019 { <a name="l00021"></a>00021 <a name="l00039"></a><a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html">00039</a> <span class="keyword">class </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> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code" href="classirr_1_1_i_reference_counted.html" title="Base class of most objects of the Irrlicht Engine.">IReferenceCounted</a> <a name="l00040"></a>00040 { <a name="l00041"></a>00041 <span class="keyword">public</span>: <a name="l00042"></a>00042 <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1video_1_1_s_material.html" title="Struct for holding parameters for a material renderer.">video::SMaterial</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a26fd922f00fde56abbbbbe40b485238b" title="Get the material of this meshbuffer.">getMaterial</a>() = 0; <a name="l00046"></a>00046 <a name="l00048"></a>00048 <a name="l00049"></a>00049 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1video_1_1_s_material.html" title="Struct for holding parameters for a material renderer.">video::SMaterial</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a26fd922f00fde56abbbbbe40b485238b" title="Get the material of this meshbuffer.">getMaterial</a>() <span class="keyword">const</span> = 0; <a name="l00050"></a>00050 <a name="l00052"></a>00052 <a name="l00053"></a>00053 <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1video.html#a0e3b59e025e0d0db0ed2ee0ce904deac" title="Enumeration for all vertex types there are.">video::E_VERTEX_TYPE</a> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a4d7a84ae4416487736f0ed0f519bb4f0" title="Get type of vertex data which is stored in this meshbuffer.">getVertexType</a>() <span class="keyword">const</span> = 0; <a name="l00054"></a>00054 <a name="l00056"></a>00056 <a name="l00058"></a>00058 <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a99891e516246b2cff13b362a435c8028" title="Get access to vertex data. The data is an array of vertices.">getVertices</a>() <span class="keyword">const</span> = 0; <a name="l00059"></a>00059 <a name="l00061"></a>00061 <a name="l00063"></a>00063 <span class="keyword">virtual</span> <span class="keywordtype">void</span>* <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a99891e516246b2cff13b362a435c8028" title="Get access to vertex data. The data is an array of vertices.">getVertices</a>() = 0; <a name="l00064"></a>00064 <a name="l00066"></a>00066 <a name="l00067"></a>00067 <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_mesh_buffer.html#a77ab285c8c886af8ddeb0371db7bde96" title="Get amount of vertices in meshbuffer.">getVertexCount</a>() <span class="keyword">const</span> = 0; <a name="l00068"></a>00068 <a name="l00070"></a>00070 <a name="l00071"></a>00071 <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1video.html#af152a1edea2579f0517e0049525acb55">video::E_INDEX_TYPE</a> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a8a993431c2c35420b62a577dc18dbdc2" title="Get type of index data which is stored in this meshbuffer.">getIndexType</a>() <span class="keyword">const</span> =0; <a name="l00072"></a>00072 <a name="l00074"></a>00074 <a name="l00075"></a>00075 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc" title="16 bit unsigned variable.">u16</a>* <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a76c0013378012af7aeb6cb8f4ea8f9a1" title="Get access to Indices.">getIndices</a>() <span class="keyword">const</span> = 0; <a name="l00076"></a>00076 <a name="l00078"></a>00078 <a name="l00079"></a>00079 <span class="keyword">virtual</span> <a class="code" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc" title="16 bit unsigned variable.">u16</a>* <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a76c0013378012af7aeb6cb8f4ea8f9a1" title="Get access to Indices.">getIndices</a>() = 0; <a name="l00080"></a>00080 <a name="l00082"></a>00082 <a name="l00083"></a>00083 <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_mesh_buffer.html#a96e08662e15b1205516b87ada3301551" title="Get amount of indices in this meshbuffer.">getIndexCount</a>() <span class="keyword">const</span> = 0; <a name="l00084"></a>00084 <a name="l00086"></a>00086 <a name="l00087"></a>00087 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3df</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#ac53fe1096756a40f25dae25911e27c51" title="Get the axis aligned bounding box of this meshbuffer.">getBoundingBox</a>() <span class="keyword">const</span> = 0; <a name="l00088"></a>00088 <a name="l00090"></a>00090 <a name="l00092"></a>00092 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#adbbfb7757dfbba7357193d2280893df6" title="Set axis aligned bounding box.">setBoundingBox</a>(<span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1aabbox3d.html">core::aabbox3df</a>& box) = 0; <a name="l00093"></a>00093 <a name="l00095"></a>00095 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a161877fc3afe29a816440db12a71785d" title="Recalculates the bounding box. Should be called if the mesh changed.">recalculateBoundingBox</a>() = 0; <a name="l00096"></a>00096 <a name="l00098"></a>00098 <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_mesh_buffer.html#a79ca051edc0ece69057fda7b4fe1e155" title="returns position of vertex i">getPosition</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) <span class="keyword">const</span> = 0; <a name="l00099"></a>00099 <a name="l00101"></a>00101 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a79ca051edc0ece69057fda7b4fe1e155" title="returns position of vertex i">getPosition</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) = 0; <a name="l00102"></a>00102 <a name="l00104"></a>00104 <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_mesh_buffer.html#a067c78a395736da9ace45e367cb7e2e5" title="returns normal of vertex i">getNormal</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) <span class="keyword">const</span> = 0; <a name="l00105"></a>00105 <a name="l00107"></a>00107 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1core_1_1vector3d.html">core::vector3df</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a067c78a395736da9ace45e367cb7e2e5" title="returns normal of vertex i">getNormal</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) = 0; <a name="l00108"></a>00108 <a name="l00110"></a>00110 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classirr_1_1core_1_1vector2d.html">core::vector2df</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a44e1fd7a1a3cb35492ebb556833514ed" title="returns texture coord of vertex i">getTCoords</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) <span class="keyword">const</span> = 0; <a name="l00111"></a>00111 <a name="l00113"></a>00113 <span class="keyword">virtual</span> <a class="code" href="classirr_1_1core_1_1vector2d.html">core::vector2df</a>& <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a44e1fd7a1a3cb35492ebb556833514ed" title="returns texture coord of vertex i">getTCoords</a>(<a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> i) = 0; <a name="l00114"></a>00114 <a name="l00116"></a>00116 <a name="l00121"></a>00121 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#ac9e9d7fbb10175cc6f1596ba3fe4e8f9" title="Append the vertices and indices to the current buffer.">append</a>(<span class="keyword">const</span> <span class="keywordtype">void</span>* <span class="keyword">const</span> vertices, <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> numVertices, <span class="keyword">const</span> <a class="code" href="namespaceirr.html#ae9f8ec82692ad3b83c21f555bfa70bcc" title="16 bit unsigned variable.">u16</a>* <span class="keyword">const</span> indices, <a class="code" href="namespaceirr.html#a0416a53257075833e7002efd0a18e804" title="32 bit unsigned variable.">u32</a> numIndices) = 0; <a name="l00122"></a>00122 <a name="l00124"></a>00124 <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_mesh_buffer.html#ac9e9d7fbb10175cc6f1596ba3fe4e8f9" title="Append the vertices and indices to the current buffer.">append</a>(<span class="keyword">const</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>* <span class="keyword">const</span> other) = 0; <a name="l00127"></a>00127 <a name="l00129"></a>00129 <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1scene.html#ac7d8ee8d77da75f2580bb9bb17231c27">E_HARDWARE_MAPPING</a> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#abbf42191b2fb4d2f7094a77fd76a530e" title="get the current hardware mapping hint">getHardwareMappingHint_Vertex</a>() <span class="keyword">const</span> = 0; <a name="l00130"></a>00130 <a name="l00132"></a>00132 <span class="keyword">virtual</span> <a class="code" href="namespaceirr_1_1scene.html#ac7d8ee8d77da75f2580bb9bb17231c27">E_HARDWARE_MAPPING</a> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a2260f9efb3fad4ba9581e18fccaad5a7" title="get the current hardware mapping hint">getHardwareMappingHint_Index</a>() <span class="keyword">const</span> = 0; <a name="l00133"></a>00133 <a name="l00135"></a>00135 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a133c2ee78c14db43e0fec3d3e300700a" title="set the hardware mapping hint, for driver">setHardwareMappingHint</a>( <a class="code" href="namespaceirr_1_1scene.html#ac7d8ee8d77da75f2580bb9bb17231c27">E_HARDWARE_MAPPING</a> newMappingHint, <a class="code" href="namespaceirr_1_1scene.html#a8f59a89ffef0ad8e5b2c2cb874a93e8c">E_BUFFER_TYPE</a> buffer=<a class="code" href="namespaceirr_1_1scene.html#a8f59a89ffef0ad8e5b2c2cb874a93e8ca833624730c30cffccc121fe31aa0832c" title="Change both vertex and index mapping to the same value.">EBT_VERTEX_AND_INDEX</a> ) = 0; <a name="l00136"></a>00136 <a name="l00138"></a>00138 <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classirr_1_1scene_1_1_i_mesh_buffer.html#a21c9395d9751082ce3feecf33351f918" title="flags the meshbuffer as changed, reloads hardware buffers">setDirty</a>(<a class="code" href="namespaceirr_1_1scene.html#a8f59a89ffef0ad8e5b2c2cb874a93e8c">E_BUFFER_TYPE</a> buffer=<a class="code" href="namespaceirr_1_1scene.html#a8f59a89ffef0ad8e5b2c2cb874a93e8ca833624730c30cffccc121fe31aa0832c" title="Change both vertex and index mapping to the same value.">EBT_VERTEX_AND_INDEX</a>) = 0; <a name="l00139"></a>00139 <a name="l00141"></a>00141 <a name="l00142"></a>00142 <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_mesh_buffer.html#aba48df31edf92a0117692c0be02298db" title="Get the currently used ID for identification of changes.">getChangedID_Vertex</a>() <span class="keyword">const</span> = 0; <a name="l00143"></a>00143 <a name="l00145"></a>00145 <a name="l00146"></a>00146 <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_mesh_buffer.html#acc389d76856dfb06c3ba45a92315e6d8" title="Get the currently used ID for identification of changes.">getChangedID_Index</a>() <span class="keyword">const</span> = 0; <a name="l00147"></a>00147 }; <a name="l00148"></a>00148 <a name="l00149"></a>00149 } <span class="comment">// end namespace scene</span> <a name="l00150"></a>00150 } <span class="comment">// end namespace irr</span> <a name="l00151"></a>00151 <a name="l00152"></a>00152 <span class="preprocessor">#endif</span> <a name="l00153"></a>00153 <span class="preprocessor"></span> <a name="l00154"></a>00154 </pre></div></div> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="_i_mesh_buffer_8h.html">IMeshBuffer.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:39 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>