source: OGRE/trunk/ogrenew/Docs/api/html/OgreCommon_8h-source.html @ 657

Revision 657, 20.0 KB checked in by mattausch, 18 years ago (diff)

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgreCommon.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>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>
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 __Common_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __Common_H__</span>
3600027 <span class="preprocessor"></span><span class="comment">// Common stuff</span>
3700028
3800029 <span class="preprocessor">#include &lt;utility&gt;</span>
3900030
4000031 <span class="keyword">namespace </span>Ogre {
4100032
4200033
43<a name="l00036"></a><a class="code" href="namespaceOgre.html#a637">00036</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a637">CompareFunction</a>
4400037     {
4500038         <a class="code" href="namespaceOgre.html#a637a63">CMPF_ALWAYS_FAIL</a>,
4600039         <a class="code" href="namespaceOgre.html#a637a64">CMPF_ALWAYS_PASS</a>,
4700040         <a class="code" href="namespaceOgre.html#a637a65">CMPF_LESS</a>,
4800041         <a class="code" href="namespaceOgre.html#a637a66">CMPF_LESS_EQUAL</a>,
4900042         <a class="code" href="namespaceOgre.html#a637a67">CMPF_EQUAL</a>,
5000043         <a class="code" href="namespaceOgre.html#a637a68">CMPF_NOT_EQUAL</a>,
5100044         <a class="code" href="namespaceOgre.html#a637a69">CMPF_GREATER_EQUAL</a>,
5200045         <a class="code" href="namespaceOgre.html#a637a70">CMPF_GREATER</a>
5300046     };
5400047
55<a name="l00050"></a><a class="code" href="namespaceOgre.html#a638">00050</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a638">TextureFilterOptions</a>
5600051     {
5700053         <a class="code" href="namespaceOgre.html#a638a71">TFO_NONE</a>,
5800055         <a class="code" href="namespaceOgre.html#a638a72">TFO_BILINEAR</a>,
5900057         <a class="code" href="namespaceOgre.html#a638a73">TFO_TRILINEAR</a>,
6000059         <a class="code" href="namespaceOgre.html#a638a74">TFO_ANISOTROPIC</a>
6100060     };
6200061
63<a name="l00062"></a><a class="code" href="namespaceOgre.html#a639">00062</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a639">FilterType</a>
6400063     {
6500065         <a class="code" href="namespaceOgre.html#a639a75">FT_MIN</a>,
6600067         <a class="code" href="namespaceOgre.html#a639a76">FT_MAG</a>,
6700069         <a class="code" href="namespaceOgre.html#a639a77">FT_MIP</a>
6800070     };
69<a name="l00072"></a><a class="code" href="namespaceOgre.html#a640">00072</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a640">FilterOptions</a>
7000073     {
7100075         <a class="code" href="namespaceOgre.html#a640a78">FO_NONE</a>,
7200077         <a class="code" href="namespaceOgre.html#a640a79">FO_POINT</a>,
7300079         <a class="code" href="namespaceOgre.html#a640a80">FO_LINEAR</a>,
7400081         <a class="code" href="namespaceOgre.html#a640a81">FO_ANISOTROPIC</a>
7500082     };
7600083
77<a name="l00085"></a><a class="code" href="namespaceOgre.html#a641">00085</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a641">ShadeOptions</a>
7800086     {
7900087         <a class="code" href="namespaceOgre.html#a641a82">SO_FLAT</a>,
8000088         <a class="code" href="namespaceOgre.html#a641a83">SO_GOURAUD</a>,
8100089         <a class="code" href="namespaceOgre.html#a641a84">SO_PHONG</a>
8200090     };
8300091
84<a name="l00093"></a><a class="code" href="namespaceOgre.html#a642">00093</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a642">FogMode</a>
8500094     {
8600096         <a class="code" href="namespaceOgre.html#a642a85">FOG_NONE</a>,
8700098         <a class="code" href="namespaceOgre.html#a642a86">FOG_EXP</a>,
8800100         <a class="code" href="namespaceOgre.html#a642a87">FOG_EXP2</a>,
8900102         <a class="code" href="namespaceOgre.html#a642a88">FOG_LINEAR</a>
9000103     };
9100104
92<a name="l00107"></a><a class="code" href="namespaceOgre.html#a643">00107</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a643">CullingMode</a>
9300108     {
9400110         <a class="code" href="namespaceOgre.html#a643a89">CULL_NONE</a> = 1,
9500112         <a class="code" href="namespaceOgre.html#a643a90">CULL_CLOCKWISE</a> = 2,
9600114         <a class="code" href="namespaceOgre.html#a643a91">CULL_ANTICLOCKWISE</a> = 3
9700115     };
9800116
99<a name="l00122"></a><a class="code" href="namespaceOgre.html#a644">00122</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a644">ManualCullingMode</a>
10000123     {
10100125         <a class="code" href="namespaceOgre.html#a644a92">MANUAL_CULL_NONE</a> = 1,
10200127         <a class="code" href="namespaceOgre.html#a644a93">MANUAL_CULL_BACK</a> = 2,
10300129         <a class="code" href="namespaceOgre.html#a644a94">MANUAL_CULL_FRONT</a> = 3
10400130     };
10500131
106<a name="l00133"></a><a class="code" href="namespaceOgre.html#a645">00133</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a645">WaveformType</a>
10700134     {
10800136         <a class="code" href="namespaceOgre.html#a645a95">WFT_SINE</a>,
10900138         <a class="code" href="namespaceOgre.html#a645a96">WFT_TRIANGLE</a>,
11000140         <a class="code" href="namespaceOgre.html#a645a97">WFT_SQUARE</a>,
11100142         <a class="code" href="namespaceOgre.html#a645a98">WFT_SAWTOOTH</a>,
11200144         <a class="code" href="namespaceOgre.html#a645a99">WFT_INVERSE_SAWTOOTH</a>
11300145     };
11400146
115<a name="l00148"></a><a class="code" href="namespaceOgre.html#a646">00148</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a646">SceneDetailLevel</a>
11600149     {
11700151         <a class="code" href="namespaceOgre.html#a646a100">SDL_POINTS</a> = 1,
11800153         <a class="code" href="namespaceOgre.html#a646a101">SDL_WIREFRAME</a> = 2,
11900155         <a class="code" href="namespaceOgre.html#a646a102">SDL_SOLID</a> = 3
12000156     };
12100157
122<a name="l00159"></a><a class="code" href="namespaceOgre.html#a647">00159</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a647">ShadowTechnique</a>
12300160     {
12400162         <a class="code" href="namespaceOgre.html#a647a103">SHADOWTYPE_NONE</a>,
12500169         <a class="code" href="namespaceOgre.html#a647a104">SHADOWTYPE_STENCIL_MODULATIVE</a>,
12600177         <a class="code" href="namespaceOgre.html#a647a105">SHADOWTYPE_STENCIL_ADDITIVE</a>,
12700182         <a class="code" href="namespaceOgre.html#a647a106">SHADOWTYPE_TEXTURE_MODULATIVE</a>
12800183     };
12900184
130<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>;
131<a name="l00187"></a><a class="code" href="namespaceOgre.html#a648">00187</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a648">TrackVertexColourEnum</a> {
13200188         <a class="code" href="namespaceOgre.html#a648a107">TVC_NONE</a>        = 0x0,
13300189         <a class="code" href="namespaceOgre.html#a648a108">TVC_AMBIENT</a>     = 0x1,       
13400190         <a class="code" href="namespaceOgre.html#a648a109">TVC_DIFFUSE</a>     = 0x2,
13500191         <a class="code" href="namespaceOgre.html#a648a110">TVC_SPECULAR</a>    = 0x4,
13600192         <a class="code" href="namespaceOgre.html#a648a111">TVC_EMISSIVE</a>    = 0x8
13700193     };
13800194
139<a name="l00195"></a><a class="code" href="namespaceOgre.html#a59">00195</a>     <span class="keyword">typedef</span> std::vector&lt;Light*&gt; <a class="code" href="namespaceOgre.html#a59">LightList</a>;
14000196
141<a name="l00197"></a><a class="code" href="namespaceOgre.html#a60">00197</a>     <span class="keyword">typedef</span> std::map&lt;String, bool&gt; <a class="code" href="namespaceOgre.html#a60">UnaryOptionList</a>;
142<a name="l00198"></a><a class="code" href="namespaceOgre.html#a61">00198</a>     <span class="keyword">typedef</span> std::map&lt;String, String&gt; <a class="code" href="namespaceOgre.html#a61">BinaryOptionList</a>;
14300199
144<a name="l00201"></a><a class="code" href="namespaceOgre.html#a62">00201</a>     <span class="keyword">typedef</span> std::map&lt;String, String&gt; <a class="code" href="namespaceOgre.html#a62">NameValuePairList</a>;
14500202
146<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>
14700206         {
148<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>;
14900208
150<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>()
15100210             {
15200211             }
153<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 )
15400213             {
15500214                 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto0">left</a> = l;
15600215                 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto1">top</a> = t;   
15700216                 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto2">right</a> = r;
15800217                 <a class="code" href="structOgre_1_1Rect.html#Ogre_1_1Recto3">bottom</a> = b;               
15900218             }
160<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>&amp; <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>&amp; other )
16100220             {
16200221                 <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>;
16300222                 <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>;
16400223                 <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>;
16500224                 <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>;       
16600225
16700226                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
16800227             }
16900228         };
17000229
171<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>
17200235         {
173<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>;
174<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>()
17500239             {
17600240             }
177<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 ):
17800251                 left(l),
17900252                 top(t),   
18000253                 right(r),
18100254                 bottom(b),
18200255                 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>(0),
18300256                 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>(1)
18400257             {
18500258                 assert(right &gt;= left &amp;&amp; bottom &gt;= top &amp;&amp; <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> &gt;= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>);
18600259             }
187<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 ):
18800272                 left(l),
18900273                 top(t),   
19000274                 right(r),
19100275                 bottom(b),
19200276                 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>(ff),
19300277                 <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>(bb)
19400278             {
19500279                 assert(right &gt;= left &amp;&amp; bottom &gt;= top &amp;&amp; <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> &gt;= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a>);
19600280             }
19700281             
198<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> &amp;def)<span class="keyword"> const</span>
19900284 <span class="keyword">            </span>{
20000285                 <span class="keywordflow">return</span> (def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo4">left</a> &gt;= left &amp;&amp; def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo5">top</a> &gt;= top &amp;&amp; def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a> &gt;= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo8">front</a> &amp;&amp;
20100286                     def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo6">right</a> &lt;= right &amp;&amp; def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo7">bottom</a> &lt;= bottom &amp;&amp; def.<a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a> &lt;= <a class="code" href="structOgre_1_1Box.html#Ogre_1_1PixelBoxo9">back</a>);
20200287             }
20300288             
204<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; }
205<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; }
206<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>; }
20700295         };
20800296
20900297     
21000298     
21100310     <span class="keywordtype">int</span> <a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> <a class="code" href="namespaceOgre.html#a611">findCommandLineOpts</a>(<span class="keywordtype">int</span> numargs, <span class="keywordtype">char</span>** argv, UnaryOptionList&amp; unaryOptList,
21200311         BinaryOptionList&amp; binOptList);
21300312
21400313 }
21500314
21600315 <span class="preprocessor">#endif</span>
217</pre></div><hr>
218<p>
219Copyright &copy; 2000-2005 by The OGRE Team<br />
220<!--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/>
221This 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/>
222                <!--/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#">
223                <Work rdf:about="">
224                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
225        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
226                </Work>
227                <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> -->
228
229Last modified Sun Feb 12 12:59:42 2006
230</p>
231</body>
232</html>
Note: See TracBrowser for help on using the repository browser.