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

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

added ogre dependencies and patched ogre sources

Line 
1<html>
2<head>
3<title>OgreBspLevel.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>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>
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 _BspLevel_H__</span>
3500026 <span class="preprocessor"></span><span class="preprocessor">#define _BspLevel_H__</span>
3600027 <span class="preprocessor"></span>
3700028 <span class="preprocessor">#include "<a class="code" href="OgreBspPrerequisites_8h.html">OgreBspPrerequisites.h</a>"</span>
3800029 <span class="preprocessor">#include "<a class="code" href="OgreResource_8h.html">OgreResource.h</a>"</span>
3900030 <span class="preprocessor">#include "<a class="code" href="OgreStaticFaceGroup_8h.html">OgreStaticFaceGroup.h</a>"</span>
4000031 <span class="preprocessor">#include "<a class="code" href="OgreSceneManager_8h.html">OgreSceneManager.h</a>"</span>
4100032 <span class="preprocessor">#include "<a class="code" href="OgreBspNode_8h.html">OgreBspNode.h</a>"</span>
4200033 <span class="preprocessor">#include "<a class="code" href="OgreHardwareBufferManager_8h.html">OgreHardwareBufferManager.h</a>"</span>
4300034 <span class="preprocessor">#include "<a class="code" href="OgreDefaultHardwareBufferManager_8h.html">OgreDefaultHardwareBufferManager.h</a>"</span>
4400035 <span class="preprocessor">#include "<a class="code" href="OgreQuake3Level_8h.html">OgreQuake3Level.h</a>"</span>
4500036
4600037
4700038 <span class="keyword">namespace </span>Ogre {
4800039
49<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>
5000054     {
51<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>;
5200056     <span class="keyword">public</span>:
5300058         <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,
5400059             <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);
5500060         <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevela1">~BspLevel</a>();
5600061
5700063         <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>;
5800064
5900066         <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>);
6000067
6100071         <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>;
6200072
6300076         <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,
6400077             <span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>&amp; pos);
6500079         <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);
66<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>]; }
67<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>; }
6800084
6900086         <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);
7000087
7100089     <span class="keyword">protected</span>:
7200091         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb0">loadImpl</a>(<span class="keywordtype">void</span>);
7300093         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb1">unloadImpl</a>(<span class="keywordtype">void</span>);
7400095         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>;
75<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;
76<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>;
77<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>;
78<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>
7900106
80<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>
8100115         {
82<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];
83<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];
84<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;
85<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];
86<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];
8700121         };
8800122         <span class="comment">/*</span>
8900124 <span class="comment">        BspVertex* mVertices;</span>
9000125 <span class="comment">        int mNumVertices;</span>
9100126 <span class="comment">        */</span>
92<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;
9300129
94<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>;
95<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>;
9600135
97<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>;
98<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>;
9900139
10000140
10100141         <span class="comment">/*</span>
10200143 <span class="comment">        int* mElements;</span>
10300144 <span class="comment">        int mNumElements;</span>
10400145 <span class="comment">        */</span>
10500146
106<a name="l00148"></a><a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelp9">00148</a>         size_t mNumIndexes;
10700149         <span class="comment">// system-memory buffer</span>
108<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>;
10900151
110<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>;
11100154
112<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>;
11300157
11400159         <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);
115<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>
11600176         {
117<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>;
118<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>
119<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>
12000180         };
12100181
122<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>;
12300183
12400184
12500186         <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);
12600187
127<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>;
128<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>;
12900191
13000192         <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);
13100193
13200194         <span class="comment">// Storage of patches </span>
133<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>;
134<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>;
13500197         <span class="comment">// Total number of vertices required for all patches</span>
136<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>;
13700199         <span class="comment">// Total number of indexes required for all patches</span>
138<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>;
13900201
14000202         <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);
14100203         <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspLevel.html#Ogre_1_1BspLevelb7">buildQuake3Patches</a>(size_t vertOffset, size_t indexOffset);
14200204
14300205         <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);
14400206
14500207
14600208     };
147<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;
14800216     {
14900217     <span class="keyword">public</span>:
150<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;() {}
151<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) {}
152<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) {}
153<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;()
15400222         {
15500223             <span class="comment">// lock &amp; copy other mutex pointer</span>
15600224             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
15700225             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
15800226             pRep = static_cast&lt;BspLevel*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
15900227             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
16000228             <span class="keywordflow">if</span> (pUseCount)
16100229             {
16200230                 ++(*pUseCount);
16300231             }
16400232         }
16500233
166<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)
16700236         {
16800237             <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>()))
16900238                 <span class="keywordflow">return</span> *<span class="keyword">this</span>;
17000239             <a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtrb0">release</a>();
17100240             <span class="comment">// lock &amp; copy other mutex pointer</span>
17200241             <a class="code" href="OgrePrerequisites_8h.html#a14">OGRE_LOCK_MUTEX</a>(*r.OGRE_AUTO_MUTEX_NAME)
17300242             <a class="code" href="OgrePrerequisites_8h.html#a19">OGRE_COPY_AUTO_SHARED_MUTEX</a>(r.OGRE_AUTO_MUTEX_NAME)
17400243             pRep = static_cast&lt;BspLevel*&gt;(r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra12">getPointer</a>());
17500244             pUseCount = r.<a class="code" href="classOgre_1_1SharedPtr.html#Ogre_1_1SharedPtra11">useCountPointer</a>();
17600245             <span class="keywordflow">if</span> (pUseCount)
17700246             {
17800247                 ++(*pUseCount);
17900248             }
18000249             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
18100250         }
18200251     };
18300252
18400253 }
18500254
18600255 <span class="preprocessor">#endif</span>
187</pre></div><hr>
188<p>
189Copyright &copy; 2000-2005 by The OGRE Team<br />
190<!--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/>
191This 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/>
192                <!--/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#">
193                <Work rdf:about="">
194                        <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" />
195        <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" />
196                </Work>
197                <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> -->
198
199Last modified Sun Feb 12 12:59:42 2006
200</p>
201</body>
202</html>
Note: See TracBrowser for help on using the repository browser.