Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
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
50namespace OGF {
51
52 /****************************************************************/
53
58 public:
59
65 ToolsManager* parent
66 ) :
67 MeshGrobTool(parent),
68 v1_(NO_VERTEX),
69 v2_(NO_VERTEX) {
70 }
71
75 void grab(const RayPick& p_ndc) override;
76
80 void reset() override;
81 private:
82 index_t v1_;
83 index_t v2_;
84 };
85
86 /****************************************************************/
87
92 public:
93
99 ToolsManager* parent
100 ) : MeshGrobTool(parent) {
101 }
102
106 void grab(const RayPick& p_ndc) override;
107 };
108
109 /****************************************************************/
110
115 gom_attribute(icon, "create_edge")
116 gom_attribute(help, "create edge / delete edge")
117 gom_attribute(message,
118 "btn1: create edge (select vertices); btn3: delete edge (select edge)"
119 )
120 gom_class MESH_GFX_API MeshGrobEditEdge : public MultiTool {
121 public:
127 set_tool(MOUSE_BUTTON_LEFT, new MeshGrobCreateEdge(parent));
128 set_tool(MOUSE_BUTTON_RIGHT, new MeshGrobDeleteEdge(parent));
129 }
130 };
131
132
133 /****************************************************************/
134}
135
136#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.
A tool that creates an edge between two vertices.
MeshGrobDeleteEdge(ToolsManager *parent)
MeshGrobsCreateEdge constructor.
void grab(const RayPick &p_ndc) override
A tool that create/deletes edges.
MeshGrobEditEdge(ToolsManager *parent)
MeshGrobEditEdge constructor.
Base class for tools that operate on MeshGrob.
A Tool that can associate a different tool to each button of the mouse.
Definition tool.h:199
Manages the Tool objects associated with a given Grob class.
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