<html> <head> <title>OgreCommon.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 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> <h1>OgreCommon.h</h1><a href="OgreCommon_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 __Common_H__</span> 00026 <span class="preprocessor"></span><span class="preprocessor">#define __Common_H__</span> 00027 <span class="preprocessor"></span><span class="comment">// Common stuff</span> 00028 00029 <span class="preprocessor">#include <utility></span> 00030 00031 <span class="keyword">namespace </span>Ogre { 00032 00033 <a name="l00036"></a><a class="code" href="namespaceOgre.html#a636">00036</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a636">CompareFunction</a> 00037 { 00038 <a class="code" href="namespaceOgre.html#a636a63">CMPF_ALWAYS_FAIL</a>, 00039 <a class="code" href="namespaceOgre.html#a636a64">CMPF_ALWAYS_PASS</a>, 00040 <a class="code" href="namespaceOgre.html#a636a65">CMPF_LESS</a>, 00041 <a class="code" href="namespaceOgre.html#a636a66">CMPF_LESS_EQUAL</a>, 00042 <a class="code" href="namespaceOgre.html#a636a67">CMPF_EQUAL</a>, 00043 <a class="code" href="namespaceOgre.html#a636a68">CMPF_NOT_EQUAL</a>, 00044 <a class="code" href="namespaceOgre.html#a636a69">CMPF_GREATER_EQUAL</a>, 00045 <a class="code" href="namespaceOgre.html#a636a70">CMPF_GREATER</a> 00046 }; 00047 <a name="l00050"></a><a class="code" href="namespaceOgre.html#a637">00050</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a637">TextureFilterOptions</a> 00051 { 00053 <a class="code" href="namespaceOgre.html#a637a71">TFO_NONE</a>, 00055 <a class="code" href="namespaceOgre.html#a637a72">TFO_BILINEAR</a>, 00057 <a class="code" href="namespaceOgre.html#a637a73">TFO_TRILINEAR</a>, 00059 <a class="code" href="namespaceOgre.html#a637a74">TFO_ANISOTROPIC</a> 00060 }; 00061 <a name="l00062"></a><a class="code" href="namespaceOgre.html#a638">00062</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a638">FilterType</a> 00063 { 00065 <a class="code" href="namespaceOgre.html#a638a75">FT_MIN</a>, 00067 <a class="code" href="namespaceOgre.html#a638a76">FT_MAG</a>, 00069 <a class="code" href="namespaceOgre.html#a638a77">FT_MIP</a> 00070 }; <a name="l00072"></a><a class="code" href="namespaceOgre.html#a639">00072</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a639">FilterOptions</a> 00073 { 00075 <a class="code" href="namespaceOgre.html#a639a78">FO_NONE</a>, 00077 <a class="code" href="namespaceOgre.html#a639a79">FO_POINT</a>, 00079 <a class="code" href="namespaceOgre.html#a639a80">FO_LINEAR</a>, 00081 <a class="code" href="namespaceOgre.html#a639a81">FO_ANISOTROPIC</a> 00082 }; 00083 <a name="l00085"></a><a class="code" href="namespaceOgre.html#a640">00085</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a640">ShadeOptions</a> 00086 { 00087 <a class="code" href="namespaceOgre.html#a640a82">SO_FLAT</a>, 00088 <a class="code" href="namespaceOgre.html#a640a83">SO_GOURAUD</a>, 00089 <a class="code" href="namespaceOgre.html#a640a84">SO_PHONG</a> 00090 }; 00091 <a name="l00093"></a><a class="code" href="namespaceOgre.html#a641">00093</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a641">FogMode</a> 00094 { 00096 <a class="code" href="namespaceOgre.html#a641a85">FOG_NONE</a>, 00098 <a class="code" href="namespaceOgre.html#a641a86">FOG_EXP</a>, 00100 <a class="code" href="namespaceOgre.html#a641a87">FOG_EXP2</a>, 00102 <a class="code" href="namespaceOgre.html#a641a88">FOG_LINEAR</a> 00103 }; 00104 <a name="l00107"></a><a class="code" href="namespaceOgre.html#a642">00107</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a642">CullingMode</a> 00108 { 00110 <a class="code" href="namespaceOgre.html#a642a89">CULL_NONE</a> = 1, 00112 <a class="code" href="namespaceOgre.html#a642a90">CULL_CLOCKWISE</a> = 2, 00114 <a class="code" href="namespaceOgre.html#a642a91">CULL_ANTICLOCKWISE</a> = 3 00115 }; 00116 <a name="l00122"></a><a class="code" href="namespaceOgre.html#a643">00122</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a643">ManualCullingMode</a> 00123 { 00125 <a class="code" href="namespaceOgre.html#a643a92">MANUAL_CULL_NONE</a> = 1, 00127 <a class="code" href="namespaceOgre.html#a643a93">MANUAL_CULL_BACK</a> = 2, 00129 <a class="code" href="namespaceOgre.html#a643a94">MANUAL_CULL_FRONT</a> = 3 00130 }; 00131 <a name="l00133"></a><a class="code" href="namespaceOgre.html#a644">00133</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a644">WaveformType</a> 00134 { 00136 <a class="code" href="namespaceOgre.html#a644a95">WFT_SINE</a>, 00138 <a class="code" href="namespaceOgre.html#a644a96">WFT_TRIANGLE</a>, 00140 <a class="code" href="namespaceOgre.html#a644a97">WFT_SQUARE</a>, 00142 <a class="code" href="namespaceOgre.html#a644a98">WFT_SAWTOOTH</a>, 00144 <a class="code" href="namespaceOgre.html#a644a99">WFT_INVERSE_SAWTOOTH</a> 00145 }; 00146 <a name="l00148"></a><a class="code" href="namespaceOgre.html#a645">00148</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a645">SceneDetailLevel</a> 00149 { 00151 <a class="code" href="namespaceOgre.html#a645a100">SDL_POINTS</a> = 1, 00153 <a class="code" href="namespaceOgre.html#a645a101">SDL_WIREFRAME</a> = 2, 00155 <a class="code" href="namespaceOgre.html#a645a102">SDL_SOLID</a> = 3 00156 }; 00157 <a name="l00159"></a><a class="code" href="namespaceOgre.html#a646">00159</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a646">ShadowTechnique</a> 00160 { 00162 <a class="code" href="namespaceOgre.html#a646a103">SHADOWTYPE_NONE</a>, 00169 <a class="code" href="namespaceOgre.html#a646a104">SHADOWTYPE_STENCIL_MODULATIVE</a>, 00177 <a class="code" href="namespaceOgre.html#a646a105">SHADOWTYPE_STENCIL_ADDITIVE</a>, 00182 <a class="code" href="namespaceOgre.html#a646a106">SHADOWTYPE_TEXTURE_MODULATIVE</a> 00183 }; 00184 <a name="l00186"></a><a class="code" href="namespaceOgre.html#a58">00186</a> <span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code" href="namespaceOgre.html#a58">TrackVertexColourType</a>; <a name="l00187"></a><a class="code" href="namespaceOgre.html#a647">00187</a> <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a647">TrackVertexColourEnum</a> { 00188 <a class="code" href="namespaceOgre.html#a647a107">TVC_NONE</a> = 0x0, 00189 <a class="code" href="namespaceOgre.html#a647a108">TVC_AMBIENT</a> = 0x1, 00190 <a class="code" href="namespaceOgre.html#a647a109">TVC_DIFFUSE</a> = 0x2, 00191 <a class="code" href="namespaceOgre.html#a647a110">TVC_SPECULAR</a> = 0x4, 00192 <a class="code" href="namespaceOgre.html#a647a111">TVC_EMISSIVE</a> = 0x8 00193 }; 00194 <a name="l00195"></a><a class="code" href="namespaceOgre.html#a59">00195</a> <span class="keyword">typedef</span> std::vector<Light*> <a class="code" href="namespaceOgre.html#a59">LightList</a>; 00196 <a name="l00197"></a><a class="code" href="namespaceOgre.html#a60">00197</a> <span class="keyword">typedef</span> std::map<String, bool> <a class="code" href="namespaceOgre.html#a60">UnaryOptionList</a>; <a name="l00198"></a><a class="code" href="namespaceOgre.html#a61">00198</a> <span class="keyword">typedef</span> std::map<String, String> <a class="code" href="namespaceOgre.html#a61">BinaryOptionList</a>; 00199 <a name="l00201"></a><a class="code" href="namespaceOgre.html#a62">00201</a> <span class="keyword">typedef</span> std::map<String, String> <a class="code" href="namespaceOgre.html#a62">NameValuePairList</a>; 00202 <a name="l00205"></a><a class="code" href="structOgre_1_1Rect.html">00205</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1Rect.html">Rect</a> 00206 { <a name="l00207"></a><a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">00207</a> <span class="keywordtype">long</span> <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto0">left</a>, <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">top</a>, <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto2">right</a>, <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto3">bottom</a>; 00208 <a name="l00209"></a><a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta0">00209</a> <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta0">Rect</a>() 00210 { 00211 } <a name="l00212"></a><a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta1">00212</a> <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta0">Rect</a>( <span class="keywordtype">long</span> l, <span class="keywordtype">long</span> t, <span class="keywordtype">long</span> r, <span class="keywordtype">long</span> b ) 00213 { 00214 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto0">left</a> = l; 00215 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">top</a> = t; 00216 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto2">right</a> = r; 00217 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto3">bottom</a> = b; 00218 } <a name="l00219"></a><a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta2">00219</a> <a class="code" href="structOgre_1_1Rect.html">Rect</a>& <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recta2">operator = </a>( <span class="keyword">const</span> <a class="code" href="structOgre_1_1Rect.html">Rect</a>& other ) 00220 { 00221 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto0">left</a> = other.<a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto0">left</a>; 00222 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">top</a> = other.<a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">top</a>; 00223 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto2">right</a> = other.<a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto2">right</a>; 00224 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto3">bottom</a> = other.<a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto3">bottom</a>; 00225 00226 <span class="keywordflow">return</span> *<span class="keyword">this</span>; 00227 } 00228 }; 00229 <a name="l00234"></a><a class="code" href="structOgre_1_1Box.html">00234</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1Box.html">Box</a> 00235 { <a name="l00236"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo5">00236</a> size_t left, top, right, bottom, <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>, <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>; <a name="l00238"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa0">00238</a> <a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa0">Box</a>() 00239 { 00240 } <a name="l00250"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa1">00250</a> <a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa0">Box</a>( size_t l, size_t t, size_t r, size_t b ): 00251 left(l), 00252 top(t), 00253 right(r), 00254 bottom(b), 00255 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>(0), 00256 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>(1) 00257 { 00258 assert(right >= left && bottom >= top && <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> >= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>); 00259 } <a name="l00271"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa2">00271</a> <a class="code" href="structOgre_1_1Box.html#Ogre_1_1Boxa0">Box</a>( size_t l, size_t t, size_t ff, size_t r, size_t b, size_t bb ): 00272 left(l), 00273 top(t), 00274 right(r), 00275 bottom(b), 00276 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>(ff), 00277 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>(bb) 00278 { 00279 assert(right >= left && bottom >= top && <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> >= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>); 00280 } 00281 <a name="l00283"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa9">00283</a> <span class="keywordtype">bool</span> <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa9">contains</a>(<span class="keyword">const</span> <a class="code" href="structOgre_1_1Box.html">Box</a> &def)<span class="keyword"> const</span> 00284 <span class="keyword"> </span>{ 00285 <span class="keywordflow">return</span> (def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo4">left</a> >= left && def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo5">top</a> >= top && def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a> >= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a> && 00286 def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo6">right</a> <= right && def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo7">bottom</a> <= bottom && def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> <= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>); 00287 } 00288 <a name="l00290"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa10">00290</a> size_t <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa10">getWidth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> right-left; } <a name="l00292"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa11">00292</a> size_t <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa11">getHeight</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> bottom-top; } <a name="l00294"></a><a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa12">00294</a> size_t <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxa12">getDepth</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>-<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>; } 00295 }; 00296 00297 00298 00310 <span class="keywordtype">int</span> <a class="code" href="OgrePlatform_8h.html#a13">_OgreExport</a> <a class="code" href="namespaceOgre.html#a610">findCommandLineOpts</a>(<span class="keywordtype">int</span> numargs, <span class="keywordtype">char</span>** argv, UnaryOptionList& unaryOptList, 00311 BinaryOptionList& binOptList); 00312 00313 } 00314 00315 <span class="preprocessor">#endif</span> </pre></div><p> Copyright © 2000-2005 by The OGRE Team<br /> Last modified Wed Feb 23 00:19:04 2005 </p> </body> </html>