Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TPointSet3D.h
Go to the documentation of this file.
1 // @(#)root/g3d:$Id$
2 // Author: Matevz Tadel 7/4/2006
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 
13 #ifndef ROOT_TPointSet3D
14 #define ROOT_TPointSet3D
15 
16 #include "TPolyMarker3D.h"
17 #include "TAttBBox.h"
18 
19 #include "TRefArray.h"
20 
21 class TPointSet3D : public TPolyMarker3D, public TAttBBox
22 {
23 protected:
24  Bool_t fOwnIds; //Flag specifying id-objects are owned by the point-set
25  TRefArray fIds; //User-provided point identifications
26 
27  void CopyIds(const TPointSet3D& t);
28 
29 public:
30  TPointSet3D() :
31  TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
32  TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="") :
33  TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
34  TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="") :
35  TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
36  TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="") :
37  TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
38  TPointSet3D(const TPointSet3D &t);
39 
40  TPointSet3D& operator=(const TPointSet3D& t);
41 
42  virtual ~TPointSet3D();
43 
44  virtual void ComputeBBox();
45 
46  void SetPointId(TObject* id);
47  void SetPointId(Int_t n, TObject* id);
48  TObject* GetPointId(Int_t n) const { return fIds.At(n); }
49  void ClearIds();
50 
51  Bool_t GetOwnIds() const { return fOwnIds; }
52  void SetOwnIds(Bool_t o) { fOwnIds = o; }
53 
54  virtual void PointSelected(Int_t n);
55 
56  ClassDef(TPointSet3D,1); // TPolyMarker3D with direct OpenGL rendering.
57 };
58 
59 #endif