Sophie

Sophie

distrib > Mandriva > 10.2 > i586 > media > contrib > by-pkgid > 04e5d8c10ae76748689b4e7f48e0fa33 > files > 284

libogre5-devel-1.0.0-1mdk.i586.rpm

<html>
<head>
<title>OgreBspLevel.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&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>
<h1>OgreBspLevel.h</h1><a href="OgreBspLevel_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 _BspLevel_H__</span>
00026 <span class="preprocessor"></span><span class="preprocessor">#define _BspLevel_H__</span>
00027 <span class="preprocessor"></span>
00028 <span class="preprocessor">#include "<a class="code" href="OgreBspPrerequisites_8h.html">OgreBspPrerequisites.h</a>"</span>
00029 <span class="preprocessor">#include "<a class="code" href="OgreResource_8h.html">OgreResource.h</a>"</span>
00030 <span class="preprocessor">#include "<a class="code" href="OgreStaticFaceGroup_8h.html">OgreStaticFaceGroup.h</a>"</span>
00031 <span class="preprocessor">#include "<a class="code" href="OgreSceneManager_8h.html">OgreSceneManager.h</a>"</span>
00032 <span class="preprocessor">#include "<a class="code" href="OgreBspNode_8h.html">OgreBspNode.h</a>"</span>
00033 <span class="preprocessor">#include "<a class="code" href="OgreHardwareBufferManager_8h.html">OgreHardwareBufferManager.h</a>"</span>
00034 <span class="preprocessor">#include "<a class="code" href="OgreDefaultHardwareBufferManager_8h.html">OgreDefaultHardwareBufferManager.h</a>"</span>
00035 <span class="preprocessor">#include "<a class="code" href="OgreQuake3Level_8h.html">OgreQuake3Level.h</a>"</span>
00036 
00037 
00038 <span class="keyword">namespace </span>Ogre {
00039 
<a name="l00053"></a><a class="code" href="classOgre_1_1BspLevel.html">00053</a>     <span class="keyword">class </span><a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1Resource.html">Resource</a>
00054     {
<a name="l00055"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLeveln0">00055</a>         <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1BspSceneManager.html">BspSceneManager</a>;
00056     <span class="keyword">public</span>:
00058         <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela0">BspLevel</a>(<a class="code" href="classOgre_1_1ResourceManager.html">ResourceManager</a>* creator, <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; name, <a class="code" href="namespaceOgre.html#a485">ResourceHandle</a> handle,
00059             <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">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);
00060         <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela1">~BspLevel</a>();
00061 
00063         <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela2">isLeafVisible</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* from, <span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* to) <span class="keyword">const</span>;
00064 
00066         <span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela3">getRootNode</a>(<span class="keywordtype">void</span>);
00067 
00071         <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela4">findLeaf</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; point) <span class="keyword">const</span>;
00072 
00076         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela5">_notifyObjectMoved</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* mov, 
00077             <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; pos);
00079         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela6">_notifyObjectDetached</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* mov);
<a name="l00081"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela7">00081</a>         <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela7">getLeafStart</a>(<span class="keywordtype">void</span>) {<span class="keywordflow">return</span> &amp;mRootNode[<a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp3">mLeafStart</a>]; }
<a name="l00083"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela8">00083</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela8">getNumLeaves</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp2">mNumLeaves</a>; }
00084 
00086         <span class="keyword">static</span> size_t <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevele0">calculateLoadingStages</a>(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>&amp; levelName);
00087 
00089     <span class="keyword">protected</span>:
00091         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb0">loadImpl</a>(<span class="keywordtype">void</span>);
00093         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb1">unloadImpl</a>(<span class="keywordtype">void</span>);
00095         size_t <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb2">calculateSize</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>;
<a name="l00102"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp0">00102</a>         <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* mRootNode;
<a name="l00103"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp1">00103</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp1">mNumNodes</a>;
<a name="l00104"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp2">00104</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp2">mNumLeaves</a>;
<a name="l00105"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp3">00105</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp3">mLeafStart</a>; <span class="comment">// the index at which leaf nodes begin</span>
00106 
<a name="l00114"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html">00114</a>         <span class="keyword">struct </span><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html">BspVertex</a>
00115         {
<a name="l00116"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo0">00116</a>             <span class="keywordtype">float</span> position[3];
<a name="l00117"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo1">00117</a>             <span class="keywordtype">float</span> normal[3];
<a name="l00118"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo2">00118</a>             <span class="keywordtype">int</span> colour;
<a name="l00119"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo3">00119</a>             <span class="keywordtype">float</span> <a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo3">texcoords</a>[2];
<a name="l00120"></a><a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo4">00120</a>             <span class="keywordtype">float</span> <a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html#Ogre_1_1BspLevel_1_1BspVertexo4">lightmap</a>[2];
00121         };
00122         <span class="comment">/*</span>
00124 <span class="comment">        BspVertex* mVertices;</span>
00125 <span class="comment">        int mNumVertices;</span>
00126 <span class="comment">        */</span>
<a name="l00128"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp4">00128</a>         <a class="code" href="classOgre_1_1VertexData.html">VertexData</a>* mVertexData;
00129 
<a name="l00133"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp5">00133</a>         <span class="keywordtype">int</span>* <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp5">mLeafFaceGroups</a>;
<a name="l00134"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp6">00134</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp6">mNumLeafFaceGroups</a>;
00135 
<a name="l00137"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp7">00137</a>         <a class="code" href="structOgre_1_1StaticFaceGroup.html">StaticFaceGroup</a>* <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp7">mFaceGroups</a>;
<a name="l00138"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp8">00138</a>         <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp8">mNumFaceGroups</a>;
00139 
00140 
00141         <span class="comment">/*</span>
00143 <span class="comment">        int* mElements;</span>
00144 <span class="comment">        int mNumElements;</span>
00145 <span class="comment">        */</span>
00146 
<a name="l00148"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp9">00148</a>         size_t mNumIndexes;
00149         <span class="comment">// system-memory buffer</span>
<a name="l00150"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp10">00150</a>         <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp10">mIndexes</a>;
00151 
<a name="l00153"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp11">00153</a>         <a class="code" href="structOgre_1_1BspNode_1_1Brush.html">BspNode::Brush</a> *<a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp11">mBrushes</a>;
00154 
<a name="l00156"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp12">00156</a>         std::vector&lt;ViewPoint&gt; <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp12">mPlayerStarts</a>;
00157 
00159         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb3">loadQuake3Level</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Quake3Level.html">Quake3Level</a>&amp; q3lvl);
<a name="l00175"></a><a class="code" href="structOgre_1_1BspLevel_1_1VisData.html">00175</a>         <span class="keyword">struct </span><a class="code" href="structOgre_1_1BspLevel_1_1VisData.html">VisData</a>
00176         {
<a name="l00177"></a><a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao0">00177</a>             <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> *<a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao0">tableData</a>;
<a name="l00178"></a><a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao1">00178</a>             <span class="keywordtype">int</span> <a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao1">numClusters</a>;            <span class="comment">// Number of clusters, therefore number of rows</span>
<a name="l00179"></a><a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao2">00179</a>             <span class="keywordtype">int</span> <a class="code" href="structOgre_1_1BspLevel_1_1VisData.html#Ogre_1_1BspLevel_1_1VisDatao2">rowLength</a>;                <span class="comment">// Length in bytes of each row (num clusters / 8 rounded up)</span>
00180         };
00181 
<a name="l00182"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp13">00182</a>         <a class="code" href="structOgre_1_1BspLevel_1_1VisData.html">VisData</a> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp13">mVisData</a>;
00183 
00184 
00186         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb4">loadEntities</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Quake3Level.html">Quake3Level</a>&amp; q3lvl);
00187 
<a name="l00188"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx0">00188</a>         <span class="keyword">typedef</span> std::map&lt;const MovableObject*, std::list&lt;BspNode*&gt; &gt; <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx0">MovableToNodeMap</a>;
<a name="l00190"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp14">00190</a>         <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx0">MovableToNodeMap</a> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp14">mMovableToNodeMap</a>;
00191 
00192         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb5">tagNodesWithMovable</a>(<a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* node, <span class="keyword">const</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* mov, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; pos);
00193 
00194         <span class="comment">// Storage of patches </span>
<a name="l00195"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx1">00195</a>         <span class="keyword">typedef</span> std::map&lt;int, PatchSurface*&gt; <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx1">PatchMap</a>;
<a name="l00196"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp15">00196</a>         <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelx1">PatchMap</a> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp15">mPatches</a>;
00197         <span class="comment">// Total number of vertices required for all patches</span>
<a name="l00198"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp16">00198</a>         size_t <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp16">mPatchVertexCount</a>;
00199         <span class="comment">// Total number of indexes required for all patches</span>
<a name="l00200"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp17">00200</a>         size_t <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp17">mPatchIndexCount</a>;
00201 
00202         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb6">initQuake3Patches</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Quake3Level.html">Quake3Level</a> &amp; q3lvl, <a class="code" href="classOgre_1_1VertexDeclaration.html">VertexDeclaration</a>* decl);
00203         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb7">buildQuake3Patches</a>(size_t vertOffset, size_t indexOffset);
00204 
00205         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb8">quakeVertexToBspVertex</a>(<span class="keyword">const</span> <a class="code" href="structbsp__vertex__t.html">bsp_vertex_t</a>* src, <a class="code" href="structOgre_1_1BspLevel_1_1BspVertex.html">BspVertex</a>* dest);
00206 
00207 
00208     };
<a name="l00215"></a><a class="code" href="classOgre_1_1BspLevelPtr.html">00215</a>     <span class="keyword">class </span><a class="code" href="classOgre_1_1BspLevelPtr.html">BspLevelPtr</a> : <span class="keyword">public</span> <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;BspLevel&gt; 
00216     {
00217     <span class="keyword">public</span>:
<a name="l00218"></a><a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra0">00218</a>         <a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra0">BspLevelPtr</a>() : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>&gt;() {}
<a name="l00219"></a><a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra1">00219</a>         <span class="keyword">explicit</span> <a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra0">BspLevelPtr</a>(<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>* rep) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>&gt;(rep) {}
<a name="l00220"></a><a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra2">00220</a>         <a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra0">BspLevelPtr</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1BspLevelPtr.html">BspLevelPtr</a>&amp; r) : <a class="code" href="classOgre_1_1SharedPtr.html">SharedPtr</a>&lt;<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>&gt;(r) {} 
<a name="l00221"></a><a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra3">00221</a>         <a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra0">BspLevelPtr</a>(<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;<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>&gt;()
00222         {
00223             <span class="comment">// lock &amp; copy other mutex pointer</span>
00224             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
00225             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
00226             pRep = static_cast&lt;BspLevel*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
00227             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
00228             <span class="keywordflow">if</span> (pUseCount)
00229             {
00230                 ++(*pUseCount);
00231             }
00232         }
00233 
<a name="l00235"></a><a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra4">00235</a>         <a class="code" href="classOgre_1_1BspLevelPtr.html">BspLevelPtr</a>&amp; <a class="code" href="classOgre_1_1BspLevelPtr.html#Ogre_1_1BspLevelPtra4">operator=</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1SharedPtr.html">ResourcePtr</a>&amp; r)
00236         {
00237             <span class="keywordflow">if</span> (pRep == static_cast&lt;BspLevel*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>()))
00238                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
00239             <a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtrb0">release</a>();
00240             <span class="comment">// lock &amp; copy other mutex pointer</span>
00241             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
00242             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
00243             pRep = static_cast&lt;BspLevel*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
00244             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
00245             <span class="keywordflow">if</span> (pUseCount)
00246             {
00247                 ++(*pUseCount);
00248             }
00249             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
00250         }
00251     };
00252 
00253 }
00254 
00255 <span class="preprocessor">#endif</span>
</pre></div><p>
Copyright &copy; 2000-2005 by The OGRE Team<br />
Last modified Wed Feb 23 00:19:03 2005
</p>
</body>
</html>