Graphite  Version 3
An experimental 3D geometry processing program
unsharp_masking.h
Go to the documentation of this file.
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_FULL_SCREEN_EFFECTS_UM_H
38 #define H_OGF_SCENE_GRAPH_GFX_FULL_SCREEN_EFFECTS_UM_H
39 
40 #include <OGF/scene_graph_gfx/common/common.h>
43 
49 namespace OGF {
50 
54  gom_class SCENE_GRAPH_GFX_API UnsharpMasking : public FullScreenEffect {
55  public:
56 
61  UnsharpMasking(SceneGraph* scene_graph);
62 
67 
68  gom_properties:
69 
73  index_t get_intensity() const {
74  return impl_->get_intensity();
75  }
76 
80  void set_intensity(index_t value) {
81  impl_->set_intensity(value);
82  update();
83  }
84 
89  return impl_->get_contrast();
90  }
91 
95  void set_contrast(index_t value) {
96  impl_->set_contrast(value);
97  update();
98  }
99 
103  gom_attribute(help, "Size (in pixels) of the Gaussian blur kernel")
104  index_t get_blur_width() const {
105  return impl_->get_blur_width();
106  }
107 
111  void set_blur_width(index_t value) {
112  impl_->set_blur_width(value);
113  update();
114  }
115 
116 
120  gom_attribute(help, "Draw halos around the object")
121  bool get_halos() const {
122  return impl_->get_halos();
123  }
124 
128  void set_halos(bool value) {
129  impl_->set_halos(value);
130  update();
131  }
132 
133 
137  gom_attribute(
138  help, "Draw white shadows on zones opposite to dark shadows"
139  )
140  bool get_positive_shadows() const {
141  return impl_->get_positive_shadows();
142  }
143 
147  void set_positive_shadows(bool value) {
148  impl_->set_positive_shadows(value);
149  update();
150  }
151 
152  private:
154  };
155 
156 }
157 
158 #endif
Implementation of full screen effects.
A Full screen effect.
Represents the list of objects loaded in Graphite.
Definition: scene_graph.h:62
A GOM wrapper around UnsharpMaskingImpl.
void set_intensity(index_t value)
Sets the intensity.
void set_positive_shadows(bool value)
Specifies whether positive_shadows should be used.
void set_blur_width(index_t value)
Sets the size of the blurring kernel.
FullScreenEffectImpl * implementation() override
Gets the implementation.
void set_halos(bool value)
Specifies whether halos should be used.
index_t get_contrast() const
Gets the contrast.
UnsharpMasking(SceneGraph *scene_graph)
UnsharpMasking constructor.
void set_contrast(index_t value)
Sets the contrast. A value of 50 (default) corresponds to average contrast.
Implementation of UnsharpMasking full screen effect.
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76
Base classes for full screen effects.