source: OGRE/trunk/ogrenew/PlugIns/BSPSceneManager/include/OgreBspSceneNode.h @ 692

Revision 692, 3.0 KB checked in by mattausch, 19 years ago (diff)

adding ogre 1.2 and dependencies

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