16 #include <Inventor/C/errors/debugerror.h>
17 #include <Inventor/nodes/SoMaterial.h>
18 #include <Inventor/nodes/SoSeparator.h>
19 #include <Inventor/nodes/SoCylinder.h>
20 #include <Inventor/nodes/SoCone.h>
21 #include <Inventor/nodes/SoTranslation.h>
22 #include <Inventor/nodes/SoRotationXYZ.h>
31 SoSeparator * attachsep,
32 bool showID,
bool showCalo,
bool showMS);
58 bool showID,
bool showCalo,
bool showMS,
59 SoSeparator * attachsep,
61 : QObject(
parent),
VP1HelperClassBase(
sys,
"VP1TrackingVolumes"), m_d(
new Imp(this,materialID, materialCalo, materialMS, attachsep, showID, showCalo, showMS))
79 std::cout<<
"m_d->attachSep"<<std::endl;
87 : theclass(tc), attachSep(as),
88 materialID(materialID), materialCalo(materialCalo), materialMS(materialMS),
89 shown(false), shownID(showID), shownCalo(showCalo), shownMS(showMS),
90 sep(0),sepID(0),sepCalo(0),sepMS(0),innerDetector(0),calos(0),muonSpectrometer(0)
98 if (
sep && sepID && sepCalo && sepMS)
100 theclass->messageVerbose(
"Building 3D objects");
102 sep =
new SoSeparator;
104 SoRotationXYZ * rotz =
new SoRotationXYZ;
106 rotz->angle.setValue(0.5*
M_PI);
109 sepID =
new SoSeparator;
111 sepID->addChild(materialID);
112 innerDetector =
new SoCylinder;
113 innerDetector->radius.setValue(1100.0);
114 innerDetector->height.setValue( 6400.0 );
115 sepID->addChild(innerDetector);
117 sepCalo =
new SoSeparator;
119 sepCalo->addChild(materialCalo);
120 calos =
new SoCylinder;
121 calos->radius.setValue(4250.0);
122 calos->height.setValue( 6779.0*2.0 );
123 sepCalo->addChild(calos);
125 sepMS =
new SoSeparator;
127 sepMS->addChild(materialMS);
128 muonSpectrometer =
new SoCylinder;
129 muonSpectrometer->radius.setValue(15000.0);
130 muonSpectrometer->height.setValue( 21000.0*2.0 );
131 sepMS->addChild(muonSpectrometer);
140 ensureInit3DObjects();
141 theclass->messageVerbose(
"Updating fields");
143 const bool save =
sep->enableNotify(
false);
146 if (
sep->findChild(sepID)<0)
147 sep->addChild(sepID);
149 sep->removeChild(sepID);
153 if (
sep->findChild(sepCalo)<0)
154 sep->addChild(sepCalo);
156 sep->removeChild(sepCalo);
160 if (
sep->findChild(sepMS)<0)
161 sep->addChild(sepMS);
163 sep->removeChild(sepMS);
167 sep->enableNotify(
true);