source: OGRE/trunk/ogrenew/Docs/api/html/OgreHardwareVertexBuffer_8h-source.html @ 692

Revision 692, 29.6 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>OgreHardwareVertexBuffer.h Source File - OGRE Documentation</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
4<link type="text/css" rel="stylesheet" href="style.css">
5</head>
6
7<body>
8<!-- Generated by Doxygen 1.3.6 -->
9<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>
10<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>
1100002 <span class="comment">-----------------------------------------------------------------------------</span>
1200003 <span class="comment">This source file is part of OGRE</span>
1300004 <span class="comment">    (Object-oriented Graphics Rendering Engine)</span>
1400005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span>
1500006 <span class="comment"></span>
1600007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span>
1700008 <span class="comment">Also see acknowledgements in Readme.html</span>
1800009 <span class="comment"></span>
1900010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span>
2000011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span>
2100012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span>
2200013 <span class="comment">version.</span>
2300014 <span class="comment"></span>
2400015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span>
2500016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span>
2600017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span>
2700018 <span class="comment"></span>
2800019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span>
2900020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span>
3000021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span>
3100022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span>
3200023 <span class="comment">-----------------------------------------------------------------------------</span>
3300024 <span class="comment">*/</span>
3400025 <span class="preprocessor">#ifndef __HardwareVertexBuffer__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __HardwareVertexBuffer__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="comment">// Precompiler options</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3900030 <span class="preprocessor">#include "<a class="code" href="OgreHardwareBuffer_8h.html">OgreHardwareBuffer.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreSharedPtr_8h.html">OgreSharedPtr.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span>
4200033
4300034 <span class="keyword">namespace </span>Ogre {
44<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#a16">_OgreExport</a> HardwareVertexBuffer : <span class="keyword">public</span> <a class="code" href="classOgre_1_1HardwareBuffer.html">HardwareBuffer</a>
4500037     {
4600038         <span class="keyword">protected</span>:
4700039
48<a name="l00040"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBufferp0">00040</a>             size_t mNumVertices;
49<a name="l00041"></a><a class="code" href="classOgre_1_1HardwareVertexBuffer.html#Ogre_1_1HardwareVertexBufferp1">00041</a>             size_t mVertexSize;
5000042
5100043         <span class="keyword">public</span>:
5200045             HardwareVertexBuffer(size_t vertexSize, size_t numVertices,
5300046                 HardwareBuffer::Usage usage, <span class="keywordtype">bool</span> useSystemMemory, <span class="keywordtype">bool</span> useShadowBuffer);
5400047             ~HardwareVertexBuffer();
55<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; }
56<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; }
5700052
5800053
5900054
6000055             <span class="comment">// NB subclasses should override lock, unlock, readData, writeData</span>
6100056
6200057     };
6300058
64<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;
6500061     {
6600062     <span class="keyword">public</span>:
67<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;() {}
6800064         <span class="keyword">explicit</span> HardwareVertexBufferSharedPtr(HardwareVertexBuffer* buf);
6900065
7000066
7100067     };
7200068
73<a name="l00070"></a><a class="code" href="namespaceOgre.html#a659">00070</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a659">VertexElementSemantic</a> {
7400072         <a class="code" href="namespaceOgre.html#a659a167">VES_POSITION</a> = 1,
7500074         <a class="code" href="namespaceOgre.html#a659a168">VES_BLEND_WEIGHTS</a> = 2,
7600076         <a class="code" href="namespaceOgre.html#a659a169">VES_BLEND_INDICES</a> = 3,
7700078         <a class="code" href="namespaceOgre.html#a659a170">VES_NORMAL</a> = 4,
7800080         <a class="code" href="namespaceOgre.html#a659a171">VES_DIFFUSE</a> = 5,
7900082         <a class="code" href="namespaceOgre.html#a659a172">VES_SPECULAR</a> = 6,
8000084         <a class="code" href="namespaceOgre.html#a659a173">VES_TEXTURE_COORDINATES</a> = 7,
8100086         <a class="code" href="namespaceOgre.html#a659a174">VES_BINORMAL</a> = 8,
8200088         <a class="code" href="namespaceOgre.html#a659a175">VES_TANGENT</a> = 9
8300089
8400090     };
8500091
86<a name="l00093"></a><a class="code" href="namespaceOgre.html#a660">00093</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a660">VertexElementType</a>
8700094     {
8800095         <a class="code" href="namespaceOgre.html#a660a176">VET_FLOAT1</a> = 0,
8900096         <a class="code" href="namespaceOgre.html#a660a177">VET_FLOAT2</a> = 1,
9000097         <a class="code" href="namespaceOgre.html#a660a178">VET_FLOAT3</a> = 2,
9100098         <a class="code" href="namespaceOgre.html#a660a179">VET_FLOAT4</a> = 3,
9200100         <a class="code" href="namespaceOgre.html#a660a180">VET_COLOUR</a> = 4,
9300101         <a class="code" href="namespaceOgre.html#a660a181">VET_SHORT1</a> = 5,
9400102         <a class="code" href="namespaceOgre.html#a660a182">VET_SHORT2</a> = 6,
9500103         <a class="code" href="namespaceOgre.html#a660a183">VET_SHORT3</a> = 7,
9600104         <a class="code" href="namespaceOgre.html#a660a184">VET_SHORT4</a> = 8,
9700105         <a class="code" href="namespaceOgre.html#a660a185">VET_UBYTE4</a> = 9,
9800107         <a class="code" href="namespaceOgre.html#a660a186">VET_COLOUR_ARGB</a> = 10,
9900109         <a class="code" href="namespaceOgre.html#a660a187">VET_COLOUR_ABGR</a> = 11
10000110     };
10100111
102<a name="l00121"></a><a class="code" href="classOgre_1_1VertexElement.html">00121</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexElement
10300122     {
10400123     <span class="keyword">protected</span>:
105<a name="l00125"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp0">00125</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mSource;
106<a name="l00127"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp1">00127</a>         size_t mOffset;
107<a name="l00129"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp2">00129</a>         <a class="code" href="namespaceOgre.html#a660">VertexElementType</a> mType;
108<a name="l00131"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp3">00131</a>         <a class="code" href="namespaceOgre.html#a659">VertexElementSemantic</a> mSemantic;
109<a name="l00133"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp4">00133</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mIndex;
11000134     <span class="keyword">public</span>:
11100136         VertexElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
11200137             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
113<a name="l00139"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa1">00139</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; }
114<a name="l00141"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa2">00141</a>         size_t getOffset(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mOffset; }
115<a name="l00143"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa3">00143</a>         <a class="code" href="namespaceOgre.html#a660">VertexElementType</a> getType(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mType; }
116<a name="l00145"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa4">00145</a>         <a class="code" href="namespaceOgre.html#a659">VertexElementSemantic</a> getSemantic(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mSemantic; }
117<a name="l00147"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa5">00147</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; }
11800149         size_t getSize(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
11900151         <span class="keyword">static</span> size_t getTypeSize(VertexElementType etype);
12000153         <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getTypeCount(VertexElementType etype);
12100157         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a660">VertexElementType</a> multiplyTypeCount(VertexElementType baseType, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> count);
12200161         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a660">VertexElementType</a> getBaseType(VertexElementType multiType);
12300162
12400169         <span class="keyword">static</span> <span class="keywordtype">void</span> convertColourValue(VertexElementType srcType,
12500170             VertexElementType dstType, <a class="code" href="namespaceOgre.html#a455">uint32</a>* ptr);
12600171
12700177         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a455">uint32</a> convertColourValue(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; src,
12800178             VertexElementType dst);
12900179
13000181         <span class="keyword">static</span> <a class="code" href="namespaceOgre.html#a660">VertexElementType</a> getBestColourVertexElementType(<span class="keywordtype">void</span>);
13100182
132<a name="l00183"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa7">00183</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a623">operator== </a>(<span class="keyword">const</span> VertexElement&amp; rhs)<span class="keyword"> const</span>
13300184 <span class="keyword">        </span>{
13400185             <span class="keywordflow">if</span> (mType != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp2">mType</a> ||
13500186                 mIndex != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp4">mIndex</a> ||
13600187                 mOffset != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp1">mOffset</a> ||
13700188                 mSemantic != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp3">mSemantic</a> ||
13800189                 mSource != rhs.<a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementp0">mSource</a>)
13900190                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
14000191             <span class="keywordflow">else</span>
14100192                 <span class="keywordflow">return</span> <span class="keyword">true</span>;
14200193
14300194         }
144<a name="l00202"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa8">00202</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>
14500203 <span class="keyword">        </span>{
14600204             <span class="comment">// The only way we can do this is to cast to char* in order to use byte offset</span>
14700205             <span class="comment">// then cast back to void*.</span>
14800206             *pElem = static_cast&lt;void*&gt;(
14900207                 static_cast&lt;unsigned char*&gt;(pBase) + mOffset);
15000208         }
151<a name="l00216"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa9">00216</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>
15200217 <span class="keyword">        </span>{
15300218             <span class="comment">// The only way we can do this is to cast to char* in order to use byte offset</span>
15400219             <span class="comment">// then cast back to float*. However we have to go via void* because casting</span>
15500220             <span class="comment">// directly is not allowed</span>
15600221             *pElem = static_cast&lt;float*&gt;(
15700222                 static_cast&lt;void*&gt;(
15800223                     static_cast&lt;unsigned char*&gt;(pBase) + mOffset));
15900224         }
16000225
161<a name="l00233"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa10">00233</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> baseVertexPointerToElement(<span class="keywordtype">void</span>* pBase, <a class="code" href="namespaceOgre.html#a68">RGBA</a>** pElem)<span class="keyword"> const</span>
16200234 <span class="keyword">        </span>{
16300235             *pElem = static_cast&lt;RGBA*&gt;(
16400236                 static_cast&lt;void*&gt;(
16500237                     static_cast&lt;unsigned char*&gt;(pBase) + mOffset));
16600238         }
167<a name="l00246"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa11">00246</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>
16800247 <span class="keyword">        </span>{
16900248             *pElem = static_cast&lt;unsigned char*&gt;(pBase) + mOffset;
17000249         }
17100250
172<a name="l00258"></a><a class="code" href="classOgre_1_1VertexElement.html#Ogre_1_1VertexElementa12">00258</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>
17300259 <span class="keyword">        </span>{
17400260             *pElem = static_cast&lt;unsigned short*&gt;(pBase) + mOffset;
17500261         }
17600262
17700263
17800264     };
179<a name="l00287"></a><a class="code" href="classOgre_1_1VertexDeclaration.html">00287</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexDeclaration
18000288     {
18100289     <span class="keyword">public</span>:
182<a name="l00291"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">00291</a>         <span class="keyword">typedef</span> std::list&lt;VertexElement&gt; <a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">VertexElementList</a>;
18300293         <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);
18400294     <span class="keyword">protected</span>:
185<a name="l00295"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">00295</a>         <a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationw0">VertexElementList</a> mElementList;
18600296     <span class="keyword">public</span>:
18700298         VertexDeclaration();
18800299         <span class="keyword">virtual</span> ~VertexDeclaration();
18900300
190<a name="l00302"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa2">00302</a>         size_t getElementCount(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> mElementList.size(); }
19100304         <span class="keyword">const</span> VertexElementList&amp; getElements(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
19200306         <span class="keyword">const</span> VertexElement* getElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
19300307
19400316         <span class="keywordtype">void</span> sort(<span class="keywordtype">void</span>);
19500317
19600328         <span class="keywordtype">void</span> closeGapsInSource(<span class="keywordtype">void</span>);
19700329
19800340         VertexDeclaration* getAutoOrganisedDeclaration(<span class="keywordtype">bool</span> skeletalAnimation,
19900341             <span class="keywordtype">bool</span> vertexAnimation);
20000342
20100344         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getMaxSource(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
20200345
20300346
20400347
20500361         <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,
20600362             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
20700376         <span class="keyword">virtual</span> <span class="keyword">const</span> VertexElement&amp; insertElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> atPosition,
20800377             <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source, size_t offset, VertexElementType theType,
20900378             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
21000379
21100381         <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeElement(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> elem_index);
21200382
21300389         <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);
21400390
21500392         <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeAllElements(<span class="keywordtype">void</span>);
21600393
21700399         <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,
21800400             VertexElementSemantic semantic, <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index = 0);
21900401
22000407         <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);
22100417         <span class="keyword">virtual</span> VertexElementList findElementsBySource(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source);
22200418
22300420         <span class="keyword">virtual</span> size_t getVertexSize(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> source);
22400421
22500423         <span class="keyword">virtual</span> VertexDeclaration* clone(<span class="keywordtype">void</span>);
22600424
227<a name="l00425"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa19">00425</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a623">operator== </a>(<span class="keyword">const</span> VertexDeclaration&amp; rhs)<span class="keyword"> const</span>
22800426 <span class="keyword">        </span>{
22900427             <span class="keywordflow">if</span> (mElementList.size() != rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.size())
23000428                 <span class="keywordflow">return</span> <span class="keyword">false</span>;
23100429
23200430             VertexElementList::const_iterator i, iend, rhsi, rhsiend;
23300431             iend = mElementList.end();
23400432             rhsiend = rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.end();
23500433             rhsi = rhs.<a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationp0">mElementList</a>.begin();
23600434             <span class="keywordflow">for</span> (i = mElementList.begin(); i != iend &amp;&amp; rhsi != rhsiend; ++i, ++rhsi)
23700435             {
23800436                 <span class="keywordflow">if</span> ( !(*i == *rhsi) )
23900437                     <span class="keywordflow">return</span> <span class="keyword">false</span>;
24000438             }
24100439
24200440             <span class="keywordflow">return</span> <span class="keyword">true</span>;
24300441         }
244<a name="l00442"></a><a class="code" href="classOgre_1_1VertexDeclaration.html#Ogre_1_1VertexDeclarationa20">00442</a>         <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a624">operator!= </a>(<span class="keyword">const</span> VertexDeclaration&amp; rhs)<span class="keyword"> const</span>
24500443 <span class="keyword">        </span>{
24600444             <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == rhs);
24700445         }
24800446
24900447     };
25000448
251<a name="l00462"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html">00462</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexBufferBinding
25200463     {
25300464     <span class="keyword">public</span>:
254<a name="l00466"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">00466</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>;
25500467     <span class="keyword">protected</span>:
256<a name="l00468"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingp0">00468</a>         <a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingw0">VertexBufferBindingMap</a> mBindingMap;
257<a name="l00469"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindingp1">00469</a>         <span class="keyword">mutable</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> mHighIndex;
25800470     <span class="keyword">public</span>:
25900472         VertexBufferBinding();
26000473         <span class="keyword">virtual</span> ~VertexBufferBinding();
26100482         <span class="keyword">virtual</span> <span class="keywordtype">void</span> setBinding(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index, HardwareVertexBufferSharedPtr buffer);
26200484         <span class="keyword">virtual</span> <span class="keywordtype">void</span> unsetBinding(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
26300485
26400487         <span class="keyword">virtual</span> <span class="keywordtype">void</span> unsetAllBindings(<span class="keywordtype">void</span>);
26500488
26600490         <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>;
26700491
26800493         <span class="keyword">virtual</span> HardwareVertexBufferSharedPtr getBuffer(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
26900495         <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isBufferBound(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
27000496
271<a name="l00497"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindinga8">00497</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(); }
27200498
273<a name="l00504"></a><a class="code" href="classOgre_1_1VertexBufferBinding.html#Ogre_1_1VertexBufferBindinga9">00504</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++; }
27400505
27500506
27600507
27700508
27800509     };
27900510
28000511
28100512
28200513 }
28300514 <span class="preprocessor">#endif</span>
28400515 <span class="preprocessor"></span>
285</pre></div><hr>
286<p>
287Copyright &copy; 2000-2005 by The OGRE Team<br />
288<!--Creative Commons License--><a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/"><img alt="Creative Commons License" border="0" src="http://creativecommons.org/images/public/somerights20.png"/></a><br/>
289This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/">Creative Commons Attribution-ShareAlike 2.5 License</a>.<br/>
290                <!--/Creative Commons License--><!-- <rdf:RDF xmlns="http://web.resource.org/cc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
291                <Work rdf:about="">
292                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
293        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
294                </Work>
295                <License rdf:about="http://creativecommons.org/licenses/by-sa/2.5/"><permits rdf:resource="http://web.resource.org/cc/Reproduction"/><permits rdf:resource="http://web.resource.org/cc/Distribution"/><requires rdf:resource="http://web.resource.org/cc/Notice"/><requires rdf:resource="http://web.resource.org/cc/Attribution"/><permits rdf:resource="http://web.resource.org/cc/DerivativeWorks"/><requires rdf:resource="http://web.resource.org/cc/ShareAlike"/></License></rdf:RDF> -->
296
297Last modified Sun Mar 12 14:37:42 2006
298</p>
299</body>
300</html>
Note: See TracBrowser for help on using the repository browser.