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

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

adding ogre 1.2 and dependencies

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#a634">00035</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a634">LayerBlendType</a>
4300036     {
4400037         <a class="code" href="namespaceOgre.html#a634a27">LBT_COLOUR</a>,
4500038         <a class="code" href="namespaceOgre.html#a634a28">LBT_ALPHA</a>
4600039     };
4700040
48<a name="l00048"></a><a class="code" href="namespaceOgre.html#a635">00048</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a635">LayerBlendOperation</a> {
4900050         <a class="code" href="namespaceOgre.html#a635a29">LBO_REPLACE</a>,
5000052         <a class="code" href="namespaceOgre.html#a635a30">LBO_ADD</a>,
5100054         <a class="code" href="namespaceOgre.html#a635a31">LBO_MODULATE</a>,
5200056         <a class="code" href="namespaceOgre.html#a635a32">LBO_ALPHA_BLEND</a>
5300057
5400058     };
5500059
56<a name="l00066"></a><a class="code" href="namespaceOgre.html#a636">00066</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a636">LayerBlendOperationEx</a> {
5700068         <a class="code" href="namespaceOgre.html#a636a33">LBX_SOURCE1</a>,
5800070         <a class="code" href="namespaceOgre.html#a636a34">LBX_SOURCE2</a>,
5900072         <a class="code" href="namespaceOgre.html#a636a35">LBX_MODULATE</a>,
6000074         <a class="code" href="namespaceOgre.html#a636a36">LBX_MODULATE_X2</a>,
6100076         <a class="code" href="namespaceOgre.html#a636a37">LBX_MODULATE_X4</a>,
6200078         <a class="code" href="namespaceOgre.html#a636a38">LBX_ADD</a>,
6300080         <a class="code" href="namespaceOgre.html#a636a39">LBX_ADD_SIGNED</a>,
6400082         <a class="code" href="namespaceOgre.html#a636a40">LBX_ADD_SMOOTH</a>,
6500084         <a class="code" href="namespaceOgre.html#a636a41">LBX_SUBTRACT</a>,
6600086         <a class="code" href="namespaceOgre.html#a636a42">LBX_BLEND_DIFFUSE_ALPHA</a>,
6700088         <a class="code" href="namespaceOgre.html#a636a43">LBX_BLEND_TEXTURE_ALPHA</a>,
6800090         <a class="code" href="namespaceOgre.html#a636a44">LBX_BLEND_CURRENT_ALPHA</a>,
6900092         <a class="code" href="namespaceOgre.html#a636a45">LBX_BLEND_MANUAL</a>,
7000094         <a class="code" href="namespaceOgre.html#a636a46">LBX_DOTPRODUCT</a>,
7100096         <a class="code" href="namespaceOgre.html#a636a47">LBX_BLEND_DIFFUSE_COLOUR</a>
7200097     };
7300098
74<a name="l00103"></a><a class="code" href="namespaceOgre.html#a637">00103</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a637">LayerBlendSource</a>
7500104     {
7600106         <a class="code" href="namespaceOgre.html#a637a48">LBS_CURRENT</a>,
7700108         <a class="code" href="namespaceOgre.html#a637a49">LBS_TEXTURE</a>,
7800110         <a class="code" href="namespaceOgre.html#a637a50">LBS_DIFFUSE</a>,
7900112         <a class="code" href="namespaceOgre.html#a637a51">LBS_SPECULAR</a>,
8000114         <a class="code" href="namespaceOgre.html#a637a52">LBS_MANUAL</a>
8100115     };
82<a name="l00130"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html">00130</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> LayerBlendModeEx
8300131     {
8400132     <span class="keyword">public</span>:
85<a name="l00134"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo0">00134</a>         <a class="code" href="namespaceOgre.html#a634">LayerBlendType</a> blendType;
86<a name="l00136"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">00136</a>         <a class="code" href="namespaceOgre.html#a636">LayerBlendOperationEx</a> operation;
87<a name="l00138"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">00138</a>         <a class="code" href="namespaceOgre.html#a637">LayerBlendSource</a> source1;
88<a name="l00140"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">00140</a>         <a class="code" href="namespaceOgre.html#a637">LayerBlendSource</a> source2;
8900141
90<a name="l00143"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo4">00143</a>         <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> colourArg1;
91<a name="l00145"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo5">00145</a>         <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a> colourArg2;
92<a name="l00147"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo6">00147</a>         <a class="code" href="namespaceOgre.html#a465">Real</a> alphaArg1;
93<a name="l00149"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo7">00149</a>         <a class="code" href="namespaceOgre.html#a465">Real</a> alphaArg2;
94<a name="l00151"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">00151</a>         <a class="code" href="namespaceOgre.html#a465">Real</a> factor;
9500152
96<a name="l00153"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExa0">00153</a>         <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a623">operator==</a>(<span class="keyword">const</span> LayerBlendModeEx&amp; rhs)<span class="keyword"> const</span>
9700154 <span class="keyword">        </span>{
9800155             <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>;
9900156
10000157             <span class="keywordflow">if</span> (blendType == <a class="code" href="namespaceOgre.html#a634a27">LBT_COLOUR</a>)
10100158             {
10200159
10300160                 <span class="keywordflow">if</span> (operation == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">operation</a> &amp;&amp;
10400161                     source1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">source1</a> &amp;&amp;
10500162                     source2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">source2</a> &amp;&amp;
10600163                     colourArg1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo4">colourArg1</a> &amp;&amp;
10700164                     colourArg2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo5">colourArg2</a> &amp;&amp;
10800165                     factor == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">factor</a>)
10900166                 {
11000167                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
11100168                 }
11200169             }
11300170             <span class="keywordflow">else</span> <span class="comment">// if (blendType == LBT_ALPHA)</span>
11400171             {
11500172                 <span class="keywordflow">if</span> (operation == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo1">operation</a> &amp;&amp;
11600173                     source1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo2">source1</a> &amp;&amp;
11700174                     source2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo3">source2</a> &amp;&amp;
11800175                     alphaArg1 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo6">alphaArg1</a> &amp;&amp;
11900176                     alphaArg2 == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo7">alphaArg2</a> &amp;&amp;
12000177                     factor == rhs.<a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExo8">factor</a>)
12100178                 {
12200179                     <span class="keywordflow">return</span> <span class="keyword">true</span>;
12300180                 }
12400181             }
12500182             <span class="keywordflow">return</span> <span class="keyword">false</span>;
12600183         }
12700184
128<a name="l00185"></a><a class="code" href="classOgre_1_1LayerBlendModeEx.html#Ogre_1_1LayerBlendModeExa1">00185</a>         <span class="keywordtype">bool</span> <a class="code" href="namespaceOgre.html#a624">operator!=</a>(<span class="keyword">const</span> LayerBlendModeEx&amp; rhs)<span class="keyword"> const</span>
12900186 <span class="keyword">        </span>{
13000187             <span class="keywordflow">return</span> !(*<span class="keyword">this</span> == rhs);
13100188         }
13200189
13300190
13400191
13500192     };
13600193
137<a name="l00206"></a><a class="code" href="namespaceOgre.html#a638">00206</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a638">SceneBlendType</a>
13800207     {
13900209         <a class="code" href="namespaceOgre.html#a638a53">SBT_TRANSPARENT_ALPHA</a>,
14000211         <a class="code" href="namespaceOgre.html#a638a54">SBT_TRANSPARENT_COLOUR</a>,
14100213         <a class="code" href="namespaceOgre.html#a638a55">SBT_ADD</a>,
14200215         <a class="code" href="namespaceOgre.html#a638a56">SBT_MODULATE</a>,
14300217         <a class="code" href="namespaceOgre.html#a638a57">SBT_REPLACE</a>
14400218         <span class="comment">// TODO : more</span>
14500219     };
14600220
147<a name="l00225"></a><a class="code" href="namespaceOgre.html#a639">00225</a>     <span class="keyword">enum</span> <a class="code" href="namespaceOgre.html#a639">SceneBlendFactor</a>
14800226     {
14900227         <a class="code" href="namespaceOgre.html#a639a58">SBF_ONE</a>,
15000228         <a class="code" href="namespaceOgre.html#a639a59">SBF_ZERO</a>,
15100229         <a class="code" href="namespaceOgre.html#a639a60">SBF_DEST_COLOUR</a>,
15200230         <a class="code" href="namespaceOgre.html#a639a61">SBF_SOURCE_COLOUR</a>,
15300231         <a class="code" href="namespaceOgre.html#a639a62">SBF_ONE_MINUS_DEST_COLOUR</a>,
15400232         <a class="code" href="namespaceOgre.html#a639a63">SBF_ONE_MINUS_SOURCE_COLOUR</a>,
15500233         <a class="code" href="namespaceOgre.html#a639a64">SBF_DEST_ALPHA</a>,
15600234         <a class="code" href="namespaceOgre.html#a639a65">SBF_SOURCE_ALPHA</a>,
15700235         <a class="code" href="namespaceOgre.html#a639a66">SBF_ONE_MINUS_DEST_ALPHA</a>,
15800236         <a class="code" href="namespaceOgre.html#a639a67">SBF_ONE_MINUS_SOURCE_ALPHA</a>
15900237
16000238     };
16100239 }
16200240
16300241 <span class="preprocessor">#endif</span>
164</pre></div><hr>
165<p>
166Copyright &copy; 2000-2005 by The OGRE Team<br />
167<!--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/>
168This 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/>
169                <!--/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#">
170                <Work rdf:about="">
171                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
172        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
173                </Work>
174                <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> -->
175
176Last modified Sun Mar 12 14:37:37 2006
177</p>
178</body>
179</html>
Note: See TracBrowser for help on using the repository browser.