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

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

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgreBlendMode.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>OgreBlendMode.h</h1><a href="OgreBlendMode_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 __BLENDMODE_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define __BLENDMODE_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span>
3900030
4000031 <span class="keyword">namespace </span>Ogre {
4100032
42<a name="l00035"></a><a class="code" href="namespaceOgre.html#a631">00035</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a631">LayerBlendType</a>
4300036     {
4400037         <a class="code" href="namespaceOgre.html#a631a16">LBT_COLOUR</a>,
4500038         <a class="code" href="namespaceOgre.html#a631a17">LBT_ALPHA</a>
4600039     };
4700040
48<a name="l00048"></a><a class="code" href="namespaceOgre.html#a632">00048</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a632">LayerBlendOperation</a> {
4900050         <a class="code" href="namespaceOgre.html#a632a18">LBO_REPLACE</a>,
5000052         <a class="code" href="namespaceOgre.html#a632a19">LBO_ADD</a>,
5100054         <a class="code" href="namespaceOgre.html#a632a20">LBO_MODULATE</a>,
5200056         <a class="code" href="namespaceOgre.html#a632a21">LBO_ALPHA_BLEND</a>
5300057
5400058     };
5500059
56<a name="l00066"></a><a class="code" href="namespaceOgre.html#a633">00066</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a633">LayerBlendOperationEx</a> {
5700068         <a class="code" href="namespaceOgre.html#a633a22">LBX_SOURCE1</a>,
5800070         <a class="code" href="namespaceOgre.html#a633a23">LBX_SOURCE2</a>,
5900072         <a class="code" href="namespaceOgre.html#a633a24">LBX_MODULATE</a>,
6000074         <a class="code" href="namespaceOgre.html#a633a25">LBX_MODULATE_X2</a>,
6100076         <a class="code" href="namespaceOgre.html#a633a26">LBX_MODULATE_X4</a>,
6200078         <a class="code" href="namespaceOgre.html#a633a27">LBX_ADD</a>,
6300080         <a class="code" href="namespaceOgre.html#a633a28">LBX_ADD_SIGNED</a>,
6400082         <a class="code" href="namespaceOgre.html#a633a29">LBX_ADD_SMOOTH</a>,
6500084         <a class="code" href="namespaceOgre.html#a633a30">LBX_SUBTRACT</a>,
6600086         <a class="code" href="namespaceOgre.html#a633a31">LBX_BLEND_DIFFUSE_ALPHA</a>,
6700088         <a class="code" href="namespaceOgre.html#a633a32">LBX_BLEND_TEXTURE_ALPHA</a>,
6800090         <a class="code" href="namespaceOgre.html#a633a33">LBX_BLEND_CURRENT_ALPHA</a>,
6900092         <a class="code" href="namespaceOgre.html#a633a34">LBX_BLEND_MANUAL</a>,
7000094         <a class="code" href="namespaceOgre.html#a633a35">LBX_DOTPRODUCT</a>
7100095     };
7200096
73<a name="l00101"></a><a class="code" href="namespaceOgre.html#a634">00101</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a634">LayerBlendSource</a>
7400102     {
7500104         <a class="code" href="namespaceOgre.html#a634a36">LBS_CURRENT</a>,
7600106         <a class="code" href="namespaceOgre.html#a634a37">LBS_TEXTURE</a>,
7700108         <a class="code" href="namespaceOgre.html#a634a38">LBS_DIFFUSE</a>,
7800110         <a class="code" href="namespaceOgre.html#a634a39">LBS_SPECULAR</a>,
7900112         <a class="code" href="namespaceOgre.html#a634a40">LBS_MANUAL</a>
8000113     };
81<a name="l00128"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html">00128</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> LayerBlendModeEx
8200129     {
8300130     <span class="keyword">public</span>:
84<a name="l00132"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo0">00132</a>         <a class="code" href="namespaceOgre.html#a631">LayerBlendType</a> blendType;
85<a name="l00134"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">00134</a>         <a class="code" href="namespaceOgre.html#a633">LayerBlendOperationEx</a> operation;
86<a name="l00136"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">00136</a>         <a class="code" href="namespaceOgre.html#a634">LayerBlendSource</a> source1;
87<a name="l00138"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">00138</a>         <a class="code" href="namespaceOgre.html#a634">LayerBlendSource</a> source2;
8800139
89<a name="l00141"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo4">00141</a>         <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> colourArg1;
90<a name="l00143"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo5">00143</a>         <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> colourArg2;
91<a name="l00145"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo6">00145</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> alphaArg1;
92<a name="l00147"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo7">00147</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> alphaArg2;
93<a name="l00149"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">00149</a>         <a class="code" href="namespaceOgre.html#a420">Real</a> factor;
9400150
95<a name="l00151"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExa0">00151</a>         <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a618">operator==</a>(<span class="keyword">const</span> LayerBlendModeEx&amp; rhs)<span class="keyword"> const</span>
9600152 <span class="keyword">        </span>{
9700153             <span class="keywordflow">if</span> (blendType != rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo0">blendType</a>) <span class="keywordflow">return</span> <span class="keyword">false</span>;
9800154
9900155             <span class="keywordflow">if</span> (blendType == <a class="code" href="namespaceOgre.html#a631a16">LBT_COLOUR</a>)
10000156             {
10100157
10200158                 <span class="keywordflow">if</span> (operation == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">operation</a> &amp;&amp;
10300159                     source1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">source1</a> &amp;&amp;
10400160                     source2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">source2</a> &amp;&amp;
10500161                     colourArg1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo4">colourArg1</a> &amp;&amp;
10600162                     colourArg2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo5">colourArg2</a> &amp;&amp;
10700163                     factor == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">factor</a>)
10800164                 {
10900165                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
11000166                 }
11100167             }
11200168             <span class="keywordflow">else</span> <span class="comment">// if (blendType == LBT_ALPHA)</span>
11300169             {
11400170                 <span class="keywordflow">if</span> (operation == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">operation</a> &amp;&amp;
11500171                     source1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">source1</a> &amp;&amp;
11600172                     source2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">source2</a> &amp;&amp;
11700173                     alphaArg1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo6">alphaArg1</a> &amp;&amp;
11800174                     alphaArg2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo7">alphaArg2</a> &amp;&amp;
11900175                     factor == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">factor</a>)
12000176                 {
12100177                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
12200178                 }
12300179             }
12400180             <span class="keywordflow">return</span> <span class="keyword">false</span>;
12500181         }
12600182
127<a name="l00183"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExa1">00183</a>         <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a619">operator!=</a>(<span class="keyword">const</span> LayerBlendModeEx&amp; rhs)<span class="keyword"> const</span>
12800184 <span class="keyword">        </span>{
12900185             <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == rhs);
13000186         }
13100187
13200188
13300189
13400190     };
13500191
136<a name="l00204"></a><a class="code" href="namespaceOgre.html#a635">00204</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a635">SceneBlendType</a>
13700205     {
13800207         <a class="code" href="namespaceOgre.html#a635a41">SBT_TRANSPARENT_ALPHA</a>,
13900209         <a class="code" href="namespaceOgre.html#a635a42">SBT_TRANSPARENT_COLOUR</a>,
14000211         <a class="code" href="namespaceOgre.html#a635a43">SBT_ADD</a>,
14100213         <a class="code" href="namespaceOgre.html#a635a44">SBT_MODULATE</a>
14200214         <span class="comment">// TODO : more</span>
14300215     };
14400216
145<a name="l00221"></a><a class="code" href="namespaceOgre.html#a636">00221</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a636">SceneBlendFactor</a>
14600222     {
14700223         <a class="code" href="namespaceOgre.html#a636a45">SBF_ONE</a>,
14800224         <a class="code" href="namespaceOgre.html#a636a46">SBF_ZERO</a>,
14900225         <a class="code" href="namespaceOgre.html#a636a47">SBF_DEST_COLOUR</a>,
15000226         <a class="code" href="namespaceOgre.html#a636a48">SBF_SOURCE_COLOUR</a>,
15100227         <a class="code" href="namespaceOgre.html#a636a49">SBF_ONE_MINUS_DEST_COLOUR</a>,
15200228         <a class="code" href="namespaceOgre.html#a636a50">SBF_ONE_MINUS_SOURCE_COLOUR</a>,
15300229         <a class="code" href="namespaceOgre.html#a636a51">SBF_DEST_ALPHA</a>,
15400230         <a class="code" href="namespaceOgre.html#a636a52">SBF_SOURCE_ALPHA</a>,
15500231         <a class="code" href="namespaceOgre.html#a636a53">SBF_ONE_MINUS_DEST_ALPHA</a>,
15600232         <a class="code" href="namespaceOgre.html#a636a54">SBF_ONE_MINUS_SOURCE_ALPHA</a>
15700233
15800234     };
15900235 }
16000236
16100237 <span class="preprocessor">#endif</span>
162</pre></div><hr>
163<p>
164Copyright &copy; 2000-2005 by The OGRE Team<br />
165<!--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/>
166This 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/>
167                <!--/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#">
168                <Work rdf:about="">
169                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
170        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
171                </Work>
172                <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> -->
173
174Last modified Sun Feb 12 12:59:41 2006
175</p>
176</body>
177</html>
Note: See TracBrowser for help on using the repository browser.