1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreBspNode.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 Page</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="namespacemembers.html">Namespace Members</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="globals.html">File Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
---|
10 | <h1>OgreBspNode.h</h1><a href="OgreBspNode_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/*</span> |
---|
11 | 00002 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
12 | 00003 <span class="comment">This source file is part of OGRE</span> |
---|
13 | 00004 <span class="comment"> (Object-oriented Graphics Rendering Engine)</span> |
---|
14 | 00005 <span class="comment">For the latest info, see http://www.ogre3d.org/</span> |
---|
15 | 00006 <span class="comment"></span> |
---|
16 | 00007 <span class="comment">Copyright (c) 2000-2005 The OGRE Team</span> |
---|
17 | 00008 <span class="comment">Also see acknowledgements in Readme.html</span> |
---|
18 | 00009 <span class="comment"></span> |
---|
19 | 00010 <span class="comment">This program is free software; you can redistribute it and/or modify it under</span> |
---|
20 | 00011 <span class="comment">the terms of the GNU Lesser General Public License as published by the Free Software</span> |
---|
21 | 00012 <span class="comment">Foundation; either version 2 of the License, or (at your option) any later</span> |
---|
22 | 00013 <span class="comment">version.</span> |
---|
23 | 00014 <span class="comment"></span> |
---|
24 | 00015 <span class="comment">This program is distributed in the hope that it will be useful, but WITHOUT</span> |
---|
25 | 00016 <span class="comment">ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> |
---|
26 | 00017 <span class="comment">FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.</span> |
---|
27 | 00018 <span class="comment"></span> |
---|
28 | 00019 <span class="comment">You should have received a copy of the GNU Lesser General Public License along with</span> |
---|
29 | 00020 <span class="comment">this program; if not, write to the Free Software Foundation, Inc., 59 Temple</span> |
---|
30 | 00021 <span class="comment">Place - Suite 330, Boston, MA 02111-1307, USA, or go to</span> |
---|
31 | 00022 <span class="comment">http://www.gnu.org/copyleft/lesser.txt.</span> |
---|
32 | 00023 <span class="comment">-----------------------------------------------------------------------------</span> |
---|
33 | 00024 <span class="comment">*/</span> |
---|
34 | 00025 <span class="preprocessor">#ifndef _BspNode_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define _BspNode_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgreBspPrerequisites_8h.html">OgreBspPrerequisites.h</a>"</span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgrePlane_8h.html">OgrePlane.h</a>"</span> |
---|
39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>"</span> |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreSceneQuery_8h.html">OgreSceneQuery.h</a>"</span> |
---|
41 | 00032 |
---|
42 | 00033 <span class="keyword">namespace </span>Ogre { |
---|
43 | 00034 |
---|
44 | <a name="l00048"></a><a class="code" href="classOgre_1_1BspNode.html">00048</a> <span class="keyword">class </span><a class="code" href="classOgre_1_1BspNode.html">BspNode</a> |
---|
45 | 00049 { |
---|
46 | <a name="l00050"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNoden0">00050</a> <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>; |
---|
47 | 00051 |
---|
48 | 00052 <span class="keyword">public</span>: |
---|
49 | 00054 <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea1">BspNode</a>(<a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>* owner, <span class="keywordtype">bool</span> isLeaf); |
---|
50 | 00055 |
---|
51 | 00056 <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea1">BspNode</a>(); |
---|
52 | 00057 <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea2">~BspNode</a>(); |
---|
53 | 00058 |
---|
54 | 00068 <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea3">isLeaf</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
55 | 00069 |
---|
56 | 00074 <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea4">getFront</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
57 | 00075 |
---|
58 | 00080 <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea5">getBack</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
59 | 00081 |
---|
60 | 00086 Plane::Side <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea6">getSide</a> (<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& point) <span class="keyword">const</span>; |
---|
61 | 00087 |
---|
62 | 00093 <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea7">getNextNode</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& point) <span class="keyword">const</span>; |
---|
63 | 00094 |
---|
64 | 00095 |
---|
65 | 00100 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Plane.html">Plane</a>& <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea8">getSplitPlane</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
66 | 00101 |
---|
67 | 00106 <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea9">getBoundingBox</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
68 | 00107 |
---|
69 | 00111 <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea10">getNumFaceGroups</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
70 | 00121 <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea11">getFaceGroupStart</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
71 | 00122 |
---|
72 | 00129 <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea12">isLeafVisible</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* leaf) <span class="keyword">const</span>; |
---|
73 | 00130 |
---|
74 | 00131 <span class="keyword">friend</span> std::ostream& <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNoden1">operator<< </a>(std::ostream& o, <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>& n); |
---|
75 | 00132 |
---|
76 | 00134 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea13">_addMovable</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* mov); |
---|
77 | 00135 |
---|
78 | 00137 <span class="keywordtype">void</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea14">_removeMovable</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* mov); |
---|
79 | 00138 |
---|
80 | 00140 <a class="code" href="namespaceOgre.html#a420">Real</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea15">getDistance</a>(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a>& pos) <span class="keyword">const</span>; |
---|
81 | 00141 |
---|
82 | <a name="l00142"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew0">00142</a> <span class="keyword">typedef</span> std::set<const MovableObject*> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew0">IntersectingObjectSet</a>; |
---|
83 | 00143 |
---|
84 | <a name="l00144"></a><a class="code" href="structOgre_1_1BspNode_1_1Brush.html">00144</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1BspNode_1_1Brush.html">Brush</a> |
---|
85 | 00145 { |
---|
86 | <a name="l00146"></a><a class="code" href="structOgre_1_1BspNode_1_1Brush.html#Ogre_1_1BspNode_1_1Brusho0">00146</a> std::list<Plane> planes; |
---|
87 | <a name="l00147"></a><a class="code" href="structOgre_1_1BspNode_1_1Brush.html#Ogre_1_1BspNode_1_1Brusho1">00147</a> <a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a> <a class="code" href="structOgre_1_1BspNode_1_1Brush.html#Ogre_1_1BspNode_1_1Brusho1">fragment</a>; <span class="comment">// For query reporting</span> |
---|
88 | 00148 }; |
---|
89 | <a name="l00149"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew1">00149</a> <span class="keyword">typedef</span> std::vector<Brush*> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew1">NodeBrushList</a>; <span class="comment">// Main brush memory held on level</span> |
---|
90 | 00150 |
---|
91 | 00154 <span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew1">NodeBrushList</a>& <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea16">getSolidBrushes</a>(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
92 | 00155 <span class="keyword">protected</span>: |
---|
93 | <a name="l00156"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep0">00156</a> <a class="code" href="classOgre_1_1BspLevel.html">BspLevel</a>* mOwner; <span class="comment">// Back-reference to containing level</span> |
---|
94 | <a name="l00157"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep1">00157</a> <span class="keywordtype">bool</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep1">mIsLeaf</a>; |
---|
95 | 00158 |
---|
96 | 00159 <span class="comment">// Node-only members</span> |
---|
97 | <a name="l00164"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep2">00164</a> <span class="comment"></span> <a class="code" href="classOgre_1_1Plane.html">Plane</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep2">mSplitPlane</a>; |
---|
98 | <a name="l00166"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep3">00166</a> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep3">mFront</a>; |
---|
99 | <a name="l00168"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep4">00168</a> <a class="code" href="classOgre_1_1BspNode.html">BspNode</a>* <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep4">mBack</a>; |
---|
100 | 00169 |
---|
101 | 00170 <span class="comment">// Leaf-only members</span> |
---|
102 | <a name="l00182"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep5">00182</a> <span class="comment"></span> <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep5">mVisCluster</a>; |
---|
103 | 00183 |
---|
104 | <a name="l00185"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep6">00185</a> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep6">mBounds</a>; |
---|
105 | <a name="l00187"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep7">00187</a> <span class="keywordtype">int</span> mNumFaceGroups; |
---|
106 | <a name="l00195"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep8">00195</a> <span class="keywordtype">int</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep8">mFaceGroupStart</a>; |
---|
107 | 00196 |
---|
108 | <a name="l00197"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep9">00197</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew0">IntersectingObjectSet</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep9">mMovables</a>; |
---|
109 | 00198 |
---|
110 | <a name="l00199"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep10">00199</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew1">NodeBrushList</a> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep10">mSolidBrushes</a>; |
---|
111 | 00200 <span class="keyword">public</span>: |
---|
112 | <a name="l00201"></a><a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea17">00201</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodew0">IntersectingObjectSet</a>& <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodea17">getObjects</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1BspNode.html#Ogre_1_1BspNodep9">mMovables</a>; } |
---|
113 | 00202 |
---|
114 | 00203 |
---|
115 | 00204 }; |
---|
116 | 00205 |
---|
117 | 00206 |
---|
118 | 00207 } |
---|
119 | 00208 |
---|
120 | 00209 <span class="preprocessor">#endif</span> |
---|
121 | </pre></div><hr> |
---|
122 | <p> |
---|
123 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
124 | <!--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/> |
---|
125 | This 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/> |
---|
126 | <!--/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#"> |
---|
127 | <Work rdf:about=""> |
---|
128 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
129 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
130 | </Work> |
---|
131 | <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> --> |
---|
132 | |
---|
133 | Last modified Sun Feb 12 12:59:42 2006 |
---|
134 | </p> |
---|
135 | </body> |
---|
136 | </html> |
---|