Bayeux  3.4.1
Core Foundation library for SuperNEMO
visibility.h
Go to the documentation of this file.
1 /* Author(s): Francois Mauger <mauger@lpccaen.in2p3.fr>
3  * Creation date: 2008-05-23
4  * Last modified: 2009-03-31
5  *
6  * License:
7  *
8  * Description:
9  * Utilities for visualization tools:
10  *
11  * Some visibility properties are defined:
12  *
13  *
14  * History:
15  *
16  */
17 
18 #ifndef GEOMTOOLS_VISIBILITY_H
19 #define GEOMTOOLS_VISIBILITY_H 1
20 
21 // Standard library:
22 #include <string>
23 #include <iostream>
24 
25 namespace datatools {
26  class properties;
27 }
28 
29 namespace geomtools {
30 
32  class visibility
33  {
34  public:
35 
37  struct constants
38  {
39  std::string VISIBILITY_PREFIX;
50  constants();
51 
52  static const constants & instance();
53 
54  };
55 
56  public:
57 
58  static std::string make_key(const std::string & flag_);
59 
60  static void extract(const datatools::properties & source_,
61  datatools::properties & target_);
62 
63  static bool has_flag(const datatools::properties & config_,
64  const std::string & flag_);
65 
66  static bool has_key(const datatools::properties & config_,
67  const std::string & key_);
68 
69  static bool is_shown(const datatools::properties & config_);
70 
71  static bool is_hidden(const datatools::properties & config_);
72 
73  static bool is_hidden_envelope(const datatools::properties & config_);
74 
75  static bool is_daughters_shown(const datatools::properties & config_);
76 
77  static bool is_daughters_hidden(const datatools::properties & config_);
78 
79  static bool is_visible_edges(const datatools::properties & config_);
80 
81  static bool has_color(const datatools::properties & config_);
82 
83  static std::string get_color(const datatools::properties & config_);
84 
85  static void set_color(datatools::properties & config_,
86  const std::string & color_);
87 
88  static bool has_opacity(const datatools::properties & config_);
89 
90  static double get_opacity(const datatools::properties & config_);
91 
92  static double default_opacity();
93 
94  static bool validate_opacity(double);
95 
96  static void set_opacity(datatools::properties & config_,
97  double opacity_);
98 
99  static bool has_envelope_color(const datatools::properties & config_);
100 
101  static std::string get_envelope_color(const datatools::properties & config_);
102 
103  static void set_envelope_color(datatools::properties & config_,
104  const std::string & color_);
105 
106  static bool is_wired_cylinder(const datatools::properties & config_);
107 
108  };
109 
110 } // end of namespace geomtools
111 
112 #endif // GEOMTOOLS_VISIBILITY_H
113 
114 /*
115 ** Local Variables: --
116 ** mode: c++ --
117 ** c-file-style: "gnu" --
118 ** tab-width: 2 --
119 ** End: --
120 */
static bool validate_opacity(double)
static bool is_shown(const datatools::properties &config_)
std::string VISIBILITY_WIRED_CYLINDER_FLAG
Definition: visibility.h:43
static void extract(const datatools::properties &source_, datatools::properties &target_)
static std::string get_color(const datatools::properties &config_)
Utilities to manipulate visibility properties.
Definition: visibility.h:32
static void set_color(datatools::properties &config_, const std::string &color_)
std::string VISIBILITY_HIDDEN_FLAG
Definition: visibility.h:40
static bool has_envelope_color(const datatools::properties &config_)
std::string VISIBILITY_PREFIX
Definition: visibility.h:39
Constant strings/labels.
Definition: visibility.h:37
std::string VISIBILITY_ENVELOPE_COLOR_PROPERTY
Definition: visibility.h:45
static bool has_flag(const datatools::properties &config_, const std::string &flag_)
static bool is_daughters_shown(const datatools::properties &config_)
static void set_envelope_color(datatools::properties &config_, const std::string &color_)
static bool is_hidden_envelope(const datatools::properties &config_)
static double default_opacity()
static double get_opacity(const datatools::properties &config_)
static bool is_daughters_hidden(const datatools::properties &config_)
The Bayeux/datatools library top-level namespace.
Definition: algo.h:13
static bool has_color(const datatools::properties &config_)
static const constants & instance()
static std::string get_envelope_color(const datatools::properties &config_)
static bool has_opacity(const datatools::properties &config_)
static bool is_wired_cylinder(const datatools::properties &config_)
std::string VISIBILITY_DAUGHTERS_HIDDEN_FLAG
Definition: visibility.h:42
std::string VISIBILITY_OPACITY_PROPERTY
Definition: visibility.h:46
std::string VISIBILITY_COLOR_PROPERTY
Definition: visibility.h:44
static bool is_hidden(const datatools::properties &config_)
static bool is_visible_edges(const datatools::properties &config_)
double VISIBILITY_DEFAULT_OPACITY
Definition: visibility.h:49
std::string VISIBILITY_OPACITY_RULE_PROPERTY
Definition: visibility.h:47
std::string VISIBILITY_HIDDEN_ENVELOPE_FLAG
Definition: visibility.h:41
static std::string make_key(const std::string &flag_)
std::string VISIBILITY_VISIBLE_EDGES_FLAG
Definition: visibility.h:48
static bool has_key(const datatools::properties &config_, const std::string &key_)
Top-level namespace of the Bayeux/geomtools module library.
Definition: electromagnetic_field_manager.h:39
A dictionary of arbitrary properties.
Definition: properties.h:125
static void set_opacity(datatools::properties &config_, double opacity_)