Graphite  Version 3
An experimental 3D geometry processing program
mesh_grob_edge_tools.h
Go to the documentation of this file.
1 
2 /*
3  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
4  * Copyright (C) 2000-2009 INRIA - Project ALICE
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19  *
20  * If you modify this software, you should include a notice giving the
21  * name of the person performing the modification, the date of modification,
22  * and the reason for such modification.
23  *
24  * Contact: Bruno Levy - levy@loria.fr
25  *
26  * Project ALICE
27  * LORIA, INRIA Lorraine,
28  * Campus Scientifique, BP 239
29  * 54506 VANDOEUVRE LES NANCY CEDEX
30  * FRANCE
31  *
32  * Note that the GNU General Public License does not permit incorporating
33  * the Software into proprietary programs.
34  *
35  * As an exception to the GPL, Graphite can be linked
36  * with the following (non-GPL) libraries: Qt, SuperLU, WildMagic and CGAL
37  */
38 
39 #ifndef H_OGF_MESH_GFX_TOOLS_MESH_GROB_EDGE_TOOLS_H
40 #define H_OGF_MESH_GFX_TOOLS_MESH_GROB_EDGE_TOOLS_H
41 
42 #include <OGF/mesh_gfx/common/common.h>
44 
50 namespace OGF {
51 
52  /****************************************************************/
53 
57  gom_attribute(icon, "create_edge")
58  gom_attribute(help, "create edge")
59  gom_class MESH_GFX_API MeshGrobCreateEdge : public MeshGrobTool {
60  public:
61 
67  ToolsManager* parent
68  ) :
69  MeshGrobTool(parent),
70  v1_(NO_VERTEX),
71  v2_(NO_VERTEX) {
72  }
73 
77  void grab(const RayPick& p_ndc) override;
78 
82  void reset() override;
83  private:
84  index_t v1_;
85  index_t v2_;
86  };
87 }
88 
89 #endif
A tool that creates an edge between two vertices.
void grab(const RayPick &p_ndc) override
void reset() override
Resets this Tool.
MeshGrobCreateEdge(ToolsManager *parent)
MeshGrobsCreateEdge constructor.
Base class for tools that operate on MeshGrob.
Manages the Tool objects associated with a given Grob class.
Definition: tools_manager.h:62
Base classes for tools that operate on MeshGrob.
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76
Represents the information related with a picking event.
Definition: ray_picker.h:64