16#include "ui_trackingsurfacescontrollerform.h"
22#include "GaudiKernel/SystemOfUnits.h"
24#include <Inventor/nodes/SoSeparator.h>
25#include <Inventor/nodes/SoLineSet.h>
26#include <Inventor/nodes/SoVertexProperty.h>
27#include <Inventor/nodes/SoSwitch.h>
28#include <Inventor/nodes/SoMaterial.h>
50 message(
"Error: Got null storegate pointer");
64 std::string surfname=
"SurfaceCollection";
65 StatusCode status = sg->
retrieve(surfColl, surfname);
66 if (status != StatusCode::SUCCESS || !surfColl) {
67 message(
"Error: Could not retrieve SurfaceCollection (used key="+QString(surfname.c_str())+
")");
70 message(
"Loaded SurfaceCollection with key [" +QString(surfname.c_str())+
"] and which contains [" + QString::number(surfColl->
size()) +
"] surfaces.");
93 for ( surfItr = surfColl->
begin() ; surfItr != surfItrEnd; ++surfItr) {
97 SoMaterial *material =
new SoMaterial;
99 material->diffuseColor.setValue(0.6, 0., 0.6);
101 material->diffuseColor.setValue(1., 0., 1.);
125 messageDebug(
"TrackingSurfacesSystem::userPickedNode - have been passed node ["+QString(
"0x%1").arg((quintptr)pickedNode,
126 QT_POINTER_SIZE * 2, 16, QChar(
'0'))+
"] and have ["+QString::number(
m_nodeToSurface.size())+
"] nodes.");
129 message(
"Error: Do not have surface information for picked node");
137 std::ostringstream s;
138 s << *(matchedSurface);
139 l << QString(s.str().c_str()).split(
'\n');
144 for (
CamListItr itCam = cameras.begin(); itCam!=cameras.end(); ++itCam) {
152 for (SoNode *
node : nodes) {
155 message(
"Error: Does not have surface information for all nodes");
164 QWidget * controller =
new QWidget(0);
165 Ui::TrackingSurfacesControllerForm ui;
166 ui.setupUi(controller);
168 connect(ui.radioButton_select_single,SIGNAL(toggled(
bool)),
this,SLOT(
updateSelectionMode(
bool)));
DataVector< const Trk::Surface > SurfaceCollection
DataVector of const Surface / 24.08.2004 % clid.py SurfaceCollection 1185938832 SurfaceCollection.
DataModel_detail::const_iterator< DataVector > const_iterator
const_iterator end() const noexcept
Return a const_iterator pointing past the end of the collection.
const_iterator begin() const noexcept
Return a const_iterator pointing at the beginning of the collection.
size_type size() const noexcept
Returns the number of elements in the collection.
IVP13DSystemSimple(const QString &name, const QString &information, const QString &contact_info)
std::set< SoCamera * > CamList
virtual void deselectAll(SoCooperativeSelection *exception_sel=0)
void registerSelectionNode(SoCooperativeSelection *)
CamList::iterator CamListItr
void messageDebug(const QString &) const
void message(const QString &) const
The Athena Transient Store API.
StatusCode retrieve(const T *&ptr) const
Retrieve the default object into a const T*.
SoNode * translateSurface(const Trk::Surface &sf, const bool &simple=false) const
void userPickedNode(SoNode *pickedNode, SoPath *pickedPath)
void updateSelectionMode(bool single)
void userChangedSelection(SoCooperativeSelection *, const QSet< SoNode * > &, QSet< SoPath * >)
QWidget * buildController()
std::map< SoNode *, const Trk::Surface * > m_nodeToSurface
SoCooperativeSelection * m_multiselection
void buildEventSceneGraph(StoreGateSvc *sg, SoSeparator *root)
Abstract Base Class for tracking surfaces.
bool isActive() const
Return 'true' if this surface is owned by the detector element.
static VP1CameraHelper * animatedZoomToSubTree(SoCamera *camera, SoGroup *sceneroot, SoNode *subtreeroot, double duration_in_secs=1.0, double clipVolPercent=100.0, double lastClipVolPercent=100.0, double slack=1.0, const SbVec3f &lookat=SbVec3f(999, 999, 999), const SbVec3f &upvec=SbVec3f(999, 999, 999), bool varySpeed=true, bool forceCircular=false)