Graphite  Version 3
An experimental 3D geometry processing program
grob_light.h
1 /*
2  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000 Bruno Levy
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
24  *
25  * levy@loria.fr
26  *
27  * ISA Project
28  * LORIA, INRIA Lorraine,
29  * Campus Scientifique, BP 239
30  * 54506 VANDOEUVRE LES NANCY CEDEX
31  * FRANCE
32  *
33  * Note that the GNU General Public License does not permit incorporating
34  * the Software into proprietary programs.
35  */
36 
37 #ifndef H_OGF_SCENE_GRAPH_GFX_TOOLS_GROB_LIGHT_H
38 #define H_OGF_SCENE_GRAPH_GFX_TOOLS_GROB_LIGHT_H
39 
40 #include <OGF/scene_graph_gfx/common/common.h>
43 
49 namespace OGF {
50 
54  gom_attribute(category,"viewer")
55  gom_attribute(icon,"light")
56  gom_attribute(help, "Edit light direction")
57  gom_attribute(message, "btn1: edit light direction")
58  gom_class SCENE_GRAPH_GFX_API GrobLight : public Tool {
59  public:
64  GrobLight(ToolsManager* parent) : Tool(parent) {
65  arc_ball_ = new ArcBall();
66  }
67 
71  void grab(const RayPick& value) override;
72 
76  void drag(const RayPick& value) override;
77 
81  void release(const RayPick& value) override;
82 
83  private:
84  ArcBall_var arc_ball_;
85  };
86 
87 }
88 
89 #endif
Enables to interactively define a rotation.
Definition: arc_ball.h:67
The camera panning tool.
Definition: grob_light.h:58
void release(const RayPick &value) override
The event handler for mouse release events.
void grab(const RayPick &value) override
void drag(const RayPick &value) override
The event handler for mouse drag events.
GrobLight(ToolsManager *parent)
GrobLight constructor.
Definition: grob_light.h:64
Base class for the tools.
Definition: tool.h:61
Manages the Tool objects associated with a given Grob class.
Definition: tools_manager.h:62
Global Graphite namespace.
Definition: common.h:76
Controls a 3d rotation from user mouse input.
Represents the information related with a picking event.
Definition: ray_picker.h:64
Base classes for the tools.