Graphite Version 3
An experimental 3D geometry processing program
Loading...
Searching...
No Matches
camera.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_SKIN_IMGUI_CAMERA_H
38#define H_SKIN_IMGUI_CAMERA_H
39
41#include <OGF/skin_imgui/widgets/render_area.h>
43#include <OGF/gom/types/node.h>
44#include <geogram/image/color.h>
45
46namespace OGF {
47
48 class SceneGraphShaderManager;
49 class Application;
50 class FullScreenEffect;
51
57 active(false),
58 axis('z'),
59 mode(GLUP_CLIP_STRADDLING_CELLS),
60 shift(0),
61 rotation{{1,0,0,0},{0,1,0,0},{0,0,1,0},{0,0,0,1}},
62 invert(false) {
63 }
64 bool active;
65 char axis;
66 GLUPclipMode mode;
67 int shift;
68 mat4 rotation;
69 bool invert;
70 };
71
72
82 gom_class SKIN_IMGUI_API Camera : public Object {
83 public:
89
93 ~Camera() override;
94
95 gom_properties:
103 void set_auto_focus(bool value);
104
112 bool get_auto_focus() const;
113
119 void set_draw_selected_only(bool value);
120
127
128
133 void set_bkg_color_1(const Color& value);
134
139 const Color& get_bkg_color_1() const;
140
147 void set_bkg_color_2(const Color& value);
148
154 const Color& get_bkg_color_2() const;
155
160 void set_effect(const FullScreenEffectName& effect);
161
167
172 gom_attribute(aggregate_properties,"true")
173 FullScreenEffect* get_effect_properties() const;
174
179 void set_clipping(const ClippingConfig& value) {
180 clipping_config_ = value;
181 update_clipping_config();
182 }
183
189 return clipping_config_;
190 }
191
196 gom_attribute(visible,"false")
197 mat4 get_lighting_matrix() const;
198
203 void set_lighting_matrix(const mat4& value);
204
205 gom_slots:
206
211 SceneGraphShaderManager* scene_graph_shader_manager() const;
212
213 public:
217 bool set_property(
218 const std::string& name, const Any& value
219 ) override;
220
221 protected:
222 void update_clipping_config();
223
224 private:
225 Application* application_;
226 ClippingConfig clipping_config_;
227 };
228
230}
231
232#endif
A smart pointer with reference-counted copy semantics.
A class that stores a variable of arbitrary type.
Definition any.h:62
Implementation of Skin application using ImGui.
Definition application.h:56
Application attributes and methods related with camera management.
Definition camera.h:82
const Color & get_bkg_color_2() const
Gets the secondary background color.
void set_effect(const FullScreenEffectName &effect)
Sets the full screen effect.
const ClippingConfig & get_clipping() const
Gets the current clipping configuration.
Definition camera.h:188
bool get_auto_focus() const
Tests whether autofocus is active.
~Camera() override
Camera destructor.
const FullScreenEffectName & get_effect() const
Gets the full screen effect.
Camera(Application *app)
Camera constructor.
const Color & get_bkg_color_1() const
Gets the background color.
void set_draw_selected_only(bool value)
Sets whether only the selected object should be drawn.
void set_bkg_color_1(const Color &value)
Sets the primary background color.
bool get_draw_selected_only() const
Tests whether only the selected object should be drawn.
void set_bkg_color_2(const Color &value)
Sets the secondary background color.
A Full screen effect.
Base class for all objects in the GOM system.
Definition object.h:65
Manages the shaders and full screen effects for the entire SceneGraph.
Color types.
Global Graphite namespace.
Definition common.h:76
The base class for all composite objects in the GOM system.
Definitions common to all include files in the skin_imgui library.
Clipping configuration.
Definition camera.h:55