]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
New files: allow interaction with the track, more configurability (render as line...
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Nov 2006 18:42:34 +0000 (18:42 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 21 Nov 2006 18:42:34 +0000 (18:42 +0000)
EVE/Reve/TrackGL.cxx [new file with mode: 0644]
EVE/Reve/TrackGL.h [new file with mode: 0644]

diff --git a/EVE/Reve/TrackGL.cxx b/EVE/Reve/TrackGL.cxx
new file mode 100644 (file)
index 0000000..1201647
--- /dev/null
@@ -0,0 +1,43 @@
+// $Header$
+
+#include "TrackGL.h"
+#include <Reve/Track.h>
+
+#include <TGLDrawFlags.h>
+
+#ifdef WIN32
+#include "Windows4root.h"
+#endif
+#include <GL/gl.h>
+#include <GL/glu.h>
+
+using namespace Reve;
+
+//______________________________________________________________________
+// TrackGL
+//
+
+ClassImp(TrackGL)
+
+TrackGL::TrackGL() : LineGL()
+{
+  // fCached = false; // Disable display list.
+}
+
+TrackGL::~TrackGL()
+{}
+
+/**************************************************************************/
+
+void TrackGL::ProcessSelection(UInt_t* ptr, TGLViewer* v, TGLScene* s)
+{
+   // Processes secondary selection from TGLViewer.
+   // Calls TPointSet3D::PointSelected(Int_t) with index of selected
+   // point as an argument.
+  TGLLogicalShape::ProcessSelection(ptr, v, s);
+  /*
+  if (ptr[0] < 2) return;
+  TPointSet3D& q = * (TPointSet3D*) fExternalObj;
+  q.PointSelected(ptr[4]);
+  */
+}
diff --git a/EVE/Reve/TrackGL.h b/EVE/Reve/TrackGL.h
new file mode 100644 (file)
index 0000000..0c863ef
--- /dev/null
@@ -0,0 +1,36 @@
+// $Header$
+
+#ifndef REVE_TrackGL_H
+#define REVE_TrackGL_H
+
+#include <Reve/LineGL.h>
+
+class TGLViewer;
+class TGLScene;
+
+namespace Reve {
+
+class Track;
+
+class TrackGL : public LineGL
+{
+private:
+  TrackGL(const TrackGL&);            // Not implemented
+  TrackGL& operator=(const TrackGL&); // Not implemented
+
+protected:
+
+public:
+  TrackGL();
+  virtual ~TrackGL();
+
+  // To support two-level selection
+  // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
+  virtual void ProcessSelection(UInt_t* ptr, TGLViewer*, TGLScene*);
+
+  ClassDef(TrackGL, 0);
+}; // endclass TrackGL
+
+}
+
+#endif