Remove Sandbox::ContourLabel
[SARndbox.git] / GlobalWaterTool.h
blobb6d426d1d6aa66c451a98088b76e02554d9efaae
1 /***********************************************************************
2 GlobalWaterTool - Tool class to globally add or remove water from an
3 augmented reality sandbox.
4 Copyright (c) 2012-2018 Oliver Kreylos
6 This file is part of the Augmented Reality Sandbox (SARndbox).
8 The Augmented Reality Sandbox is free software; you can redistribute it
9 and/or modify it under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of the
11 License, or (at your option) any later version.
13 The Augmented Reality Sandbox is distributed in the hope that it will be
14 useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License along
19 with the Augmented Reality Sandbox; if not, write to the Free Software
20 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 ***********************************************************************/
23 #ifndef GLOBALWATERTOOL_INCLUDED
24 #define GLOBALWATERTOOL_INCLUDED
26 #include <Vrui/Tool.h>
27 #include <Vrui/GenericToolFactory.h>
28 #include <Vrui/Application.h>
30 /* Forward declarations: */
31 class Sandbox;
32 class GlobalWaterTool;
33 typedef Vrui::GenericToolFactory<GlobalWaterTool> GlobalWaterToolFactory;
35 class GlobalWaterTool: public Vrui::Tool, public Vrui::Application::Tool<Sandbox> {
36 friend class Vrui::GenericToolFactory<GlobalWaterTool>;
38 /* Elements: */
39 private:
40 static GlobalWaterToolFactory* factory; // Pointer to the factory object for this class
41 float waterAmounts[2]; // Water amount added to the global water renderer when either tool button was pressed
43 /* Constructors and destructors: */
44 public:
45 static GlobalWaterToolFactory* initClass(Vrui::ToolManager& toolManager);
46 GlobalWaterTool(const Vrui::ToolFactory* factory,
47 const Vrui::ToolInputAssignment& inputAssignment);
48 virtual ~GlobalWaterTool(void);
50 /* Methods from class Vrui::Tool: */
51 virtual const Vrui::ToolFactory* getFactory(void) const;
52 virtual void buttonCallback(int buttonSlotIndex, Vrui::InputDevice::ButtonCallbackData* cbData);
55 #endif