Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:20

0001 // @(#)root/g3d:$Id$
0002 // Author: Matevz Tadel  7/4/2006
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 
0013 #ifndef ROOT_TPointSet3D
0014 #define ROOT_TPointSet3D
0015 
0016 #include "TPolyMarker3D.h"
0017 #include "TAttBBox.h"
0018 
0019 #include "TRefArray.h"
0020 
0021 class TPointSet3D : public TPolyMarker3D, public TAttBBox
0022 {
0023 protected:
0024    Bool_t    fOwnIds; //Flag specifying id-objects are owned by the point-set
0025    TRefArray fIds;    //User-provided point identifications
0026 
0027    void CopyIds(const TPointSet3D& t);
0028 
0029 public:
0030    TPointSet3D() :
0031       TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
0032    TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="") :
0033       TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
0034    TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="") :
0035       TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
0036    TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="") :
0037       TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
0038    TPointSet3D(const TPointSet3D &t);
0039 
0040    TPointSet3D& operator=(const TPointSet3D& t);
0041 
0042    ~TPointSet3D() override;
0043 
0044    void ComputeBBox() override;
0045 
0046    void     SetPointId(TObject* id);
0047    void     SetPointId(Int_t n, TObject* id);
0048    TObject* GetPointId(Int_t n) const { return fIds.At(n); }
0049    void     ClearIds();
0050 
0051    Bool_t GetOwnIds() const    { return fOwnIds; }
0052    void   SetOwnIds(Bool_t o)  { fOwnIds = o; }
0053 
0054    virtual void PointSelected(Int_t n);
0055 
0056    ClassDefOverride(TPointSet3D,1); // TPolyMarker3D with direct OpenGL rendering.
0057 };
0058 
0059 #endif