OpenWalnut  1.5.0dev
WFiberActionMultideselect.h
1 //---------------------------------------------------------------------------
2 //
3 // Project: OpenWalnut ( http://www.openwalnut.org )
4 //
5 // Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6 // For more information see http://www.openwalnut.org/copying
7 //
8 // This file is part of OpenWalnut.
9 //
10 // OpenWalnut is free software: you can redistribute it and/or modify
11 // it under the terms of the GNU Lesser General Public License as published by
12 // the Free Software Foundation, either version 3 of the License, or
13 // (at your option) any later version.
14 //
15 // OpenWalnut is distributed in the hope that it will be useful,
16 // but WITHOUT ANY WARRANTY; without even the implied warranty of
17 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 // GNU Lesser General Public License for more details.
19 //
20 // You should have received a copy of the GNU Lesser General Public License
21 // along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
22 //
23 //---------------------------------------------------------------------------
24 
25 #ifndef WFIBERACTIONMULTIDESELECT_H
26 #define WFIBERACTIONMULTIDESELECT_H
27 
28 #include <vector>
29 
30 #include <boost/shared_ptr.hpp>
31 #include <osg/Geode>
32 
33 #include "WFiberAction.h"
34 #include "../WFiberHandler.h"
35 
36 
37 /**
38  * The action when adding multiple Vertices.
39  */
41 {
42 public:
43  /**
44  * A shared_ptr to this class.
45  */
46  typedef std::shared_ptr< WFiberActionMultideselect > SPtr;
47 
48  /**
49  * Creates this action.
50  * \param vertices A vector of vertices to add.
51  * \param fiberIdx The index of the fiber this vertex was added to.
52  * \param fiberHandler The WFiberHandler of the action.
53  */
54  WFiberActionMultideselect( std::vector< osg::Vec3 > vertices, size_t fiberIdx, WFiberHandler* fiberHandler );
55 
56  /**
57  * Empty destructor.
58  */
60 
61  /**
62  * Undos this action.
63  */
64  virtual void undo();
65 
66  /**
67  * Redos this action.
68  */
69  virtual void redo();
70 
71 private:
72  /**
73  * The vertices to add.
74  */
75  std::vector< osg::Vec3 > m_vertices;
76 
77  /**
78  * The index of the fiber this vertex was added to.
79  */
80  size_t m_fiberIdx;
81 
82  /**
83  * The WFiberHandler of the action.
84  */
86 };
87 
88 #endif // WFIBERACTIONMULTIDESELECT_H
The action when adding multiple Vertices.
size_t m_fiberIdx
The index of the fiber this vertex was added to.
virtual void undo()
Undos this action.
~WFiberActionMultideselect()
Empty destructor.
std::vector< osg::Vec3 > m_vertices
The vertices to add.
WFiberHandler * m_fiberHandler
The WFiberHandler of the action.
WFiberActionMultideselect(std::vector< osg::Vec3 > vertices, size_t fiberIdx, WFiberHandler *fiberHandler)
Creates this action.
virtual void redo()
Redos this action.
std::shared_ptr< WFiberActionMultideselect > SPtr
A shared_ptr to this class.
Super class for the actions.
Definition: WFiberAction.h:36
Handles the fibers of the WMPointsConnector.
Definition: WFiberHandler.h:48