ATLAS Offline Software
Loading...
Searching...
No Matches
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>
12class SoMaterial;
13
15
16 public:
17
18 // Constructor:
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;
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
virtual ~VisAttributes()
float getValFromRGB(const int rgb)
VisAttributes & operator=(const VisAttributes &)=delete
void add(const std::string &name, SoMaterial *)
QByteArray getState(bool onlyChangedMaterials=true)
SoMaterial * get(const std::string &name) const
void setColorFromRGB(SoMaterial *mat, const std::string &type, const int r, const int g, const int b)
void applyState(QByteArray)
VisAttributes(const VisAttributes &)=delete
void overrideTransparencies(float transpfact)
int r
Definition globals.cxx:22