ATLAS Offline Software
VisAttributes.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef VP1GEOMETRYSYSTEMS_GEOVISATTRIBUTES_H
6 #define VP1GEOMETRYSYSTEMS_GEOVISATTRIBUTES_H
7 
8 #include <string>
9 #include <QByteArray>
10 #include <QMap>
11 #include <QString>
12 class SoMaterial;
13 
15 
16  public:
17 
18  // Constructor:
19  VisAttributes();
20  //delete copy
21  VisAttributes(const VisAttributes &) = delete;
22  //delete assignment
24  void init();//Call at end of constructor in derived classes.
25  // Destructor:
26  virtual ~VisAttributes();
27 
28  // Fetch a material
29  SoMaterial *get(const std::string & name) const;
30 
31  //Override transparencies of materials (will multiply current transparencies):
32  void overrideTransparencies(float transpfact);
33 
34  QByteArray getState(bool onlyChangedMaterials=true);
35  void applyState(QByteArray);
36 
37  protected:
38 
39  // Add a material
40  void add(const std::string & name, SoMaterial *);
41 
42  // set SoMaterial color from RGB values
43  void setColorFromRGB(SoMaterial* mat, const std::string& type, const int r, const int g, const int b);
44 
45  private:
46 
47  class Imp;
48  Imp * m_d;
49 
50  // convert the usual range RGB [0,255] to Coin [0,1]
51  float getValFromRGB(const int rgb);
52 
53 };
54 
55 
56 // A list of Vis attributes for Detectors:
58  public:
60 };
61 
62 
63 // A list of Vis attributes for Materials:
65  public:
67 };
68 
69 
70 // A list of Vis attributes for Volumes:
72  public:
74 };
75 
76 #endif
VisAttributes::add
void add(const std::string &name, SoMaterial *)
Definition: VisAttributes.cxx:122
VisAttributes::~VisAttributes
virtual ~VisAttributes()
Definition: VisAttributes.cxx:104
beamspotman.r
def r
Definition: beamspotman.py:676
VisAttributes::init
void init()
Definition: VisAttributes.cxx:26
VolVisAttributes
Definition: VisAttributes.h:71
VisAttributes::operator=
VisAttributes & operator=(const VisAttributes &)=delete
mat
GeoMaterial * mat
Definition: LArDetectorConstructionTBEC.cxx:55
VisAttributes::VisAttributes
VisAttributes()
Definition: VisAttributes.cxx:100
DetVisAttributes
Definition: VisAttributes.h:57
python.CaloCondTools.g
g
Definition: CaloCondTools.py:15
VisAttributes::applyState
void applyState(QByteArray)
Definition: VisAttributes.cxx:61
VisAttributes::Imp
Definition: VisAttributes.cxx:15
VolVisAttributes::VolVisAttributes
VolVisAttributes()
Definition: VisAttributes.cxx:1222
VisAttributes
Definition: VisAttributes.h:14
VisAttributes::getState
QByteArray getState(bool onlyChangedMaterials=true)
Definition: VisAttributes.cxx:32
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:221
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
VisAttributes::m_d
Imp * m_d
Definition: VisAttributes.h:47
MatVisAttributes
Definition: VisAttributes.h:64
VisAttributes::overrideTransparencies
void overrideTransparencies(float transpfact)
Definition: VisAttributes.cxx:137
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
VisAttributes::setColorFromRGB
void setColorFromRGB(SoMaterial *mat, const std::string &type, const int r, const int g, const int b)
Definition: VisAttributes.cxx:149
MatVisAttributes::MatVisAttributes
MatVisAttributes()
Definition: VisAttributes.cxx:366
VisAttributes::get
SoMaterial * get(const std::string &name) const
Definition: VisAttributes.cxx:113
DetVisAttributes::DetVisAttributes
DetVisAttributes()
Definition: VisAttributes.cxx:173
VisAttributes::getValFromRGB
float getValFromRGB(const int rgb)
Definition: VisAttributes.cxx:144
VisAttributes::VisAttributes
VisAttributes(const VisAttributes &)=delete