OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
scene_observer.hh
Go to the documentation of this file.
1 //------------------------------------------------------------------------------
2 // This file is part of the OpenStructure project <www.openstructure.org>
3 //
4 // Copyright (C) 2008-2020 by the OpenStructure authors
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License as published by the Free
8 // Software Foundation; either version 3.0 of the License, or (at your option)
9 // any later version.
10 // This library is distributed in the hope that it will be useful, but WITHOUT
11 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 // FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
13 // details.
14 //
15 // You should have received a copy of the GNU Lesser General Public License
16 // along with this library; if not, write to the Free Software Foundation, Inc.,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18 //------------------------------------------------------------------------------
19 #ifndef OST_GFX_SCENE_OBSERVER_HH
20 #define OST_GFX_SCENE_OBSERVER_HH
21 
22 /*
23  Author: Ansgar Philippsen, Marco Biasini
24 */
25 
26 #include <boost/shared_ptr.hpp>
27 
28 #include <ost/mol/view_type_fw.hh>
29 
30 #include "gfx_node_fw.hh"
31 #include "gfx_object_fw.hh"
32 
33 namespace ost { namespace gfx {
34 
42 public:
43  virtual ~SceneObserver() {}
44 
46  virtual void NodeAdded(const GfxNodeP& node) {}
47 
49  virtual void NodeRemoved(const GfxNodeP& node) {}
50 
52  virtual void NodeChanged(const GfxNodeP& node) {}
53 
55  virtual void SelectionModeChanged(int sel_mode) {}
56 
58  virtual void SelectionChanged(const GfxObjP& obj,
59  const mol::EntityView& sel) {}
60 
62  virtual void NodeTransformed(const GfxNodeP& node) {}
63 
65  virtual void RenderModeChanged(const GfxNodeP& node) {}
66 };
67 
68 }}
69 
70 #endif
virtual void NodeAdded(const GfxNodeP &node)
Called when a new node has been added to the scene.
virtual void SelectionChanged(const GfxObjP &obj, const mol::EntityView &sel)
Called when selection of an object changed.
boost::shared_ptr< GfxObj > GfxObjP
virtual void SelectionModeChanged(int sel_mode)
Called when the selection mode changed.
Interface for observing graphical objects.
virtual void NodeRemoved(const GfxNodeP &node)
Called when an object is removed from the scene.
virtual void NodeChanged(const GfxNodeP &node)
Called when an object is updated.
virtual void RenderModeChanged(const GfxNodeP &node)
Called when the render mode of a node changed.
virtual void NodeTransformed(const GfxNodeP &node)
Called when a nodes transform changes.
definition of EntityView
Definition: entity_view.hh:86
boost::shared_ptr< GfxNode > GfxNodeP
Definition: gfx_node_fw.hh:31