Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
21class TPointSet3D : public TPolyMarker3D, public TAttBBox
22{
23protected:
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
29public:
31 TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
33 TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
35 TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
37 TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
38 TPointSet3D(const TPointSet3D &t);
39
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
int Int_t
Definition RtypesCore.h:45
short Marker_t
Definition RtypesCore.h:90
const Bool_t kFALSE
Definition RtypesCore.h:101
double Double_t
Definition RtypesCore.h:59
float Float_t
Definition RtypesCore.h:57
const char Option_t
Definition RtypesCore.h:66
#define ClassDef(name, id)
Definition Rtypes.h:325
Helper for management of bounding-box information.
Definition TAttBBox.h:18
Mother of all ROOT objects.
Definition TObject.h:41
TPolyMarker3D using TPointSet3DGL for direct OpenGL rendering.
Definition TPointSet3D.h:22
TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="")
Definition TPointSet3D.h:32
TRefArray fIds
Definition TPointSet3D.h:25
virtual void ComputeBBox()
Compute the bounding box of this points set.
virtual void PointSelected(Int_t n)
This virtual method is called from TPointSet3DGL when a point is selected.
TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="")
Definition TPointSet3D.h:34
TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="")
Definition TPointSet3D.h:36
Bool_t fOwnIds
Definition TPointSet3D.h:24
TPointSet3D & operator=(const TPointSet3D &t)
Assignment operator.
void SetOwnIds(Bool_t o)
Definition TPointSet3D.h:52
Bool_t GetOwnIds() const
Definition TPointSet3D.h:51
void ClearIds()
Clears the id-array. If ids are owned the TObjects are deleted.
virtual ~TPointSet3D()
Destructor.
void CopyIds(const TPointSet3D &t)
Copy id objects from point-set 't'.
void SetPointId(TObject *id)
Set id of last point.
TObject * GetPointId(Int_t n) const
Definition TPointSet3D.h:48
A 3D polymarker.
An array of references to TObjects.
Definition TRefArray.h:33
TObject * At(Int_t idx) const
Definition TRefArray.h:178
const Int_t n
Definition legend1.C:16
auto * m
Definition textangle.C:8