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

Revision 692, 25.6 KB checked in by mattausch, 18 years ago (diff)

adding ogre 1.2 and dependencies

Line 
1<html>
2<head>
3<title>OgreMaterial.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>OgreMaterial.h</h1><a href="OgreMaterial_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 _Material_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define _Material_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span>
3800029
3900030 <span class="preprocessor">#include "<a class="code" href="OgreResource_8h.html">OgreResource.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreIteratorWrappers_8h.html">OgreIteratorWrappers.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreCommon_8h.html">OgreCommon.h</a>"</span>
4200033 <span class="preprocessor">#include "<a class="code" href="OgreColourValue_8h.html">OgreColourValue.h</a>"</span>
4300034 <span class="preprocessor">#include "<a class="code" href="OgreBlendMode_8h.html">OgreBlendMode.h</a>"</span>
4400035
4500036
4600037 <span class="keyword">namespace </span>Ogre {
4700038
4800039     <span class="comment">// Forward declaration</span>
4900040     <span class="keyword">class </span>MaterialPtr;
5000041
51<a name="l00079"></a><a class="code" href="classOgre_1_1Material.html">00079</a>     <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Material : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Resource.html">Resource</a>
5200080     {
53<a name="l00081"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialn0">00081</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>;
54<a name="l00082"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialn1">00082</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1MaterialManager.html">MaterialManager</a>;
5500083
5600084     <span class="keyword">public</span>:
57<a name="l00086"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw0">00086</a>         <span class="keyword">typedef</span> std::vector&lt;Real&gt; <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw0">LodDistanceList</a>;
58<a name="l00087"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw1">00087</a>         <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1ConstVectorIterator.html">ConstVectorIterator&lt;LodDistanceList&gt;</a> <a class="code" href="classOgre_1_1ConstVectorIterator.html">LodDistanceIterator</a>;
5900088     <span class="keyword">protected</span>:
6000089
6100090
6200093         <span class="keywordtype">void</span> applyDefaults(<span class="keywordtype">void</span>);
6300094
64<a name="l00095"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx0">00095</a>         <span class="keyword">typedef</span> std::vector&lt;Technique*&gt; Techniques;
65<a name="l00097"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp0">00097</a>         Techniques mTechniques;
66<a name="l00099"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp1">00099</a>         Techniques mSupportedTechniques;
67<a name="l00100"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx1">00100</a>         <span class="keyword">typedef</span> std::map&lt;unsigned short, Technique*&gt; <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx1">LodTechniques</a>;
68<a name="l00101"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx2">00101</a>         <span class="keyword">typedef</span> std::map&lt;unsigned short, LodTechniques*&gt; <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx2">BestTechniquesBySchemeList</a>;
69<a name="l00106"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp2">00106</a>         <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialx2">BestTechniquesBySchemeList</a> mBestTechniquesBySchemeList;
7000107
71<a name="l00108"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp3">00108</a>         <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw0">LodDistanceList</a> mLodDistances;
72<a name="l00109"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp4">00109</a>         <span class="keywordtype">bool</span> mReceiveShadows;
73<a name="l00110"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp5">00110</a>         <span class="keywordtype">bool</span> mTransparencyCastsShadows;
74<a name="l00112"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialp6">00112</a>         <span class="keywordtype">bool</span> mCompilationRequired;
7500113
7600115         <span class="keywordtype">void</span> insertSupportedTechnique(<a class="code" href="classOgre_1_1Technique.html">Technique</a>* t);
7700116
7800119         <span class="keywordtype">void</span> clearBestTechniqueList(<span class="keywordtype">void</span>);
7900120
8000123         <span class="keywordtype">void</span> loadImpl(<span class="keywordtype">void</span>);
8100124
8200129         <span class="keywordtype">void</span> unloadImpl(<span class="keywordtype">void</span>);
83<a name="l00131"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialb5">00131</a>         size_t calculateSize(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; } <span class="comment">// TODO </span>
8400132     <span class="keyword">public</span>:
8500133
8600136         Material(<a class="code" href="classOgre_1_1ResourceManager.html">ResourceManager</a>* creator, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; name, <a class="code" href="namespaceOgre.html#a529">ResourceHandle</a> handle,
8700137             <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; group, <span class="keywordtype">bool</span> isManual = <span class="keyword">false</span>, <a class="code" href="classOgre_1_1ManualResourceLoader.html">ManualResourceLoader</a>* loader = 0);
8800138
8900139         ~Material();
9000142         Material&amp; operator=( <span class="keyword">const</span> Material&amp; rhs );
9100143
9200147         <span class="keywordtype">bool</span> isTransparent(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
9300148
94<a name="l00162"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala4">00162</a>         <span class="keywordtype">void</span> setReceiveShadows(<span class="keywordtype">bool</span> enabled) { mReceiveShadows = enabled; }
95<a name="l00164"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala5">00164</a>         <span class="keywordtype">bool</span> getReceiveShadows(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mReceiveShadows; }
9600165
97<a name="l00174"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala6">00174</a>         <span class="keywordtype">void</span> setTransparencyCastsShadows(<span class="keywordtype">bool</span> enabled) { mTransparencyCastsShadows = enabled; }
98<a name="l00176"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala7">00176</a>         <span class="keywordtype">bool</span> getTransparencyCastsShadows(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mTransparencyCastsShadows; }
9900177
10000192         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* createTechnique(<span class="keywordtype">void</span>);
10100194         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* getTechnique(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
10200198         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* getTechnique(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; name);
10300200         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNumTechniques(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
10400202         <span class="keywordtype">void</span> removeTechnique(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);     
10500204         <span class="keywordtype">void</span> removeAllTechniques(<span class="keywordtype">void</span>);
106<a name="l00205"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw2">00205</a>         <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1VectorIterator.html">VectorIterator&lt;Techniques&gt;</a> TechniqueIterator;
10700207         TechniqueIterator getTechniqueIterator(<span class="keywordtype">void</span>);
10800214         TechniqueIterator getSupportedTechniqueIterator(<span class="keywordtype">void</span>);
10900215         
11000217         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* getSupportedTechnique(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> index);
11100219         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNumSupportedTechniques(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
11200220
11300226         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNumLodLevels(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> schemeIndex) <span class="keyword">const</span>;
11400232         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getNumLodLevels(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; schemeName) <span class="keyword">const</span>;
11500233
11600245         <a class="code" href="classOgre_1_1Technique.html">Technique</a>* getBestTechnique(<span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> lodIndex = 0);
11700246
11800247
11900253         <a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a> clone(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; newName, <span class="keywordtype">bool</span> changeGroup = <span class="keyword">false</span>,
12000254             <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>&amp; newGroup = StringUtil::BLANK) <span class="keyword">const</span>;
12100255
12200260         <span class="keywordtype">void</span> copyDetailsTo(<a class="code" href="classOgre_1_1MaterialPtr.html">MaterialPtr</a>&amp; mat) <span class="keyword">const</span>;
12300261
12400277         <span class="keywordtype">void</span> compile(<span class="keywordtype">bool</span> autoManageTextureUnits = <span class="keyword">true</span>);
12500278
12600279         <span class="comment">// -------------------------------------------------------------------------------</span>
12700280         <span class="comment">// The following methods are to make migration from previous versions simpler</span>
12800281         <span class="comment">// and to make code easier to write when dealing with simple materials</span>
12900282         <span class="comment">// They set the properties which have been moved to Pass for all Techniques and all Passes</span>
13000283
13100293         <span class="keywordtype">void</span> setPointSize(<a class="code" href="namespaceOgre.html#a465">Real</a> ps);
13200294
13300304         <span class="keywordtype">void</span> setAmbient(<a class="code" href="namespaceOgre.html#a465">Real</a> red, <a class="code" href="namespaceOgre.html#a465">Real</a> green, <a class="code" href="namespaceOgre.html#a465">Real</a> blue);
13400305
13500315         <span class="keywordtype">void</span> setAmbient(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; ambient);
13600316
13700326         <span class="keywordtype">void</span> setDiffuse(<a class="code" href="namespaceOgre.html#a465">Real</a> red, <a class="code" href="namespaceOgre.html#a465">Real</a> green, <a class="code" href="namespaceOgre.html#a465">Real</a> blue, <a class="code" href="namespaceOgre.html#a465">Real</a> alpha);
13800327
13900337         <span class="keywordtype">void</span> setDiffuse(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; diffuse);
14000338
14100348         <span class="keywordtype">void</span> setSpecular(<a class="code" href="namespaceOgre.html#a465">Real</a> red, <a class="code" href="namespaceOgre.html#a465">Real</a> green, <a class="code" href="namespaceOgre.html#a465">Real</a> blue, <a class="code" href="namespaceOgre.html#a465">Real</a> alpha);
14200349
14300359         <span class="keywordtype">void</span> setSpecular(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; specular);
14400360
14500370         <span class="keywordtype">void</span> setShininess(<a class="code" href="namespaceOgre.html#a465">Real</a> val);
14600371
14700381         <span class="keywordtype">void</span> setSelfIllumination(<a class="code" href="namespaceOgre.html#a465">Real</a> red, <a class="code" href="namespaceOgre.html#a465">Real</a> green, <a class="code" href="namespaceOgre.html#a465">Real</a> blue);
14800382
14900392         <span class="keywordtype">void</span> setSelfIllumination(<span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; selfIllum);
15000393
15100403         <span class="keywordtype">void</span> setDepthCheckEnabled(<span class="keywordtype">bool</span> enabled);
15200404
15300414         <span class="keywordtype">void</span> setDepthWriteEnabled(<span class="keywordtype">bool</span> enabled);
15400415
15500425         <span class="keywordtype">void</span> setDepthFunction( CompareFunction func );
15600426
15700436         <span class="keywordtype">void</span> setColourWriteEnabled(<span class="keywordtype">bool</span> enabled);
15800437
15900447         <span class="keywordtype">void</span> setCullingMode( CullingMode mode );
16000448
16100458         <span class="keywordtype">void</span> setManualCullingMode( ManualCullingMode mode );
16200459
16300469         <span class="keywordtype">void</span> setLightingEnabled(<span class="keywordtype">bool</span> enabled);
16400470
16500480         <span class="keywordtype">void</span> setShadingMode( ShadeOptions mode );
16600481
16700491         <span class="keywordtype">void</span> setFog(
16800492             <span class="keywordtype">bool</span> overrideScene,
16900493             FogMode mode = FOG_NONE,
17000494             <span class="keyword">const</span> <a class="code" href="classOgre_1_1ColourValue.html">ColourValue</a>&amp; colour = ColourValue::White,
17100495             <a class="code" href="namespaceOgre.html#a465">Real</a> expDensity = 0.001, <a class="code" href="namespaceOgre.html#a465">Real</a> linearStart = 0.0, <a class="code" href="namespaceOgre.html#a465">Real</a> linearEnd = 1.0 );
17200496
17300506         <span class="keywordtype">void</span> setDepthBias(<a class="code" href="namespaceOgre.html#a467">ushort</a> bias);
17400507
17500516         <span class="keywordtype">void</span> setTextureFiltering(TextureFilterOptions filterType);
17600525         <span class="keywordtype">void</span> setTextureAnisotropy(<span class="keywordtype">int</span> maxAniso);
17700526
17800536         <span class="keywordtype">void</span> setSceneBlending( <span class="keyword">const</span> SceneBlendType sbt );
17900537
18000547         <span class="keywordtype">void</span> setSceneBlending( <span class="keyword">const</span> SceneBlendFactor sourceFactor, <span class="keyword">const</span> SceneBlendFactor destFactor);
18100548
18200549
18300551         <span class="keywordtype">void</span> _notifyNeedsRecompile(<span class="keywordtype">void</span>);
18400552
18500565         <span class="keywordtype">void</span> setLodLevels(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materialw0">LodDistanceList</a>&amp; lodDistances);
18600573         <a class="code" href="classOgre_1_1ConstVectorIterator.html">LodDistanceIterator</a> getLodDistanceIterator(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
18700574
18800576         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getLodIndex(<a class="code" href="namespaceOgre.html#a465">Real</a> d) <span class="keyword">const</span>;
18900578         <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> getLodIndexSquaredDepth(<a class="code" href="namespaceOgre.html#a465">Real</a> squaredDepth) <span class="keyword">const</span>;
19000579
191<a name="l00582"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala53">00582</a>         <span class="keywordtype">void</span> touch(<span class="keywordtype">void</span>)
19200583         {
19300584             <span class="keywordflow">if</span> (mCompilationRequired)
19400585                 compile();
19500586             <span class="comment">// call superclass</span>
19600587             Resource::touch();
19700588         }
19800589         
19900601         <span class="keywordtype">bool</span> applyTextureAliases(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a77">AliasTextureNamePairList</a>&amp; aliasList, <span class="keyword">const</span> <span class="keywordtype">bool</span> apply = <span class="keyword">true</span>) <span class="keyword">const</span>;
20000602
201<a name="l00606"></a><a class="code" href="classOgre_1_1Material.html#Ogre_1_1Materiala55">00606</a>         <span class="keywordtype">bool</span> getCompilationRequired()<span class="keyword"> const</span>
20200607 <span class="keyword">        </span>{
20300608             <span class="keywordflow">return</span> mCompilationRequired;
20400609         }
20500610
20600611
20700612     };
20800613
209<a name="l00620"></a><a class="code" href="classOgre_1_1MaterialPtr.html">00620</a>     <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> MaterialPtr : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Material&gt;
21000621     {
21100622     <span class="keyword">public</span>:
212<a name="l00623"></a><a class="code" href="classOgre_1_1MaterialPtr.html#Ogre_1_1MaterialPtra0">00623</a>         MaterialPtr() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Material&gt;() {}
213<a name="l00624"></a><a class="code" href="classOgre_1_1MaterialPtr.html#Ogre_1_1MaterialPtra1">00624</a>         <span class="keyword">explicit</span> MaterialPtr(Material* rep) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Material&gt;(rep) {}
214<a name="l00625"></a><a class="code" href="classOgre_1_1MaterialPtr.html#Ogre_1_1MaterialPtra2">00625</a>         MaterialPtr(<span class="keyword">const</span> MaterialPtr&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Material&gt;(r) {}
215<a name="l00626"></a><a class="code" href="classOgre_1_1MaterialPtr.html#Ogre_1_1MaterialPtra3">00626</a>         MaterialPtr(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;Material&gt;()
21600627         {
21700628             <span class="comment">// lock &amp; copy other mutex pointer</span>
21800629             <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
21900630             <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
22000631             pRep = static_cast&lt;Material*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
22100632             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
22200633             <span class="keywordflow">if</span> (pUseCount)
22300634             {
22400635                 ++(*pUseCount);
22500636             }
22600637         }
22700638
228<a name="l00640"></a><a class="code" href="classOgre_1_1MaterialPtr.html#Ogre_1_1MaterialPtra4">00640</a>         MaterialPtr&amp; operator=(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r)
22900641         {
23000642             <span class="keywordflow">if</span> (pRep == static_cast&lt;Material*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()))
23100643                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
23200644             release();
23300645             <span class="comment">// lock &amp; copy other mutex pointer</span>
23400646             <a class="code" href="OgrePrerequisites_8h.html#a15">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
23500647             <a class="code" href="OgrePrerequisites_8h.html#a20">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
23600648             pRep = static_cast&lt;Material*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
23700649             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
23800650             <span class="keywordflow">if</span> (pUseCount)
23900651             {
24000652                 ++(*pUseCount);
24100653             }
24200654             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
24300655         }
24400656     };
24500657
24600658 } <span class="comment">//namespace </span>
24700659
24800660 <span class="preprocessor">#endif</span>
249</pre></div><hr>
250<p>
251Copyright &copy; 2000-2005 by The OGRE Team<br />
252<!--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/>
253This 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/>
254                <!--/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#">
255                <Work rdf:about="">
256                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
257        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
258                </Work>
259                <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> -->
260
261Last modified Sun Mar 12 14:37:43 2006
262</p>
263</body>
264</html>
Note: See TracBrowser for help on using the repository browser.