Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TPolyMarker3D
17 #include "TPolyMarker3D.h"
18 #endif
19 #ifndef ROOT_TAttBBox
20 #include "TAttBBox.h"
21 #endif
22 
23 #include "TRefArray.h"
24 
25 class TPointSet3D : public TPolyMarker3D, public TAttBBox
26 {
27 protected:
28  Bool_t fOwnIds; //Flag specifying id-objects are owned by the point-set
29  TRefArray fIds; //User-provided point identifications
30 
31  void CopyIds(const TPointSet3D& t);
32 
33 public:
35  TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
37  TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
39  TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
41  TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
42  TPointSet3D(const TPointSet3D &t);
43 
45 
46  virtual ~TPointSet3D();
47 
48  virtual void ComputeBBox();
49 
50  void SetPointId(TObject* id);
51  void SetPointId(Int_t n, TObject* id);
52  TObject* GetPointId(Int_t n) const { return fIds.At(n); }
53  void ClearIds();
54 
55  Bool_t GetOwnIds() const { return fOwnIds; }
56  void SetOwnIds(Bool_t o) { fOwnIds = o; }
57 
58  virtual void PointSelected(Int_t n);
59 
60  ClassDef(TPointSet3D,1); // TPolyMarker3D with direct OpenGL rendering.
61 };
62 
63 #endif
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
Bool_t fOwnIds
Definition: TPointSet3D.h:28
void ClearIds()
Clears the id-array. If ids are owned the TObjects are deleted.
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
const Bool_t kFALSE
Definition: Rtypes.h:92
An array of references to TObjects.
Definition: TRefArray.h:43
TObject * GetPointId(Int_t n) const
Definition: TPointSet3D.h:52
virtual ~TPointSet3D()
Destructor.
Definition: TPointSet3D.cxx:53
#define ClassDef(name, id)
Definition: Rtypes.h:254
void SetPointId(TObject *id)
Set id of last point.
TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="")
Definition: TPointSet3D.h:40
TObject * At(Int_t idx) const
Definition: TRefArray.h:184
TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="")
Definition: TPointSet3D.h:38
TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="")
Definition: TPointSet3D.h:36
short Marker_t
Definition: RtypesCore.h:77
void SetOwnIds(Bool_t o)
Definition: TPointSet3D.h:56
TPointSet3D & operator=(const TPointSet3D &t)
Assignment operator.
Definition: TPointSet3D.cxx:77
virtual void PointSelected(Int_t n)
This virtual method is called from TPointSet3DGL when a point is selected.
TMarker * m
Definition: textangle.C:8
virtual void ComputeBBox()
Compute the bounding box of this points set.
Definition: TPointSet3D.cxx:90
Bool_t GetOwnIds() const
Definition: TPointSet3D.h:55
void CopyIds(const TPointSet3D &t)
Copy id objects from point-set 't'.
Definition: TPointSet3D.cxx:61
double Double_t
Definition: RtypesCore.h:55
Mother of all ROOT objects.
Definition: TObject.h:37
TRefArray fIds
Definition: TPointSet3D.h:29
A 3D polymarker.
Definition: TPolyMarker3D.h:40
Helper for management of bounding-box information.
Definition: TAttBBox.h:19
TPolyMarker3D using TPointSet3DGL for direct OpenGL rendering.
Definition: TPointSet3D.h:25
const Int_t n
Definition: legend1.C:16