<html> <head> <title>OgreMovableObject.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 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> <h1>OgreMovableObject.h</h1><a href="OgreMovableObject_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 00026 <span class="preprocessor">#ifndef __MovableObject_H__</span> 00027 <span class="preprocessor"></span><span class="preprocessor">#define __MovableObject_H__</span> 00028 <span class="preprocessor"></span> 00029 <span class="comment">// Precompiler options</span> 00030 <span class="preprocessor">#include "<a class="code" href="OgrePrerequisites_8h.html">OgrePrerequisites.h</a>"</span> 00031 <span class="preprocessor">#include "<a class="code" href="OgreRenderQueue_8h.html">OgreRenderQueue.h</a>"</span> 00032 <span class="preprocessor">#include "<a class="code" href="OgreAxisAlignedBox_8h.html">OgreAxisAlignedBox.h</a>"</span> 00033 <span class="preprocessor">#include "<a class="code" href="OgreSphere_8h.html">OgreSphere.h</a>"</span> 00034 <span class="preprocessor">#include "<a class="code" href="OgreShadowCaster_8h.html">OgreShadowCaster.h</a>"</span> 00035 00036 <span class="keyword">namespace </span>Ogre { 00037 00038 <a name="l00044"></a><a class="code" href="classOgre_1_1MovableObject.html">00044</a> <span class="keyword">class </span><a class="code" href="OgrePlatform_8h.html#a13">_OgreExport</a> MovableObject : <span class="keyword">public</span> <a class="code" href="classOgre_1_1ShadowCaster.html">ShadowCaster</a> 00045 { 00046 <span class="keyword">protected</span>: <a name="l00048"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp9">00048</a> <a class="code" href="classOgre_1_1Node.html">Node</a>* mParentNode; <a name="l00049"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp10">00049</a> <span class="keywordtype">bool</span> mParentIsTagPoint; <a name="l00051"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp11">00051</a> <span class="keywordtype">bool</span> mVisible; <a name="l00053"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp12">00053</a> <a class="code" href="classOgre_1_1UserDefinedObject.html">UserDefinedObject</a> *mUserObject; <a name="l00055"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp13">00055</a> <a class="code" href="namespaceOgre.html#a668">RenderQueueGroupID</a> mRenderQueueID; <a name="l00057"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp14">00057</a> <span class="keywordtype">bool</span> mRenderQueueIDSet; <a name="l00059"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp15">00059</a> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> mQueryFlags; <a name="l00061"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp16">00061</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> mWorldAABB; 00062 <span class="comment">// Cached world bounding sphere</span> <a name="l00063"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp17">00063</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a> mWorldBoundingSphere; <a name="l00065"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp18">00065</a> <span class="keyword">mutable</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a> mWorldDarkCapBounds; <a name="l00067"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxp19">00067</a> <span class="keywordtype">bool</span> mCastShadows; 00068 00069 00070 <span class="keyword">public</span>: 00072 MovableObject(); 00073 00076 <span class="keyword">virtual</span> ~MovableObject(); 00077 00079 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getName(<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0; 00080 00082 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="namespaceOgre.html#a426">String</a>& getMovableType(<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0; 00083 00090 <span class="keyword">virtual</span> <a class="code" href="classOgre_1_1Node.html">Node</a>* getParentNode(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00091 00099 <span class="keyword">virtual</span> <a class="code" href="classOgre_1_1SceneNode.html">SceneNode</a>* getParentSceneNode(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00100 00103 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _notifyAttached(<a class="code" href="classOgre_1_1Node.html">Node</a>* parent, <span class="keywordtype">bool</span> isTagPoint = <span class="keyword">false</span>); 00104 00106 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isAttached(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00107 00111 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isInScene(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00112 00118 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _notifyCurrentCamera(<a class="code" href="classOgre_1_1Camera.html">Camera</a>* cam) = 0; 00119 00124 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& getBoundingBox(<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0; 00125 00129 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a420">Real</a> getBoundingRadius(<span class="keywordtype">void</span>) <span class="keyword">const</span> = 0; 00130 00132 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& getWorldBoundingBox(<span class="keywordtype">bool</span> derive = <span class="keyword">false</span>) <span class="keyword">const</span>; 00134 <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classOgre_1_1Sphere.html">Sphere</a>& getWorldBoundingSphere(<span class="keywordtype">bool</span> derive = <span class="keyword">false</span>) <span class="keyword">const</span>; 00140 <span class="keyword">virtual</span> <span class="keywordtype">void</span> _updateRenderQueue(<a class="code" href="classOgre_1_1RenderQueue.html">RenderQueue</a>* queue) = 0; 00141 00143 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setVisible(<span class="keywordtype">bool</span> visible); 00144 00146 <span class="keyword">virtual</span> <span class="keywordtype">bool</span> isVisible(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00147 <a name="l00154"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa26">00154</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> setUserObject(<a class="code" href="classOgre_1_1UserDefinedObject.html">UserDefinedObject</a>* obj) { mUserObject = obj; } <a name="l00158"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa27">00158</a> <span class="keyword">virtual</span> <a class="code" href="classOgre_1_1UserDefinedObject.html">UserDefinedObject</a>* getUserObject(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> mUserObject; } 00159 00171 <span class="keyword">virtual</span> <span class="keywordtype">void</span> setRenderQueueGroup(RenderQueueGroupID queueID); 00172 00174 <span class="keyword">virtual</span> <a class="code" href="namespaceOgre.html#a668">RenderQueueGroupID</a> getRenderQueueGroup(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00175 00177 <span class="keyword">virtual</span> <a class="code" href="classOgre_1_1Matrix4.html">Matrix4</a> _getParentNodeFullTransform(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00178 <a name="l00186"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa31">00186</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> setQueryFlags(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags) { mQueryFlags = flags; } 00187 <a name="l00190"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa32">00190</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> addQueryFlags(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags) { mQueryFlags |= flags; } 00191 <a name="l00194"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa33">00194</a> <span class="keyword">virtual</span> <span class="keywordtype">void</span> removeQueryFlags(<span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags) { mQueryFlags ^= flags; } 00195 <a name="l00197"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa34">00197</a> <span class="keyword">virtual</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> getQueryFlags(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mQueryFlags; } 00198 <a name="l00200"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa35">00200</a> <a class="code" href="classOgre_1_1EdgeData.html">EdgeData</a>* getEdgeList(<span class="keywordtype">void</span>) { <span class="keywordflow">return</span> NULL; } 00202 ShadowRenderableListIterator getShadowVolumeRenderableIterator( 00203 ShadowTechnique shadowTechnique, <span class="keyword">const</span> <a class="code" href="classOgre_1_1Light.html">Light</a>* light, 00204 <a class="code" href="classOgre_1_1HardwareIndexBufferSharedPtr.html">HardwareIndexBufferSharedPtr</a>* indexBuffer, 00205 <span class="keywordtype">bool</span> extrudeVertices, <a class="code" href="namespaceOgre.html#a420">Real</a> extrusionDist, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags = 0); 00206 00208 <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& getLightCapBounds(<span class="keywordtype">void</span>) <span class="keyword">const</span>; 00210 <span class="keyword">const</span> <a class="code" href="classOgre_1_1AxisAlignedBox.html">AxisAlignedBox</a>& getDarkCapBounds(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Light.html">Light</a>& light, <a class="code" href="namespaceOgre.html#a420">Real</a> dirLightExtrusionDist) <span class="keyword">const</span>; <a name="l00223"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa39">00223</a> <span class="keywordtype">void</span> setCastShadows(<span class="keywordtype">bool</span> enabled) { mCastShadows = enabled; } <a name="l00225"></a><a class="code" href="classOgre_1_1MovableObject.html#Ogre_1_1WireBoundingBoxa40">00225</a> <span class="keywordtype">bool</span> getCastShadows(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> mCastShadows; } 00227 <a class="code" href="namespaceOgre.html#a420">Real</a> getPointExtrusionDistance(<span class="keyword">const</span> <a class="code" href="classOgre_1_1Light.html">Light</a>* l) <span class="keyword">const</span>; 00228 00229 00230 00231 00232 00233 }; 00234 00235 } 00236 <span class="preprocessor">#endif</span> </pre></div><p> Copyright © 2000-2005 by The OGRE Team<br /> Last modified Wed Feb 23 00:19:09 2005 </p> </body> </html>