Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > contrib > by-pkgid > 04e5d8c10ae76748689b4e7f48e0fa33 > files > 546

libogre5-devel-1.0.0-1mdk.i586.rpm

<html>
<head>
<title>OgreHardwareVertexBuffer.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> 
<link type="text/css" rel="stylesheet" href="style.css">
</head>

<body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>OgreHardwareVertexBuffer.h</h1><a href="OgreHardwareVertexBuffer_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span>
00002 <span class="comment">-----------------------------------------------------------------------------</span>
00003 <span class="comment">This source file is part of OGRE</span>
00004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
00006 <span class="comment"></span>
00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
00008 <span class="comment">Also see acknowledgements in Readme.html</span>
00009 <span class="comment"></span>
00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
00013 <span class="comment">version.</span>
00014 <span class="comment"></span>
00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
00018 <span class="comment"></span>
00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
00023 <span class="comment">-----------------------------------------------------------------------------</span>
00024 <span class="comment">*/</span>
00025 <span class="preprocessor">#ifndef __HardwareVertexBuffer__</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#define __HardwareVertexBuffer__</span>
00027 <span class="preprocessor"></span>
00028 <span class="comment">// Precompiler options</span>
00029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
00030 <span class="preprocessor">#include "<a class="code" href="OgreHardwareBuffer_8h.html">OgreHardwareBuffer.h</a>"</span>
00031 <span class="preprocessor">#include "<a class="code" href="OgreSharedPtr_8h.html">OgreSharedPtr.h</a>"</span>
00032 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span>
00033 
00034 <span class="keyword">namespace </span>Ogre {
<a name="l00036"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html">00036</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a13">_OgreExport</a> HardwareVertexBuffer : <span class="keyword">public</span> <a class="code" href="classOgre_1_1HardwareBuffer.html">HardwareBuffer</a>
00037     {
00038         <span class="keyword">protected</span>:
00039             
<a name="l00040"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBufferp0">00040</a>             size_t mNumVertices;
<a name="l00041"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBufferp1">00041</a>             size_t mVertexSize;
00042 
00043         <span class="keyword">public</span>:
00045             HardwareVertexBuffer(size_t vertexSize, size_t numVertices, 
00046                 HardwareBuffer::Usage usage, <span class="keywordtype">bool</span> useSystemMemory, <span class="keywordtype">bool</span> useShadowBuffer);
00047             ~HardwareVertexBuffer();
<a name="l00049"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBuffera2">00049</a>             size_t getVertexSize(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mVertexSize; }
<a name="l00051"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBuffera3">00051</a>             size_t getNumVertices(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mNumVertices; }
00052             
00053 
00054 
00055             <span class="comment">// NB subclasses should override lock, unlock, readData, writeData</span>
00056         
00057     };
00058 
<a name="l00060"></a><a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html">00060</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> HardwareVertexBufferSharedPtr : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;HardwareVertexBuffer&gt;
00061     {
00062     <span class="keyword">public</span>:
<a name="l00063"></a><a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html#Ogre_1_1HardwareVertexBufferSharedPtra0">00063</a>         HardwareVertexBufferSharedPtr() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;HardwareVertexBuffer&gt;() {}
00064         <span class="keyword">explicit</span> HardwareVertexBufferSharedPtr(HardwareVertexBuffer* buf);
00065 
00066 
00067     };
00068 
<a name="l00070"></a><a class="code" href="namespaceOgre.html#a654">00070</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a654">VertexElementSemantic</a> {
00072         <a class="code" href="namespaceOgre.html#a654a141">VES_POSITION</a> = 1,
00074         <a class="code" href="namespaceOgre.html#a654a142">VES_BLEND_WEIGHTS</a> = 2,
00076         <a class="code" href="namespaceOgre.html#a654a143">VES_BLEND_INDICES</a> = 3,
00078         <a class="code" href="namespaceOgre.html#a654a144">VES_NORMAL</a> = 4,
00080         <a class="code" href="namespaceOgre.html#a654a145">VES_DIFFUSE</a> = 5,
00082         <a class="code" href="namespaceOgre.html#a654a146">VES_SPECULAR</a> = 6,
00084         <a class="code" href="namespaceOgre.html#a654a147">VES_TEXTURE_COORDINATES</a> = 7,
00086         <a class="code" href="namespaceOgre.html#a654a148">VES_BINORMAL</a> = 8,
00088         <a class="code" href="namespaceOgre.html#a654a149">VES_TANGENT</a> = 9
00089 
00090     };
00091 
<a name="l00093"></a><a class="code" href="namespaceOgre.html#a655">00093</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a655">VertexElementType</a>
00094     {
00095         <a class="code" href="namespaceOgre.html#a655a150">VET_FLOAT1</a>,
00096         <a class="code" href="namespaceOgre.html#a655a151">VET_FLOAT2</a>,
00097         <a class="code" href="namespaceOgre.html#a655a152">VET_FLOAT3</a>,
00098         <a class="code" href="namespaceOgre.html#a655a153">VET_FLOAT4</a>,
00099         <a class="code" href="namespaceOgre.html#a655a154">VET_COLOUR</a>,
00100         <a class="code" href="namespaceOgre.html#a655a155">VET_SHORT1</a>,
00101         <a class="code" href="namespaceOgre.html#a655a156">VET_SHORT2</a>,
00102         <a class="code" href="namespaceOgre.html#a655a157">VET_SHORT3</a>,
00103         <a class="code" href="namespaceOgre.html#a655a158">VET_SHORT4</a>, 
00104         <a class="code" href="namespaceOgre.html#a655a159">VET_UBYTE4</a>
00105     };
00106 
<a name="l00116"></a><a class="code" href="classOgre_1_1VertexElement.html">00116</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexElement
00117     {
00118     <span class="keyword">protected</span>:
<a name="l00120"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp0">00120</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mSource;
<a name="l00122"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp1">00122</a>         size_t mOffset;
<a name="l00124"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp2">00124</a>         <a class="code" href="namespaceOgre.html#a655">VertexElementType</a> mType;
<a name="l00126"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp3">00126</a>         <a class="code" href="namespaceOgre.html#a654">VertexElementSemantic</a> mSemantic;
<a name="l00128"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp4">00128</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mIndex;
00129     <span class="keyword">public</span>:
00131         VertexElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
00132             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
<a name="l00134"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa1">00134</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getSource(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSource; }
<a name="l00136"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa2">00136</a>         size_t getOffset(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mOffset; }
<a name="l00138"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa3">00138</a>         <a class="code" href="namespaceOgre.html#a655">VertexElementType</a> getType(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mType; }
<a name="l00140"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa4">00140</a>         <a class="code" href="namespaceOgre.html#a654">VertexElementSemantic</a> getSemantic(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSemantic; }
<a name="l00142"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa5">00142</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getIndex(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mIndex; }
00144         size_t getSize(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00146         <span class="keyword">static</span> size_t getTypeSize(VertexElementType etype);
00148         <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getTypeCount(VertexElementType etype);
00152         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a655">VertexElementType</a> multiplyTypeCount(VertexElementType baseType, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> count);
00156         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a655">VertexElementType</a> getBaseType(VertexElementType multiType);
00157 
<a name="l00158"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa7">00158</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a617">operator== </a>(<span class="keyword">const</span> VertexElement&amp; rhs)<span class="keyword"> const</span>
00159 <span class="keyword">        </span>{
00160             <span class="keywordflow">if</span> (mType != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp2">mType</a> || 
00161                 mIndex != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp4">mIndex</a> ||
00162                 mOffset != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp1">mOffset</a> ||
00163                 mSemantic != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp3">mSemantic</a> ||
00164                 mSource != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp0">mSource</a>)
00165                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00166             <span class="keywordflow">else</span>
00167                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
00168 
00169         }
<a name="l00177"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa8">00177</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <span class="keywordtype">void</span>** pElem)<span class="keyword"> const</span>
00178 <span class="keyword">        </span>{
00179             <span class="comment">// The only way we can do this is to cast to char* in order to use byte offset</span>
00180             <span class="comment">// then cast back to void*.</span>
00181             *pElem = static_cast&lt;void*&gt;(
00182                 static_cast&lt;unsigned char*&gt;(pBase) + mOffset);
00183         }
<a name="l00191"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa9">00191</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <span class="keywordtype">float</span>** pElem)<span class="keyword"> const</span>
00192 <span class="keyword">        </span>{
00193             <span class="comment">// The only way we can do this is to cast to char* in order to use byte offset</span>
00194             <span class="comment">// then cast back to float*. However we have to go via void* because casting  </span>
00195             <span class="comment">// directly is not allowed</span>
00196             *pElem = static_cast&lt;float*&gt;(
00197                 static_cast&lt;void*&gt;(
00198                     static_cast&lt;unsigned char*&gt;(pBase) + mOffset));
00199         }
00200 
<a name="l00208"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa10">00208</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <a class="code" href="namespaceOgre.html#a55">RGBA</a>** pElem)<span class="keyword"> const</span>
00209 <span class="keyword">        </span>{
00210             *pElem = static_cast&lt;RGBA*&gt;(
00211                 static_cast&lt;void*&gt;(
00212                     static_cast&lt;unsigned char*&gt;(pBase) + mOffset));
00213         }
<a name="l00221"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa11">00221</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>** pElem)<span class="keyword"> const</span>
00222 <span class="keyword">        </span>{
00223             *pElem = static_cast&lt;unsigned char*&gt;(pBase) + mOffset;
00224         }
00225 
<a name="l00233"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa12">00233</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span>** pElem)<span class="keyword"> const</span>
00234 <span class="keyword">        </span>{
00235             *pElem = static_cast&lt;unsigned short*&gt;(pBase) + mOffset;
00236         }
00237 
00238 
00239     };
<a name="l00262"></a><a class="code" href="classOgre_1_1VertexDeclaration.html">00262</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexDeclaration
00263     {
00264     <span class="keyword">public</span>:
<a name="l00266"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">00266</a>         <span class="keyword">typedef</span> std::list&lt;VertexElement&gt; <a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">VertexElementList</a>;
00268         <span class="keyword">static</span> <span class="keywordtype">bool</span> vertexElementLess(<span class="keyword">const</span> VertexElement&amp; e1, <span class="keyword">const</span> VertexElement&amp; e2);
00269     <span class="keyword">protected</span>:
<a name="l00270"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">00270</a>         <a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">VertexElementList</a> mElementList;
00271     <span class="keyword">public</span>:
00273         VertexDeclaration();
00274         <span class="keyword">virtual</span> ~VertexDeclaration();
00275         
<a name="l00277"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa2">00277</a>         size_t getElementCount(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> mElementList.size(); }
00279         <span class="keyword">const</span> VertexElementList&amp; getElements(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00281         <span class="keyword">const</span> VertexElement* getElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
00282 
00291         <span class="keywordtype">void</span> sort(<span class="keywordtype">void</span>);
00292 
00303         <span class="keywordtype">void</span> closeGapsInSource(<span class="keywordtype">void</span>);
00304 
00311         VertexDeclaration* getAutoOrganisedDeclaration(<span class="keywordtype">bool</span> animated);
00312 
00314         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getMaxSource(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00315 
00316 
00317 
00331         <span class="keyword">virtual</span> <span class="keyword">const</span> VertexElement&amp; addElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
00332             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
00346         <span class="keyword">virtual</span> <span class="keyword">const</span> VertexElement&amp; insertElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> atPosition,
00347             <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
00348             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
00349 
00351         <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> elem_index);
00352 
00359         <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeElement(VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
00360 
00366         <span class="keyword">virtual</span> <span class="keywordtype">void</span> modifyElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> elem_index, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
00367             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
00368 
00374         <span class="keyword">virtual</span> <span class="keyword">const</span> VertexElement* findElementBySemantic(VertexElementSemantic sem, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
00384         <span class="keyword">virtual</span> VertexElementList findElementsBySource(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source);
00385         
00387         <span class="keyword">virtual</span> size_t getVertexSize(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source);
00388 
00390         <span class="keyword">virtual</span> VertexDeclaration* clone(<span class="keywordtype">void</span>);
00391 
<a name="l00392"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa18">00392</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a617">operator== </a>(<span class="keyword">const</span> VertexDeclaration&amp; rhs)<span class="keyword"> const</span>
00393 <span class="keyword">        </span>{
00394             <span class="keywordflow">if</span> (mElementList.size() != rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.size())
00395                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
00396 
00397             VertexElementList::const_iterator i, iend, rhsi, rhsiend;
00398             iend = mElementList.end();
00399             rhsiend = rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.end();
00400             rhsi = rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.begin();
00401             <span class="keywordflow">for</span> (i = mElementList.begin(); i != iend &amp;&amp; rhsi != rhsiend; ++i, ++rhsi)
00402             {
00403                 <span class="keywordflow">if</span> ( !(*i == *rhsi) )
00404                     <span class="keywordflow">return</span> <span class="keyword">false</span>;
00405             }
00406 
00407             <span class="keywordflow">return</span> <span class="keyword">true</span>;
00408         }
<a name="l00409"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa19">00409</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a618">operator!= </a>(<span class="keyword">const</span> VertexDeclaration&amp; rhs)<span class="keyword"> const</span>
00410 <span class="keyword">        </span>{
00411             <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == rhs);
00412         }
00413 
00414     };
00415 
<a name="l00429"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html">00429</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexBufferBinding
00430     {
00431     <span class="keyword">public</span>:
<a name="l00433"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">00433</a>         <span class="keyword">typedef</span> std::map&lt;unsigned short, HardwareVertexBufferSharedPtr&gt; <a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">VertexBufferBindingMap</a>;
00434     <span class="keyword">protected</span>:
<a name="l00435"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingp0">00435</a>         <a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">VertexBufferBindingMap</a> mBindingMap;
<a name="l00436"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingp1">00436</a>         <span class="keyword">mutable</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mHighIndex;
00437     <span class="keyword">public</span>:
00439         VertexBufferBinding();
00440         <span class="keyword">virtual</span> ~VertexBufferBinding();
00449         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setBinding(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index, HardwareVertexBufferSharedPtr buffer);
00451         <span class="keyword">virtual</span> <span class="keywordtype">void</span> unsetBinding(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
00452 
00454         <span class="keyword">virtual</span> <span class="keywordtype">void</span> unsetAllBindings(<span class="keywordtype">void</span>);
00455 
00457         <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">VertexBufferBindingMap</a>&amp; getBindings(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
00458 
00460         <span class="keyword">virtual</span> HardwareVertexBufferSharedPtr getBuffer(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
00461 
<a name="l00462"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindinga7">00462</a>         <span class="keyword">virtual</span> size_t getBufferCount(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mBindingMap.size(); }
00463 
<a name="l00469"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindinga8">00469</a>         <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNextIndex(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mHighIndex++; }
00470 
00471 
00472 
00473 
00474     };
00475 
00476 
00477 
00478 }
00479 <span class="preprocessor">#endif</span>
00480 <span class="preprocessor"></span>
</pre></div><p>
Copyright &copy; 2000-2005 by The OGRE Team<br />
Last modified Wed Feb 23 00:19:07 2005
</p>
</body>
</html>