[1] | 1 | /* |
---|
| 2 | ----------------------------------------------------------------------------- |
---|
| 3 | This source file is part of OGRE |
---|
| 4 | (Object-oriented Graphics Rendering Engine) |
---|
| 5 | For the latest info, see http://www.ogre3d.org/ |
---|
| 6 | |
---|
| 7 | Copyright (c) 2000-2006 Torus Knot Software Ltd |
---|
| 8 | Also see acknowledgements in Readme.html |
---|
| 9 | |
---|
| 10 | This program is free software; you can redistribute it and/or modify it under |
---|
| 11 | the terms of the GNU Lesser General Public License as published by the Free Software |
---|
| 12 | Foundation; either version 2 of the License, or (at your option) any later |
---|
| 13 | version. |
---|
| 14 | |
---|
| 15 | This program is distributed in the hope that it will be useful, but WITHOUT |
---|
| 16 | ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS |
---|
| 17 | FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. |
---|
| 18 | |
---|
| 19 | You should have received a copy of the GNU Lesser General Public License along with |
---|
| 20 | this program; if not, write to the Free Software Foundation, Inc., 59 Temple |
---|
| 21 | Place - Suite 330, Boston, MA 02111-1307, USA, or go to |
---|
| 22 | http://www.gnu.org/copyleft/lesser.txt. |
---|
| 23 | |
---|
| 24 | You may alternatively use this source under the terms of a specific version of |
---|
| 25 | the OGRE Unrestricted License provided you have obtained such a license from |
---|
| 26 | Torus Knot Software Ltd. |
---|
| 27 | ----------------------------------------------------------------------------- |
---|
| 28 | */ |
---|
| 29 | #ifndef __BSPSCENENODE_H__ |
---|
| 30 | #define __BSPSCENENODE_H__ |
---|
| 31 | |
---|
| 32 | #include "OgreBspPrerequisites.h" |
---|
| 33 | #include "OgreSceneNode.h" |
---|
| 34 | |
---|
| 35 | namespace Ogre { |
---|
| 36 | |
---|
| 37 | /** Specialisation of SceneNode for the BspSceneManager. |
---|
| 38 | @remarks |
---|
| 39 | This specialisation of SceneNode is to enable information about the |
---|
| 40 | leaf node in which any attached objects are held is stored for |
---|
| 41 | use in the visibility determination. |
---|
| 42 | @par |
---|
| 43 | Do not confuse this class with BspNode, which reflects nodes in the |
---|
| 44 | BSP tree itself. This class is just like a regular SceneNode, except that |
---|
| 45 | it should be locating BspNode leaf elements which objects should be included |
---|
| 46 | in. Note that because objects are movable, and thus may very well be overlapping |
---|
| 47 | the boundaries of more than one leaf, that it is possible that an object attached |
---|
| 48 | to one BspSceneNode may actually be associated with more than one BspNode. |
---|
| 49 | */ |
---|
| 50 | class BspSceneNode : public SceneNode |
---|
| 51 | { |
---|
| 52 | protected: |
---|
| 53 | /// Overridden from SceneNode |
---|
| 54 | void setInSceneGraph(bool inGraph); |
---|
| 55 | public: |
---|
| 56 | BspSceneNode(SceneManager* creator) : SceneNode(creator) {} |
---|
| 57 | BspSceneNode(SceneManager* creator, const String& name) |
---|
| 58 | : SceneNode(creator, name) {} |
---|
| 59 | /// Overridden from Node |
---|
| 60 | void _update(bool updateChildren, bool parentHasChanged); |
---|
| 61 | /** Detaches the indexed object from this scene node. |
---|
| 62 | @remarks |
---|
| 63 | Detaches by index, see the alternate version to detach by name. Object indexes |
---|
| 64 | may change as other objects are added / removed. |
---|
| 65 | */ |
---|
| 66 | MovableObject* detachObject(unsigned short index); |
---|
| 67 | |
---|
| 68 | /** Detaches the named object from this node and returns a pointer to it. */ |
---|
| 69 | MovableObject* detachObject(const String& name); |
---|
| 70 | |
---|
| 71 | /** Detaches all objects attached to this node. |
---|
| 72 | */ |
---|
| 73 | void detachAllObjects(void); |
---|
| 74 | |
---|
| 75 | |
---|
| 76 | }; |
---|
| 77 | |
---|
| 78 | } |
---|
| 79 | |
---|
| 80 | #endif |
---|