/src/ogre/PlugIns/BSPSceneManager/include/OgreBspSceneNode.h
Line | Count | Source (jump to first uncovered line) |
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-2014 Torus Knot Software Ltd |
8 | | |
9 | | Permission is hereby granted, free of charge, to any person obtaining a copy |
10 | | of this software and associated documentation files (the "Software"), to deal |
11 | | in the Software without restriction, including without limitation the rights |
12 | | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
13 | | copies of the Software, and to permit persons to whom the Software is |
14 | | furnished to do so, subject to the following conditions: |
15 | | |
16 | | The above copyright notice and this permission notice shall be included in |
17 | | all copies or substantial portions of the Software. |
18 | | |
19 | | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
20 | | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
21 | | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
22 | | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
23 | | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
24 | | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
25 | | THE SOFTWARE. |
26 | | ----------------------------------------------------------------------------- |
27 | | */ |
28 | | #ifndef __BSPSCENENODE_H__ |
29 | | #define __BSPSCENENODE_H__ |
30 | | |
31 | | #include "OgreBspPrerequisites.h" |
32 | | #include "OgreSceneNode.h" |
33 | | |
34 | | namespace Ogre { |
35 | | /** \addtogroup Plugins |
36 | | * @{ |
37 | | */ |
38 | | /** \addtogroup BSPSceneManager |
39 | | * @{ |
40 | | */ |
41 | | /** Specialisation of SceneNode for the BspSceneManager. |
42 | | |
43 | | This specialisation of SceneNode is to enable information about the |
44 | | leaf node in which any attached objects are held is stored for |
45 | | use in the visibility determination. |
46 | | @par |
47 | | Do not confuse this class with BspNode, which reflects nodes in the |
48 | | BSP tree itself. This class is just like a regular SceneNode, except that |
49 | | it should be locating BspNode leaf elements which objects should be included |
50 | | in. Note that because objects are movable, and thus may very well be overlapping |
51 | | the boundaries of more than one leaf, that it is possible that an object attached |
52 | | to one BspSceneNode may actually be associated with more than one BspNode. |
53 | | */ |
54 | | class BspSceneNode : public SceneNode |
55 | | { |
56 | | protected: |
57 | | void setInSceneGraph(bool inGraph) override; |
58 | | public: |
59 | 0 | BspSceneNode(SceneManager* creator) : SceneNode(creator) {} |
60 | | BspSceneNode(SceneManager* creator, const String& name) |
61 | 0 | : SceneNode(creator, name) {} |
62 | | /// Overridden from Node |
63 | | void _update(bool updateChildren, bool parentHasChanged) override; |
64 | | /** Detaches the indexed object from this scene node. |
65 | | |
66 | | Detaches by index, see the alternate version to detach by name. Object indexes |
67 | | may change as other objects are added / removed. |
68 | | */ |
69 | | MovableObject* detachObject(unsigned short index) override; |
70 | | |
71 | | /** Detaches the named object from this node and returns a pointer to it. */ |
72 | | MovableObject* detachObject(const String& name) override; |
73 | | |
74 | | /** Detaches all objects attached to this node. |
75 | | */ |
76 | | void detachAllObjects(void) override; |
77 | | |
78 | | |
79 | | }; |
80 | | /** @} */ |
81 | | /** @} */ |
82 | | } |
83 | | |
84 | | #endif |