Logo ROOT   6.16/01
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#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:41
short Marker_t
Definition: RtypesCore.h:77
const Bool_t kFALSE
Definition: RtypesCore.h:88
bool Bool_t
Definition: RtypesCore.h:59
double Double_t
Definition: RtypesCore.h:55
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:324
Helper for management of bounding-box information.
Definition: TAttBBox.h:18
Mother of all ROOT objects.
Definition: TObject.h:37
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.
Definition: TPointSet3D.cxx:90
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.
Definition: TPointSet3D.cxx:77
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.
Definition: TPointSet3D.cxx:53
void CopyIds(const TPointSet3D &t)
Copy id objects from point-set 't'.
Definition: TPointSet3D.cxx:61
void SetPointId(TObject *id)
Set id of last point.
TObject * GetPointId(Int_t n) const
Definition: TPointSet3D.h:48
A 3D polymarker.
Definition: TPolyMarker3D.h:33
An array of references to TObjects.
Definition: TRefArray.h:39
TObject * At(Int_t idx) const
Definition: TRefArray.h:180
const Int_t n
Definition: legend1.C:16
auto * m
Definition: textangle.C:8