1 | <html> |
---|
2 | <head> |
---|
3 | <title>OgreSceneQuery.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>OgreSceneQuery.h</h1><a href="OgreSceneQuery_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 __SceneQuery_H__</span> |
---|
35 | 00026 <span class="preprocessor"></span><span class="preprocessor">#define __SceneQuery_H__</span> |
---|
36 | 00027 <span class="preprocessor"></span> |
---|
37 | 00028 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>"</span> |
---|
39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreSphere_8h.html">OgreSphere.h</a>"</span> |
---|
40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreRay_8h.html">OgreRay.h</a>"</span> |
---|
41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreRenderOperation_8h.html">OgreRenderOperation.h</a>"</span> |
---|
42 | 00033 <span class="preprocessor">#include "<a class="code" href="OgrePlaneBoundedVolume_8h.html">OgrePlaneBoundedVolume.h</a>"</span> |
---|
43 | 00034 |
---|
44 | 00035 <span class="keyword">namespace </span>Ogre { |
---|
45 | 00036 |
---|
46 | 00037 <span class="comment">// forward declaration</span> |
---|
47 | 00038 <span class="keyword">class </span>SceneQueryListener; |
---|
48 | <a name="l00064"></a><a class="code" href="classOgre_1_1SceneQuery.html">00064</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> SceneQuery |
---|
49 | 00065 { |
---|
50 | 00066 <span class="keyword">public</span>: |
---|
51 | <a name="l00073"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQueryw5">00073</a> <span class="keyword">enum</span> WorldFragmentType { |
---|
52 | 00075 WFT_NONE, |
---|
53 | 00077 WFT_PLANE_BOUNDED_REGION, |
---|
54 | 00079 WFT_SINGLE_INTERSECTION, |
---|
55 | 00081 WFT_CUSTOM_GEOMETRY, |
---|
56 | 00083 WFT_RENDER_OPERATION |
---|
57 | 00084 }; |
---|
58 | 00085 |
---|
59 | <a name="l00099"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">00099</a> <span class="keyword">struct </span><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">WorldFragment</a> { |
---|
60 | <a name="l00101"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html#Ogre_1_1SceneQuery_1_1WorldFragmento0">00101</a> WorldFragmentType fragmentType; |
---|
61 | <a name="l00103"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html#Ogre_1_1SceneQuery_1_1WorldFragmento1">00103</a> <a class="code" href="classOgre_1_1Vector3.html">Vector3</a> singleIntersection; |
---|
62 | <a name="l00105"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html#Ogre_1_1SceneQuery_1_1WorldFragmento2">00105</a> std::list<Plane>* planes; |
---|
63 | <a name="l00107"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html#Ogre_1_1SceneQuery_1_1WorldFragmento3">00107</a> <span class="keywordtype">void</span>* geometry; |
---|
64 | <a name="l00109"></a><a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html#Ogre_1_1SceneQuery_1_1WorldFragmento4">00109</a> <a class="code" href="classOgre_1_1RenderOperation.html">RenderOperation</a>* renderOp; |
---|
65 | 00110 |
---|
66 | 00111 }; |
---|
67 | 00112 <span class="keyword">protected</span>: |
---|
68 | <a name="l00113"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQueryp4">00113</a> <a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mParentSceneMgr; |
---|
69 | <a name="l00114"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQueryp5">00114</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mQueryMask; |
---|
70 | <a name="l00115"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQueryp6">00115</a> std::set<WorldFragmentType> mSupportedWorldFragments; |
---|
71 | <a name="l00116"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQueryp7">00116</a> WorldFragmentType mWorldFragmentType; |
---|
72 | 00117 |
---|
73 | 00118 <span class="keyword">public</span>: |
---|
74 | 00120 SceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
75 | 00121 <span class="keyword">virtual</span> ~SceneQuery(); |
---|
76 | 00122 |
---|
77 | 00132 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setQueryMask(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mask); |
---|
78 | 00134 <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getQueryMask(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
79 | 00135 |
---|
80 | 00146 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setWorldFragmentType(<span class="keyword">enum</span> WorldFragmentType wft); |
---|
81 | 00147 |
---|
82 | 00149 <span class="keyword">virtual</span> WorldFragmentType getWorldFragmentType(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
83 | 00150 |
---|
84 | <a name="l00152"></a><a class="code" href="classOgre_1_1SceneQuery.html#Ogre_1_1TerrainRaySceneQuerya17">00152</a> <span class="keyword">virtual</span> <span class="keyword">const</span> std::set<WorldFragmentType>* getSupportedWorldFragmentTypes(<span class="keywordtype">void</span>)<span class="keyword"> const</span> |
---|
85 | 00153 <span class="keyword"> </span>{<span class="keywordflow">return</span> &mSupportedWorldFragments;} |
---|
86 | 00154 |
---|
87 | 00155 |
---|
88 | 00156 }; |
---|
89 | 00157 |
---|
90 | <a name="l00164"></a><a class="code" href="classOgre_1_1SceneQueryListener.html">00164</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> SceneQueryListener |
---|
91 | 00165 { |
---|
92 | 00166 <span class="keyword">public</span>: |
---|
93 | <a name="l00167"></a><a class="code" href="classOgre_1_1SceneQueryListener.html#Ogre_1_1SceneQueryListenera0">00167</a> <span class="keyword">virtual</span> ~SceneQueryListener() { } |
---|
94 | 00173 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* object) = 0; |
---|
95 | 00179 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment) = 0; |
---|
96 | 00180 |
---|
97 | 00181 }; |
---|
98 | 00182 |
---|
99 | <a name="l00183"></a><a class="code" href="namespaceOgre.html#a494">00183</a> <span class="keyword">typedef</span> std::list<MovableObject*> <a class="code" href="namespaceOgre.html#a494">SceneQueryResultMovableList</a>; |
---|
100 | <a name="l00184"></a><a class="code" href="namespaceOgre.html#a495">00184</a> <span class="keyword">typedef</span> std::list<SceneQuery::WorldFragment*> <a class="code" href="namespaceOgre.html#a495">SceneQueryResultWorldFragmentList</a>; |
---|
101 | <a name="l00186"></a><a class="code" href="structOgre_1_1SceneQueryResult.html">00186</a> <span class="keyword">struct </span><a class="code" href="class__OgreExport.html">_OgreExport</a> SceneQueryResult |
---|
102 | 00187 { |
---|
103 | <a name="l00189"></a><a class="code" href="structOgre_1_1SceneQueryResult.html#Ogre_1_1SceneQueryResulto0">00189</a> <a class="code" href="namespaceOgre.html#a494">SceneQueryResultMovableList</a> movables; |
---|
104 | <a name="l00191"></a><a class="code" href="structOgre_1_1SceneQueryResult.html#Ogre_1_1SceneQueryResulto1">00191</a> <a class="code" href="namespaceOgre.html#a495">SceneQueryResultWorldFragmentList</a> worldFragments; |
---|
105 | 00192 }; |
---|
106 | 00193 |
---|
107 | <a name="l00200"></a><a class="code" href="classOgre_1_1RegionSceneQuery.html">00200</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> RegionSceneQuery |
---|
108 | 00201 : <span class="keyword">public</span> SceneQuery, <span class="keyword">public</span> SceneQueryListener |
---|
109 | 00202 { |
---|
110 | 00203 <span class="keyword">protected</span>: |
---|
111 | <a name="l00204"></a><a class="code" href="classOgre_1_1RegionSceneQuery.html#Ogre_1_1SphereSceneQueryp1">00204</a> SceneQueryResult* mLastResult; |
---|
112 | 00205 <span class="keyword">public</span>: |
---|
113 | 00207 RegionSceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
114 | 00208 <span class="keyword">virtual</span> ~RegionSceneQuery(); |
---|
115 | 00217 <span class="keyword">virtual</span> SceneQueryResult& execute(<span class="keywordtype">void</span>); |
---|
116 | 00218 |
---|
117 | 00226 <span class="keyword">virtual</span> <span class="keywordtype">void</span> execute(SceneQueryListener* listener) = 0; |
---|
118 | 00227 |
---|
119 | 00231 <span class="keyword">virtual</span> SceneQueryResult& getLastResults(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
120 | 00238 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clearResults(<span class="keywordtype">void</span>); |
---|
121 | 00239 |
---|
122 | 00241 <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* first); |
---|
123 | 00243 <span class="keywordtype">bool</span> queryResult(<a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment); |
---|
124 | 00244 }; |
---|
125 | 00245 |
---|
126 | <a name="l00247"></a><a class="code" href="classOgre_1_1AxisAlignedBoxSceneQuery.html">00247</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> AxisAlignedBoxSceneQuery : <span class="keyword">public</span> RegionSceneQuery |
---|
127 | 00248 { |
---|
128 | 00249 <span class="keyword">protected</span>: |
---|
129 | <a name="l00250"></a><a class="code" href="classOgre_1_1AxisAlignedBoxSceneQuery.html#Ogre_1_1OctreeAxisAlignedBoxSceneQueryp0">00250</a> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> mAABB; |
---|
130 | 00251 <span class="keyword">public</span>: |
---|
131 | 00252 AxisAlignedBoxSceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
132 | 00253 <span class="keyword">virtual</span> ~AxisAlignedBoxSceneQuery(); |
---|
133 | 00254 |
---|
134 | 00256 <span class="keywordtype">void</span> setBox(<span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& box); |
---|
135 | 00257 |
---|
136 | 00259 <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& getBox(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
137 | 00260 |
---|
138 | 00261 }; |
---|
139 | 00262 |
---|
140 | <a name="l00264"></a><a class="code" href="classOgre_1_1SphereSceneQuery.html">00264</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> SphereSceneQuery : <span class="keyword">public</span> RegionSceneQuery |
---|
141 | 00265 { |
---|
142 | 00266 <span class="keyword">protected</span>: |
---|
143 | <a name="l00267"></a><a class="code" href="classOgre_1_1SphereSceneQuery.html#Ogre_1_1SphereSceneQueryp0">00267</a> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a> mSphere; |
---|
144 | 00268 <span class="keyword">public</span>: |
---|
145 | 00269 SphereSceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
146 | 00270 <span class="keyword">virtual</span> ~SphereSceneQuery(); |
---|
147 | 00272 <span class="keywordtype">void</span> setSphere(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& sphere); |
---|
148 | 00273 |
---|
149 | 00275 <span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& getSphere() <span class="keyword">const</span>; |
---|
150 | 00276 |
---|
151 | 00277 }; |
---|
152 | 00278 |
---|
153 | <a name="l00281"></a><a class="code" href="classOgre_1_1PlaneBoundedVolumeListSceneQuery.html">00281</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> PlaneBoundedVolumeListSceneQuery : <span class="keyword">public</span> RegionSceneQuery |
---|
154 | 00282 { |
---|
155 | 00283 <span class="keyword">protected</span>: |
---|
156 | <a name="l00284"></a><a class="code" href="classOgre_1_1PlaneBoundedVolumeListSceneQuery.html#Ogre_1_1PlaneBoundedVolumeListSceneQueryp0">00284</a> <a class="code" href="namespaceOgre.html#a411">PlaneBoundedVolumeList</a> mVolumes; |
---|
157 | 00285 <span class="keyword">public</span>: |
---|
158 | 00286 PlaneBoundedVolumeListSceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
159 | 00287 <span class="keyword">virtual</span> ~PlaneBoundedVolumeListSceneQuery(); |
---|
160 | 00289 <span class="keywordtype">void</span> setVolumes(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a411">PlaneBoundedVolumeList</a>& volumes); |
---|
161 | 00290 |
---|
162 | 00292 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a411">PlaneBoundedVolumeList</a>& getVolumes() <span class="keyword">const</span>; |
---|
163 | 00293 |
---|
164 | 00294 }; |
---|
165 | 00295 |
---|
166 | 00296 |
---|
167 | 00297 <span class="comment">/*</span> |
---|
168 | 00299 <span class="comment"> class _OgreExport PyramidSceneQuery : public RegionSceneQuery</span> |
---|
169 | 00300 <span class="comment"> {</span> |
---|
170 | 00301 <span class="comment"> public:</span> |
---|
171 | 00302 <span class="comment"> PyramidSceneQuery(SceneManager* mgr);</span> |
---|
172 | 00303 <span class="comment"> virtual ~PyramidSceneQuery();</span> |
---|
173 | 00304 <span class="comment"> };</span> |
---|
174 | 00305 <span class="comment"> */</span> |
---|
175 | 00306 |
---|
176 | <a name="l00312"></a><a class="code" href="classOgre_1_1RaySceneQueryListener.html">00312</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> RaySceneQueryListener |
---|
177 | 00313 { |
---|
178 | 00314 <span class="keyword">public</span>: |
---|
179 | <a name="l00315"></a><a class="code" href="classOgre_1_1RaySceneQueryListener.html#Ogre_1_1RaySceneQueryListenera0">00315</a> <span class="keyword">virtual</span> ~RaySceneQueryListener() { } |
---|
180 | 00322 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* obj, <a class="code" href="namespaceOgre.html#a420">Real</a> distance) = 0; |
---|
181 | 00323 |
---|
182 | 00330 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment, <a class="code" href="namespaceOgre.html#a420">Real</a> distance) = 0; |
---|
183 | 00331 |
---|
184 | 00332 }; |
---|
185 | 00333 |
---|
186 | <a name="l00335"></a><a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html">00335</a> <span class="keyword">struct </span><a class="code" href="class__OgreExport.html">_OgreExport</a> RaySceneQueryResultEntry |
---|
187 | 00336 { |
---|
188 | <a name="l00338"></a><a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html#Ogre_1_1RaySceneQueryResultEntryo0">00338</a> <a class="code" href="namespaceOgre.html#a420">Real</a> distance; |
---|
189 | <a name="l00340"></a><a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html#Ogre_1_1RaySceneQueryResultEntryo1">00340</a> <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* movable; |
---|
190 | <a name="l00342"></a><a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html#Ogre_1_1RaySceneQueryResultEntryo2">00342</a> <a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* worldFragment; |
---|
191 | <a name="l00344"></a><a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html#Ogre_1_1RaySceneQueryResultEntrya0">00344</a> <span class="keywordtype">bool</span> operator < (<span class="keyword">const</span> RaySceneQueryResultEntry& rhs)<span class="keyword"> const</span> |
---|
192 | 00345 <span class="keyword"> </span>{ |
---|
193 | 00346 <span class="keywordflow">return</span> this->distance < rhs.<a class="code" href="structOgre_1_1RaySceneQueryResultEntry.html#Ogre_1_1RaySceneQueryResultEntryo0">distance</a>; |
---|
194 | 00347 } |
---|
195 | 00348 |
---|
196 | 00349 }; |
---|
197 | <a name="l00350"></a><a class="code" href="namespaceOgre.html#a496">00350</a> <span class="keyword">typedef</span> std::list<RaySceneQueryResultEntry> <a class="code" href="namespaceOgre.html#a496">RaySceneQueryResult</a>; |
---|
198 | 00351 |
---|
199 | <a name="l00353"></a><a class="code" href="classOgre_1_1RaySceneQuery.html">00353</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> RaySceneQuery : <span class="keyword">public</span> SceneQuery, <span class="keyword">public</span> RaySceneQueryListener |
---|
200 | 00354 { |
---|
201 | 00355 <span class="keyword">protected</span>: |
---|
202 | <a name="l00356"></a><a class="code" href="classOgre_1_1RaySceneQuery.html#Ogre_1_1TerrainRaySceneQueryp0">00356</a> <a class="code" href="classOgre_1_1Ray.html">Ray</a> mRay; |
---|
203 | <a name="l00357"></a><a class="code" href="classOgre_1_1RaySceneQuery.html#Ogre_1_1TerrainRaySceneQueryp1">00357</a> <span class="keywordtype">bool</span> mSortByDistance; |
---|
204 | <a name="l00358"></a><a class="code" href="classOgre_1_1RaySceneQuery.html#Ogre_1_1TerrainRaySceneQueryp2">00358</a> <a class="code" href="namespaceOgre.html#a422">ushort</a> mMaxResults; |
---|
205 | <a name="l00359"></a><a class="code" href="classOgre_1_1RaySceneQuery.html#Ogre_1_1TerrainRaySceneQueryp3">00359</a> <a class="code" href="namespaceOgre.html#a496">RaySceneQueryResult</a>* mLastResult; |
---|
206 | 00360 |
---|
207 | 00361 <span class="keyword">public</span>: |
---|
208 | 00362 RaySceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
209 | 00363 <span class="keyword">virtual</span> ~RaySceneQuery(); |
---|
210 | 00365 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setRay(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& ray); |
---|
211 | 00367 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Ray.html">Ray</a>& getRay(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
212 | 00386 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setSortByDistance(<span class="keywordtype">bool</span> sort, <a class="code" href="namespaceOgre.html#a422">ushort</a> maxresults = 0); |
---|
213 | 00388 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> getSortByDistance(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
214 | 00391 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a422">ushort</a> getMaxResults(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
215 | 00400 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a496">RaySceneQueryResult</a>& execute(<span class="keywordtype">void</span>); |
---|
216 | 00401 |
---|
217 | 00409 <span class="keyword">virtual</span> <span class="keywordtype">void</span> execute(RaySceneQueryListener* listener) = 0; |
---|
218 | 00410 |
---|
219 | 00414 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a496">RaySceneQueryResult</a>& getLastResults(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
220 | 00421 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clearResults(<span class="keywordtype">void</span>); |
---|
221 | 00422 |
---|
222 | 00424 <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* obj, <a class="code" href="namespaceOgre.html#a420">Real</a> distance); |
---|
223 | 00426 <span class="keywordtype">bool</span> queryResult(<a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment, <a class="code" href="namespaceOgre.html#a420">Real</a> distance); |
---|
224 | 00427 |
---|
225 | 00428 |
---|
226 | 00429 |
---|
227 | 00430 |
---|
228 | 00431 }; |
---|
229 | 00432 |
---|
230 | <a name="l00438"></a><a class="code" href="classOgre_1_1IntersectionSceneQueryListener.html">00438</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> IntersectionSceneQueryListener |
---|
231 | 00439 { |
---|
232 | 00440 <span class="keyword">public</span>: |
---|
233 | <a name="l00441"></a><a class="code" href="classOgre_1_1IntersectionSceneQueryListener.html#Ogre_1_1IntersectionSceneQueryListenera0">00441</a> <span class="keyword">virtual</span> ~IntersectionSceneQueryListener() { } |
---|
234 | 00448 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* first, <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* second) = 0; |
---|
235 | 00449 |
---|
236 | 00456 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* movable, <a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment) = 0; |
---|
237 | 00457 |
---|
238 | 00458 <span class="comment">/* NB there are no results for world fragments intersecting other world fragments;</span> |
---|
239 | 00459 <span class="comment"> it is assumed that world geometry is either static or at least that self-intersections</span> |
---|
240 | 00460 <span class="comment"> are irrelevant or dealt with elsewhere (such as the custom scene manager) */</span> |
---|
241 | 00461 |
---|
242 | 00462 |
---|
243 | 00463 }; |
---|
244 | 00464 |
---|
245 | <a name="l00465"></a><a class="code" href="namespaceOgre.html#a497">00465</a> <span class="keyword">typedef</span> std::pair<MovableObject*, MovableObject*> <a class="code" href="namespaceOgre.html#a497">SceneQueryMovableObjectPair</a>; |
---|
246 | <a name="l00466"></a><a class="code" href="namespaceOgre.html#a498">00466</a> <span class="keyword">typedef</span> std::pair<MovableObject*, SceneQuery::WorldFragment*> <a class="code" href="namespaceOgre.html#a498">SceneQueryMovableObjectWorldFragmentPair</a>; |
---|
247 | <a name="l00467"></a><a class="code" href="namespaceOgre.html#a499">00467</a> <span class="keyword">typedef</span> std::list<SceneQueryMovableObjectPair> <a class="code" href="namespaceOgre.html#a499">SceneQueryMovableIntersectionList</a>; |
---|
248 | <a name="l00468"></a><a class="code" href="namespaceOgre.html#a500">00468</a> <span class="keyword">typedef</span> std::list<SceneQueryMovableObjectWorldFragmentPair> <a class="code" href="namespaceOgre.html#a500">SceneQueryMovableWorldFragmentIntersectionList</a>; |
---|
249 | <a name="l00470"></a><a class="code" href="structOgre_1_1IntersectionSceneQueryResult.html">00470</a> <span class="keyword">struct </span><a class="code" href="class__OgreExport.html">_OgreExport</a> IntersectionSceneQueryResult |
---|
250 | 00471 { |
---|
251 | <a name="l00473"></a><a class="code" href="structOgre_1_1IntersectionSceneQueryResult.html#Ogre_1_1IntersectionSceneQueryResulto0">00473</a> <a class="code" href="namespaceOgre.html#a499">SceneQueryMovableIntersectionList</a> movables2movables; |
---|
252 | <a name="l00475"></a><a class="code" href="structOgre_1_1IntersectionSceneQueryResult.html#Ogre_1_1IntersectionSceneQueryResulto1">00475</a> <a class="code" href="namespaceOgre.html#a500">SceneQueryMovableWorldFragmentIntersectionList</a> movables2world; |
---|
253 | 00476 |
---|
254 | 00477 |
---|
255 | 00478 |
---|
256 | 00479 }; |
---|
257 | 00480 |
---|
258 | <a name="l00489"></a><a class="code" href="classOgre_1_1IntersectionSceneQuery.html">00489</a> <span class="keyword">class </span><a class="code" href="class__OgreExport.html">_OgreExport</a> IntersectionSceneQuery |
---|
259 | 00490 : <span class="keyword">public</span> SceneQuery, <span class="keyword">public</span> IntersectionSceneQueryListener |
---|
260 | 00491 { |
---|
261 | 00492 <span class="keyword">protected</span>: |
---|
262 | <a name="l00493"></a><a class="code" href="classOgre_1_1IntersectionSceneQuery.html#Ogre_1_1OctreeIntersectionSceneQueryp0">00493</a> IntersectionSceneQueryResult* mLastResult; |
---|
263 | 00494 <span class="keyword">public</span>: |
---|
264 | 00495 IntersectionSceneQuery(<a class="code" href="classOgre_1_1SceneManager.html">SceneManager</a>* mgr); |
---|
265 | 00496 <span class="keyword">virtual</span> ~IntersectionSceneQuery(); |
---|
266 | 00497 |
---|
267 | 00506 <span class="keyword">virtual</span> IntersectionSceneQueryResult& execute(<span class="keywordtype">void</span>); |
---|
268 | 00507 |
---|
269 | 00515 <span class="keyword">virtual</span> <span class="keywordtype">void</span> execute(IntersectionSceneQueryListener* listener) = 0; |
---|
270 | 00516 |
---|
271 | 00520 <span class="keyword">virtual</span> IntersectionSceneQueryResult& getLastResults(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
272 | 00527 <span class="keyword">virtual</span> <span class="keywordtype">void</span> clearResults(<span class="keywordtype">void</span>); |
---|
273 | 00528 |
---|
274 | 00530 <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* first, <a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* second); |
---|
275 | 00532 <span class="keywordtype">bool</span> queryResult(<a class="code" href="classOgre_1_1MovableObject.html">MovableObject</a>* movable, <a class="code" href="structOgre_1_1SceneQuery_1_1WorldFragment.html">SceneQuery::WorldFragment</a>* fragment); |
---|
276 | 00533 }; |
---|
277 | 00534 |
---|
278 | 00535 |
---|
279 | 00536 } |
---|
280 | 00537 |
---|
281 | 00538 |
---|
282 | 00539 |
---|
283 | 00540 <span class="preprocessor">#endif</span> |
---|
284 | </pre></div><hr> |
---|
285 | <p> |
---|
286 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
287 | <!--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/> |
---|
288 | 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/> |
---|
289 | <!--/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#"> |
---|
290 | <Work rdf:about=""> |
---|
291 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
292 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
293 | </Work> |
---|
294 | <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> --> |
---|
295 | |
---|
296 | Last modified Sun Feb 12 12:59:52 2006 |
---|
297 | </p> |
---|
298 | </body> |
---|
299 | </html> |
---|