ROOT logo
// @(#)root/g3d:$Id: TPointSet3D.h 27556 2009-02-20 17:38:28Z matevz $
// Author: Matevz Tadel  7/4/2006

/*************************************************************************
 * Copyright (C) 1995-2006, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/


#ifndef ROOT_TPointSet3D
#define ROOT_TPointSet3D

#ifndef ROOT_TPolyMarker3D
#include "TPolyMarker3D.h"
#endif
#ifndef ROOT_TAttBBox
#include "TAttBBox.h"
#endif

#include "TRefArray.h"

class TPointSet3D : public TPolyMarker3D, public TAttBBox
{
protected:
   Bool_t    fOwnIds; //Flag specifying id-objects are owned by the point-set
   TRefArray fIds;    //User-provided point identifications

   void CopyIds(const TPointSet3D& t);

public:
   TPointSet3D() :
      TPolyMarker3D(), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
   TPointSet3D(Int_t n, Marker_t m=1, Option_t *opt="") :
      TPolyMarker3D(n, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
   TPointSet3D(Int_t n, Float_t *p, Marker_t m=1, Option_t *opt="") :
      TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
   TPointSet3D(Int_t n, Double_t *p, Marker_t m=1, Option_t *opt="") :
      TPolyMarker3D(n, p, m, opt), fOwnIds(kFALSE), fIds() { fName="TPointSet3D"; }
   TPointSet3D(const TPointSet3D &t);

   TPointSet3D& operator=(const TPointSet3D& t);

   virtual ~TPointSet3D();

   virtual void ComputeBBox();

   void     SetPointId(TObject* id);
   void     SetPointId(Int_t n, TObject* id);
   TObject* GetPointId(Int_t n) const { return fIds.At(n); }
   void     ClearIds();

   Bool_t GetOwnIds() const    { return fOwnIds; }
   void   SetOwnIds(Bool_t o)  { fOwnIds = o; }

   virtual void PointSelected(Int_t n);

   ClassDef(TPointSet3D,1); // TPolyMarker3D with direct OpenGL rendering.
};

#endif
 TPointSet3D.h:1
 TPointSet3D.h:2
 TPointSet3D.h:3
 TPointSet3D.h:4
 TPointSet3D.h:5
 TPointSet3D.h:6
 TPointSet3D.h:7
 TPointSet3D.h:8
 TPointSet3D.h:9
 TPointSet3D.h:10
 TPointSet3D.h:11
 TPointSet3D.h:12
 TPointSet3D.h:13
 TPointSet3D.h:14
 TPointSet3D.h:15
 TPointSet3D.h:16
 TPointSet3D.h:17
 TPointSet3D.h:18
 TPointSet3D.h:19
 TPointSet3D.h:20
 TPointSet3D.h:21
 TPointSet3D.h:22
 TPointSet3D.h:23
 TPointSet3D.h:24
 TPointSet3D.h:25
 TPointSet3D.h:26
 TPointSet3D.h:27
 TPointSet3D.h:28
 TPointSet3D.h:29
 TPointSet3D.h:30
 TPointSet3D.h:31
 TPointSet3D.h:32
 TPointSet3D.h:33
 TPointSet3D.h:34
 TPointSet3D.h:35
 TPointSet3D.h:36
 TPointSet3D.h:37
 TPointSet3D.h:38
 TPointSet3D.h:39
 TPointSet3D.h:40
 TPointSet3D.h:41
 TPointSet3D.h:42
 TPointSet3D.h:43
 TPointSet3D.h:44
 TPointSet3D.h:45
 TPointSet3D.h:46
 TPointSet3D.h:47
 TPointSet3D.h:48
 TPointSet3D.h:49
 TPointSet3D.h:50
 TPointSet3D.h:51
 TPointSet3D.h:52
 TPointSet3D.h:53
 TPointSet3D.h:54
 TPointSet3D.h:55
 TPointSet3D.h:56
 TPointSet3D.h:57
 TPointSet3D.h:58
 TPointSet3D.h:59
 TPointSet3D.h:60
 TPointSet3D.h:61
 TPointSet3D.h:62
 TPointSet3D.h:63