16 #include "ui_example4controllerform.h"
18 #include <Inventor/nodes/SoSeparator.h>
19 #include <Inventor/nodes/SoLineSet.h>
20 #include <Inventor/nodes/SoVertexProperty.h>
21 #include <Inventor/nodes/SoSwitch.h>
28 #include "GaudiKernel/SystemOfUnits.h"
34 "This is an illustration of a very basic 3D system.\n"
35 "It transforms track information found in storegate"
36 " into 3D objects, displays track information upon selection, and has a controller which allows the user to set a pt cut on tracks.",
52 message(
"Error: Got null storegate pointer");
57 std::string trackname=
"Tracks";
59 if (
status != StatusCode::SUCCESS || !trackColl) {
60 message(
"Error: Could not retrieve track collection (used key="+QString(trackname.c_str())+
")");
68 for ( trackItr = trackColl->
begin() ; trackItr != trackItrEnd; ++trackItr) {
80 SoVertexProperty *vertices =
new SoVertexProperty();
85 vertices->vertex.set1Value(iver++,(*it)->position().x(),(*it)->position().y(),(*it)->position().z());
89 SoLineSet *
line =
new SoLineSet();
90 line->numVertices = iver;
91 line->vertexProperty = vertices;
94 SoSwitch * sw =
new SoSwitch();
98 sw->whichChild =
pt >
m_ptcut ? SO_SWITCH_ALL : SO_SWITCH_NONE;
120 message(
"Error: Does not have track information for picked node");
127 message(
"Error: Track has no trackparameters");
143 QWidget * controller =
new QWidget(0);
144 Ui::Example4ControllerForm ui;
145 ui.setupUi(controller);
148 connect(ui.doubleSpinBox_ptcut,SIGNAL(valueChanged(
double)),
this,SLOT(
ptCutChanged(
double)));
162 it->first->whichChild = (
it->second>
m_ptcut ? SO_SWITCH_ALL : SO_SWITCH_NONE );