[692] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <title>OgreVertexIndexData.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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
| 10 | <h1>OgreVertexIndexData.h</h1><a href="OgreVertexIndexData_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
| 11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
| 12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
| 13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
| 14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
| 15 | 00006 <span class="comment"></span> |
---|
| 16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
| 17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
| 18 | 00009 <span class="comment"></span> |
---|
| 19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
| 20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
| 21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
| 22 | 00013 <span class="comment">version.</span> |
---|
| 23 | 00014 <span class="comment"></span> |
---|
| 24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
| 25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
| 26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
| 27 | 00018 <span class="comment"></span> |
---|
| 28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
| 29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
| 30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
| 31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
| 32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
| 33 | 00024 <span class="comment">*/</span> |
---|
| 34 | 00025 <span class="preprocessor">#ifndef __VertexIndexData_H__</span> |
---|
| 35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __VertexIndexData_H__</span> |
---|
| 36 | 00027 <span class="preprocessor"></span> |
---|
| 37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
| 38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgreHardwareVertexBuffer_8h.html">OgreHardwareVertexBuffer.h</a>"</span> |
---|
| 39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreHardwareIndexBuffer_8h.html">OgreHardwareIndexBuffer.h</a>"</span> |
---|
| 40 | 00031 |
---|
| 41 | 00032 <span class="keyword">namespace </span>Ogre { |
---|
| 42 | 00033 |
---|
| 43 | <a name="l00035"></a><a class="code" href="namespaceOgre.html#a597">00035</a> <span class="keyword">typedef</span> std::vector<HardwareBuffer::Usage> <a class="code" href="namespaceOgre.html#a597">BufferUsageList</a>; |
---|
| 44 | 00036 |
---|
| 45 | 00037 |
---|
| 46 | <a name="l00039"></a><a class="code" href="classOgre_1_1VertexData.html">00039</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> VertexData |
---|
| 47 | 00040 { |
---|
| 48 | 00041 <span class="keyword">private</span>: |
---|
| 49 | 00043 VertexData(<span class="keyword">const</span> VertexData& rhs); <span class="comment">/* do nothing, should not use */</span> |
---|
| 50 | 00045 VertexData& operator=(<span class="keyword">const</span> VertexData& rhs); <span class="comment">/* do not use */</span> |
---|
| 51 | 00046 <span class="keyword">public</span>: |
---|
| 52 | 00047 VertexData(); |
---|
| 53 | 00048 ~VertexData(); |
---|
| 54 | 00049 |
---|
| 55 | <a name="l00053"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao0">00053</a> <a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a>* vertexDeclaration; |
---|
| 56 | <a name="l00057"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao1">00057</a> <a class="code" href="classOgre_1_1VertexBufferBinding.html">VertexBufferBinding</a>* vertexBufferBinding; |
---|
| 57 | <a name="l00059"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao2">00059</a> size_t vertexStart; |
---|
| 58 | <a name="l00061"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao3">00061</a> size_t vertexCount; |
---|
| 59 | 00062 |
---|
| 60 | 00063 |
---|
| 61 | <a name="l00065"></a><a class="code" href="structOgre_1_1VertexData_1_1HardwareAnimationData.html">00065</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1VertexData_1_1HardwareAnimationData.html">HardwareAnimationData</a> |
---|
| 62 | 00066 { |
---|
| 63 | <a name="l00067"></a><a class="code" href="structOgre_1_1VertexData_1_1HardwareAnimationData.html#Ogre_1_1VertexData_1_1HardwareAnimationDatao0">00067</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1VertexElement.html">VertexElement</a>* targetVertexElement; |
---|
| 64 | <a name="l00068"></a><a class="code" href="structOgre_1_1VertexData_1_1HardwareAnimationData.html#Ogre_1_1VertexData_1_1HardwareAnimationDatao1">00068</a> <a class="code" href="namespaceOgre.html#a465">Real</a> parametric; |
---|
| 65 | 00069 }; |
---|
| 66 | <a name="l00070"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDataw0">00070</a> <span class="keyword">typedef</span> std::vector<HardwareAnimationData> <a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDataw0">HardwareAnimationDataList</a>; |
---|
| 67 | <a name="l00072"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao4">00072</a> <a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDataw0">HardwareAnimationDataList</a> hwAnimationDataList; |
---|
| 68 | <a name="l00074"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao5">00074</a> size_t hwAnimDataItemsUsed; |
---|
| 69 | 00075 |
---|
| 70 | 00079 VertexData* clone(<span class="keywordtype">bool</span> copyData = <span class="keyword">true</span>) <span class="keyword">const</span>; |
---|
| 71 | 00080 |
---|
| 72 | 00100 <span class="keywordtype">void</span> prepareForShadowVolume(<span class="keywordtype">void</span>); |
---|
| 73 | 00101 |
---|
| 74 | <a name="l00115"></a><a class="code" href="classOgre_1_1VertexData.html#Ogre_1_1VertexDatao6">00115</a> <a class="code" href="classOgre_1_1HardwareVertexBufferSharedPtr.html">HardwareVertexBufferSharedPtr</a> hardwareShadowVolWBuffer; |
---|
| 75 | 00116 |
---|
| 76 | 00117 |
---|
| 77 | 00134 <span class="keywordtype">void</span> reorganiseBuffers(<a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a>* newDeclaration, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a597">BufferUsageList</a>& bufferUsage); |
---|
| 78 | 00135 |
---|
| 79 | 00151 <span class="keywordtype">void</span> reorganiseBuffers(<a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a>* newDeclaration); |
---|
| 80 | 00152 |
---|
| 81 | 00160 <span class="keywordtype">void</span> convertPackedColour(VertexElementType srcType, VertexElementType destType); |
---|
| 82 | 00161 |
---|
| 83 | 00162 |
---|
| 84 | 00176 <span class="keywordtype">void</span> allocateHardwareAnimationElements(<a class="code" href="namespaceOgre.html#a467">ushort</a> count); |
---|
| 85 | 00177 |
---|
| 86 | 00178 |
---|
| 87 | 00179 |
---|
| 88 | 00180 }; |
---|
| 89 | 00181 |
---|
| 90 | <a name="l00183"></a><a class="code" href="classOgre_1_1IndexData.html">00183</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> IndexData |
---|
| 91 | 00184 { |
---|
| 92 | 00185 <span class="keyword">protected</span>: |
---|
| 93 | 00187 IndexData(<span class="keyword">const</span> IndexData& rhs); <span class="comment">/* do nothing, should not use */</span> |
---|
| 94 | 00189 IndexData& operator=(<span class="keyword">const</span> IndexData& rhs); <span class="comment">/* do not use */</span> |
---|
| 95 | 00190 <span class="keyword">public</span>: |
---|
| 96 | 00191 IndexData(); |
---|
| 97 | 00192 ~IndexData(); |
---|
| 98 | <a name="l00194"></a><a class="code" href="classOgre_1_1IndexData.html#Ogre_1_1IndexDatao0">00194</a> <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a> indexBuffer; |
---|
| 99 | 00195 |
---|
| 100 | <a name="l00197"></a><a class="code" href="classOgre_1_1IndexData.html#Ogre_1_1IndexDatao1">00197</a> size_t indexStart; |
---|
| 101 | 00198 |
---|
| 102 | <a name="l00200"></a><a class="code" href="classOgre_1_1IndexData.html#Ogre_1_1IndexDatao2">00200</a> size_t indexCount; |
---|
| 103 | 00201 |
---|
| 104 | 00205 IndexData* clone(<span class="keywordtype">bool</span> copyData = <span class="keyword">true</span>) <span class="keyword">const</span>; |
---|
| 105 | 00206 |
---|
| 106 | 00215 <span class="keywordtype">void</span> optimiseVertexCacheTriList(<span class="keywordtype">void</span>); |
---|
| 107 | 00216 |
---|
| 108 | 00217 }; |
---|
| 109 | 00218 |
---|
| 110 | <a name="l00224"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html">00224</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> VertexCacheProfiler |
---|
| 111 | 00225 { |
---|
| 112 | 00226 <span class="keyword">public</span>: |
---|
| 113 | <a name="l00227"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerw2">00227</a> <span class="keyword">enum</span> CacheType { |
---|
| 114 | 00228 FIFO, LRU |
---|
| 115 | 00229 }; |
---|
| 116 | 00230 |
---|
| 117 | <a name="l00231"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera0">00231</a> VertexCacheProfiler(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> cachesize = 16, CacheType cachetype = FIFO ) |
---|
| 118 | 00232 : size ( cachesize ), type ( cachetype ), tail (0), buffersize (0), hit (0), miss (0) |
---|
| 119 | 00233 { |
---|
| 120 | 00234 cache = <span class="keyword">new</span> <a class="code" href="namespaceOgre.html#a455">uint32</a>[size]; |
---|
| 121 | 00235 }; |
---|
| 122 | 00236 |
---|
| 123 | <a name="l00237"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera1">00237</a> ~VertexCacheProfiler() |
---|
| 124 | 00238 { |
---|
| 125 | 00239 <span class="keyword">delete</span>[] cache; |
---|
| 126 | 00240 } |
---|
| 127 | 00241 |
---|
| 128 | 00242 <span class="keywordtype">void</span> profile(<span class="keyword">const</span> <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a> indexBuffer); |
---|
| 129 | <a name="l00243"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera3">00243</a> <span class="keywordtype">void</span> reset() { hit = 0; miss = 0; tail = 0; buffersize = 0; }; |
---|
| 130 | <a name="l00244"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera4">00244</a> <span class="keywordtype">void</span> flush() { tail = 0; buffersize = 0; }; |
---|
| 131 | 00245 |
---|
| 132 | <a name="l00246"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera5">00246</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getHits() { <span class="keywordflow">return</span> hit; }; |
---|
| 133 | <a name="l00247"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera6">00247</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getMisses() { <span class="keywordflow">return</span> miss; }; |
---|
| 134 | <a name="l00248"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilera7">00248</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> getSize() { <span class="keywordflow">return</span> size; }; |
---|
| 135 | 00249 <span class="keyword">private</span>: |
---|
| 136 | <a name="l00250"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerr0">00250</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> size; |
---|
| 137 | <a name="l00251"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerr1">00251</a> <a class="code" href="namespaceOgre.html#a455">uint32</a> *cache; |
---|
| 138 | <a name="l00252"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerr2">00252</a> CacheType type; |
---|
| 139 | 00253 |
---|
| 140 | <a name="l00254"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerr3">00254</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> tail, buffersize; |
---|
| 141 | <a name="l00255"></a><a class="code" href="classOgre_1_1VertexCacheProfiler.html#Ogre_1_1VertexCacheProfilerr6">00255</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> hit, miss; |
---|
| 142 | 00256 |
---|
| 143 | 00257 <span class="keywordtype">bool</span> inCache(<span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> index); |
---|
| 144 | 00258 }; |
---|
| 145 | 00259 } |
---|
| 146 | 00260 <span class="preprocessor">#endif</span> |
---|
| 147 | 00261 <span class="preprocessor"></span> |
---|
| 148 | </pre></div><hr> |
---|
| 149 | <p> |
---|
| 150 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
| 151 | <!--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/> |
---|
| 152 | This 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/> |
---|
| 153 | <!--/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#"> |
---|
| 154 | <Work rdf:about=""> |
---|
| 155 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
| 156 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
| 157 | </Work> |
---|
| 158 | <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> --> |
---|
| 159 | |
---|
| 160 | Last modified Sun Mar 12 14:37:51 2006 |
---|
| 161 | </p> |
---|
| 162 | </body> |
---|
| 163 | </html> |
---|