Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
scene_graph_selection.h
1/*
2 * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3 * Copyright (C) 2000-2009 INRIA - Project ALICE
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 *
19 * If you modify this software, you should include a notice giving the
20 * name of the person performing the modification, the date of modification,
21 * and the reason for such modification.
22 *
23 * Contact: Bruno Levy - levy@loria.fr
24 *
25 * Project ALICE
26 * LORIA, INRIA Lorraine,
27 * Campus Scientifique, BP 239
28 * 54506 VANDOEUVRE LES NANCY CEDEX
29 * FRANCE
30 *
31 * Note that the GNU General Public License does not permit incorporating
32 * the Software into proprietary programs.
33 *
34 * As an exception to the GPL, Graphite can be linked with the following
35 * (non-GPL) libraries:
36 * Qt, SuperLU, WildMagic and CGAL
37 */
38
39#ifndef H_OGF_SCENE_GRAPH_INTERFACES_SCENE_GRAPH_SELECTION_H
40#define H_OGF_SCENE_GRAPH_INTERFACES_SCENE_GRAPH_SELECTION_H
41
43#include <OGF/scene_graph/interfaces/scene_graph_interface.h>
44
45namespace OGF {
46
53 gom_class SCENE_GRAPH_API SceneGraphSelectionInterface
54 : public SceneGraphInterface {
55 public:
56
61
66
72 return dynamic_cast<SceneGraph*>(grob());
73 }
74
75 gom_slots:
80 void select_object(const GrobName& grob);
81
86 void unselect_object(const GrobName& grob);
87
92 void toggle_selection(const GrobName& grob);
93
97 void select_all();
98
103
108 void extend_selection(const GrobName& grob);
109
114 };
115
116}
117
118#endif
All SceneGraph modifications go through a SceneGraphInterface.
All SceneGraph modifications related with selection go through this Interface.
void toggle_selection(const GrobName &grob)
Toggles the selection flag for an object.
void extend_selection(const GrobName &grob)
Extends selection.
void select_all()
Adds all objects to selection.
SceneGraph * scene_graph() const
Gets the wrapped MeshGrob.
~SceneGraphSelectionInterface() override
SceneGraphEditor destrutor.
index_t nb_selected() const
Gets the number of selected objects.
SceneGraphSelectionInterface()
SceneGraphSelectionInterface constructor.
void clear_selection()
Removes all objects from selection.
void unselect_object(const GrobName &grob)
Removes an object from the selection.
Represents the list of objects loaded in Graphite.
Definition scene_graph.h:62
geo_index_t index_t
The type for storing and manipulating indices.
Definition numeric.h:330
Global Graphite namespace.
Definition common.h:76
Definitions common to all include files in the scene_graph library.