[692] | 1 | <html> |
---|
| 2 | <head> |
---|
| 3 | <title>OgreOverlay.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>OgreOverlay.h</h1><a href="OgreOverlay_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 |
---|
| 35 | 00026 <span class="preprocessor">#ifndef __Overlay_H__</span> |
---|
| 36 | 00027 <span class="preprocessor"></span><span class="preprocessor">#define __Overlay_H__</span> |
---|
| 37 | 00028 <span class="preprocessor"></span> |
---|
| 38 | 00029 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> |
---|
| 39 | 00030 <span class="preprocessor">#include "<a class="code" href="OgreSceneNode_8h.html">OgreSceneNode.h</a>"</span> |
---|
| 40 | 00031 <span class="preprocessor">#include "<a class="code" href="OgreIteratorWrappers_8h.html">OgreIteratorWrappers.h</a>"</span> |
---|
| 41 | 00032 <span class="preprocessor">#include "<a class="code" href="OgreMatrix4_8h.html">OgreMatrix4.h</a>"</span> |
---|
| 42 | 00033 |
---|
| 43 | 00034 <span class="keyword">namespace </span>Ogre { |
---|
| 44 | 00035 |
---|
| 45 | 00036 |
---|
| 46 | <a name="l00061"></a><a class="code" href="classOgre_1_1Overlay.html">00061</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a16">_OgreExport</a> Overlay |
---|
| 47 | 00062 { |
---|
| 48 | 00063 |
---|
| 49 | 00064 <span class="keyword">public</span>: |
---|
| 50 | <a name="l00065"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayw0">00065</a> <span class="keyword">typedef</span> std::list<OverlayContainer*> <a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayw0">OverlayContainerList</a>; |
---|
| 51 | 00066 <span class="keyword">protected</span>: |
---|
| 52 | <a name="l00067"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp0">00067</a> <a class="code" href="namespaceOgre.html#a471">String</a> mName; |
---|
| 53 | <a name="l00069"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp1">00069</a> <a class="code" href="classOgre_1_1SceneNode.html">SceneNode</a>* mRootNode; |
---|
| 54 | 00070 <span class="comment">// 2D elements</span> |
---|
| 55 | 00071 <span class="comment">// OverlayContainers, linked list for easy sorting by zorder later</span> |
---|
| 56 | 00072 <span class="comment">// Not a map because sort can be saved since changes infrequent (unlike render queue)</span> |
---|
| 57 | <a name="l00073"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp2">00073</a> <a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayw0">OverlayContainerList</a> m2DElements; |
---|
| 58 | 00074 |
---|
| 59 | 00075 <span class="comment">// Degrees of rotation around center</span> |
---|
| 60 | <a name="l00076"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp3">00076</a> <a class="code" href="classOgre_1_1Radian.html">Radian</a> mRotate; |
---|
| 61 | 00077 <span class="comment">// Scroll values, offsets</span> |
---|
| 62 | <a name="l00078"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp5">00078</a> <a class="code" href="namespaceOgre.html#a465">Real</a> mScrollX, mScrollY; |
---|
| 63 | 00079 <span class="comment">// Scale values</span> |
---|
| 64 | <a name="l00080"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp7">00080</a> <a class="code" href="namespaceOgre.html#a465">Real</a> mScaleX, mScaleY; |
---|
| 65 | 00081 |
---|
| 66 | <a name="l00082"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp8">00082</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a> mTransform; |
---|
| 67 | <a name="l00083"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp9">00083</a> <span class="keyword">mutable</span> <span class="keywordtype">bool</span> mTransformOutOfDate; |
---|
| 68 | <a name="l00084"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp10">00084</a> <span class="keywordtype">bool</span> mTransformUpdated; |
---|
| 69 | <a name="l00085"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp11">00085</a> <a class="code" href="namespaceOgre.html#a469">ulong</a> mZOrder; |
---|
| 70 | <a name="l00086"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp12">00086</a> <span class="keywordtype">bool</span> mVisible; |
---|
| 71 | <a name="l00087"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp13">00087</a> <span class="keywordtype">bool</span> mInitialised; |
---|
| 72 | <a name="l00088"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayp14">00088</a> <a class="code" href="namespaceOgre.html#a471">String</a> mOrigin; |
---|
| 73 | 00090 <span class="keywordtype">void</span> updateTransform(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 74 | 00092 <span class="keywordtype">void</span> initialise(<span class="keywordtype">void</span>); |
---|
| 75 | 00093 |
---|
| 76 | 00094 <span class="keyword">public</span>: |
---|
| 77 | 00096 Overlay(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
| 78 | 00097 <span class="keyword">virtual</span> ~Overlay(); |
---|
| 79 | 00098 |
---|
| 80 | 00099 |
---|
| 81 | 00100 <a class="code" href="classOgre_1_1OverlayContainer.html">OverlayContainer</a>* getChild(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& name); |
---|
| 82 | 00101 |
---|
| 83 | 00103 <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getName(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 84 | 00108 <span class="keywordtype">void</span> setZOrder(<a class="code" href="namespaceOgre.html#a467">ushort</a> zorder); |
---|
| 85 | 00110 <a class="code" href="namespaceOgre.html#a467">ushort</a> getZOrder(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 86 | 00111 |
---|
| 87 | 00113 <span class="keywordtype">bool</span> isVisible(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 88 | 00114 |
---|
| 89 | <a name="l00116"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlaya7">00116</a> <span class="keywordtype">bool</span> isInitialised(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mInitialised; } |
---|
| 90 | 00117 |
---|
| 91 | 00119 <span class="keywordtype">void</span> show(<span class="keywordtype">void</span>); |
---|
| 92 | 00120 |
---|
| 93 | 00122 <span class="keywordtype">void</span> hide(<span class="keywordtype">void</span>); |
---|
| 94 | 00123 |
---|
| 95 | 00134 <span class="keywordtype">void</span> add2D(<a class="code" href="classOgre_1_1OverlayContainer.html">OverlayContainer</a>* cont); |
---|
| 96 | 00135 |
---|
| 97 | 00136 |
---|
| 98 | 00141 <span class="keywordtype">void</span> remove2D(<a class="code" href="classOgre_1_1OverlayContainer.html">OverlayContainer</a>* cont); |
---|
| 99 | 00142 |
---|
| 100 | 00175 <span class="keywordtype">void</span> add3D(<a class="code" href="classOgre_1_1SceneNode.html">SceneNode</a>* node); |
---|
| 101 | 00176 |
---|
| 102 | 00178 <span class="keywordtype">void</span> remove3D(<a class="code" href="classOgre_1_1SceneNode.html">SceneNode</a>* node); |
---|
| 103 | 00179 |
---|
| 104 | 00181 <span class="keywordtype">void</span> clear(); |
---|
| 105 | 00182 |
---|
| 106 | 00192 <span class="keywordtype">void</span> setScroll(<a class="code" href="namespaceOgre.html#a465">Real</a> x, <a class="code" href="namespaceOgre.html#a465">Real</a> y); |
---|
| 107 | 00193 |
---|
| 108 | 00195 <a class="code" href="namespaceOgre.html#a465">Real</a> getScrollX(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 109 | 00196 |
---|
| 110 | 00198 <a class="code" href="namespaceOgre.html#a465">Real</a> getScrollY(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 111 | 00199 |
---|
| 112 | 00206 <span class="keywordtype">void</span> scroll(<a class="code" href="namespaceOgre.html#a465">Real</a> xoff, <a class="code" href="namespaceOgre.html#a465">Real</a> yoff); |
---|
| 113 | 00207 |
---|
| 114 | 00209 <span class="keywordtype">void</span> setRotate(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& angle); |
---|
| 115 | 00210 <span class="preprocessor">#ifndef OGRE_FORCE_ANGLE_TYPES</span> |
---|
| 116 | 00211 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> setRotate(<a class="code" href="namespaceOgre.html#a465">Real</a> degrees) { |
---|
| 117 | 00212 setRotate ( <a class="code" href="classOgre_1_1Angle.html">Angle</a>(degrees) ); |
---|
| 118 | 00213 } |
---|
| 119 | 00214 <span class="preprocessor">#endif//OGRE_FORCE_ANGLE_TYPES</span> |
---|
| 120 | 00215 <span class="preprocessor"></span> |
---|
| 121 | <a name="l00217"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlaya20">00217</a> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a> &getRotate(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mRotate; } |
---|
| 122 | 00218 |
---|
| 123 | 00220 <span class="keywordtype">void</span> rotate(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Radian.html">Radian</a>& angle); |
---|
| 124 | 00221 <span class="preprocessor">#ifndef OGRE_FORCE_ANGLE_TYPES</span> |
---|
| 125 | 00222 <span class="preprocessor"></span> <span class="keyword">inline</span> <span class="keywordtype">void</span> rotate(<a class="code" href="namespaceOgre.html#a465">Real</a> degrees) { |
---|
| 126 | 00223 rotate ( <a class="code" href="classOgre_1_1Angle.html">Angle</a>(degrees) ); |
---|
| 127 | 00224 } |
---|
| 128 | 00225 <span class="preprocessor">#endif//OGRE_FORCE_ANGLE_TYPES</span> |
---|
| 129 | 00226 <span class="preprocessor"></span> |
---|
| 130 | 00234 <span class="keywordtype">void</span> setScale(Real x, Real y); |
---|
| 131 | 00235 |
---|
| 132 | 00237 Real getScaleX(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 133 | 00238 |
---|
| 134 | 00240 Real getScaleY(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 135 | 00241 |
---|
| 136 | 00243 <span class="keywordtype">void</span> _getWorldTransforms(Matrix4* xform) <span class="keyword">const</span>; |
---|
| 137 | 00245 <span class="keyword">const</span> Quaternion& getWorldOrientation(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 138 | 00247 <span class="keyword">const</span> Vector3& getWorldPosition(<span class="keywordtype">void</span>) <span class="keyword">const</span>; |
---|
| 139 | 00248 |
---|
| 140 | 00250 <span class="keywordtype">void</span> _findVisibleObjects(Camera* cam, RenderQueue* queue); |
---|
| 141 | 00251 |
---|
| 142 | 00253 <span class="keyword">virtual</span> OverlayElement* findElementAt(Real x, Real y); |
---|
| 143 | 00254 |
---|
| 144 | <a name="l00259"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlayw1">00259</a> <span class="keyword">typedef</span> <a class="code" href="classOgre_1_1VectorIterator.html">VectorIterator<OverlayContainerList></a> <a class="code" href="classOgre_1_1VectorIterator.html">Overlay2DElementsIterator</a> ; |
---|
| 145 | <a name="l00260"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlaya30">00260</a> <a class="code" href="classOgre_1_1VectorIterator.html">Overlay2DElementsIterator</a> get2DElementsIterator () |
---|
| 146 | 00261 { |
---|
| 147 | 00262 <span class="keywordflow">return</span> <a class="code" href="classOgre_1_1VectorIterator.html">Overlay2DElementsIterator</a> (m2DElements.begin(), m2DElements.end()); |
---|
| 148 | 00263 } |
---|
| 149 | <a name="l00270"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlaya31">00270</a> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& getOrigin(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mOrigin; } |
---|
| 150 | <a name="l00272"></a><a class="code" href="classOgre_1_1Overlay.html#Ogre_1_1Overlaya32">00272</a> <span class="keywordtype">void</span> _notifyOrigin(<span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a471">String</a>& origin) { mOrigin = origin; } |
---|
| 151 | 00273 |
---|
| 152 | 00274 |
---|
| 153 | 00275 }; |
---|
| 154 | 00276 |
---|
| 155 | 00277 } |
---|
| 156 | 00278 |
---|
| 157 | 00279 |
---|
| 158 | 00280 <span class="preprocessor">#endif</span> |
---|
| 159 | 00281 <span class="preprocessor"></span> |
---|
| 160 | </pre></div><hr> |
---|
| 161 | <p> |
---|
| 162 | Copyright © 2000-2005 by The OGRE Team<br /> |
---|
| 163 | <!--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/> |
---|
| 164 | 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/> |
---|
| 165 | <!--/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#"> |
---|
| 166 | <Work rdf:about=""> |
---|
| 167 | <license rdf:resource="http://creativecommons.org/licenses/by-sa/2.5/" /> |
---|
| 168 | <dc:type rdf:resource="http://purl.org/dc/dcmitype/Text" /> |
---|
| 169 | </Work> |
---|
| 170 | <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> --> |
---|
| 171 | |
---|
| 172 | Last modified Sun Mar 12 14:37:45 2006 |
---|
| 173 | </p> |
---|
| 174 | </body> |
---|
| 175 | </html> |
---|