TPointSet3D.h

Go to the documentation of this file.
00001 // @(#)root/g3d:$Id: TPointSet3D.h 27556 2009-02-20 17:38:28Z matevz $
00002 // Author: Matevz Tadel  7/4/2006
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 
00013 #ifndef ROOT_TPointSet3D
00014 #define ROOT_TPointSet3D
00015 
00016 #ifndef ROOT_TPolyMarker3D
00017 #include "TPolyMarker3D.h"
00018 #endif
00019 #ifndef ROOT_TAttBBox
00020 #include "TAttBBox.h"
00021 #endif
00022 
00023 #include "TRefArray.h"
00024 
00025 class TPointSet3D : public TPolyMarker3D, public TAttBBox
00026 {
00027 protected:
00028    Bool_t    fOwnIds; //Flag specifying id-objects are owned by the point-set
00029    TRefArray fIds;    //User-provided point identifications
00030 
00031    void CopyIds(const TPointSet3D& t);
00032 
00033 public:
00034    TPointSet3D() :
00035       TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
00036    TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="") :
00037       TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
00038    TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="") :
00039       TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
00040    TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="") :
00041       TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
00042    TPointSet3D(const TPointSet3D &t);
00043 
00044    TPointSet3D& operator=(const TPointSet3D& t);
00045 
00046    virtual ~TPointSet3D();
00047 
00048    virtual void ComputeBBox();
00049 
00050    void     SetPointId(TObject* id);
00051    void     SetPointId(Int_t n, TObject* id);
00052    TObject* GetPointId(Int_t n) const { return fIds.At(n); }
00053    void     ClearIds();
00054 
00055    Bool_t GetOwnIds() const    { return fOwnIds; }
00056    void   SetOwnIds(Bool_t o)  { fOwnIds = o; }
00057 
00058    virtual void PointSelected(Int_t n);
00059 
00060    ClassDef(TPointSet3D,1); // TPolyMarker3D with direct OpenGL rendering.
00061 };
00062 
00063 #endif

Generated on Tue Jul 5 14:16:20 2011 for ROOT_528-00b_version by  doxygen 1.5.1