12 #ifndef ROOT_TEvePointSet
13 #define ROOT_TEvePointSet
31 class TEvePointSet :
public TEveElement,
33 public TEvePointSelectorConsumer,
34 public TEveProjectable,
37 friend class TEvePointSetArray;
40 TEvePointSet& operator=(
const TEvePointSet&);
45 Int_t fIntIdsPerPoint;
47 void AssertIntIdsSize();
50 TEvePointSet(Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
51 TEvePointSet(
const char* name, Int_t n_points=0, ETreeVarType_e tv_type=kTVT_XYZ);
52 TEvePointSet(
const TEvePointSet& e);
53 virtual ~TEvePointSet();
55 virtual TObject* GetObject(
const TEveException&)
const
56 {
const TObject* obj =
this;
return const_cast<TObject*
>(obj); }
58 virtual TEvePointSet* CloneElement()
const {
return new TEvePointSet(*
this); }
60 virtual void ClonePoints(
const TEvePointSet& e);
62 void Reset(Int_t n_points=0, Int_t n_int_ids=0);
63 Int_t GrowFor(Int_t n_points);
65 virtual const char* GetTitle()
const {
return fTitle; }
66 virtual const char* GetElementName()
const {
return TPointSet3D::GetName(); }
67 virtual const char* GetElementTitle()
const {
return fTitle; }
68 virtual void SetElementName (
const char* n) { fName = n; NameTitleChanged(); }
69 virtual void SetTitle(
const char* t) { fTitle = t; NameTitleChanged(); }
70 virtual void SetElementTitle(
const char* t) { fTitle = t; NameTitleChanged(); }
71 virtual void SetElementNameTitle(
const char* n,
const char* t)
72 { fName = n; fTitle = t; NameTitleChanged(); }
74 Int_t GetIntIdsPerPoint()
const {
return fIntIdsPerPoint; }
75 Int_t* GetPointIntIds(Int_t p)
const;
76 Int_t GetPointIntId(Int_t p, Int_t i)
const;
78 void SetPointIntIds(Int_t* ids);
79 void SetPointIntIds(Int_t n, Int_t* ids);
81 virtual void SetMarkerColor(Color_t col) { SetMainColor(col); }
82 virtual void SetMarkerStyle(Style_t mstyle=1);
83 virtual void SetMarkerSize(Size_t msize=1);
85 virtual void Paint(Option_t* option=
"");
87 virtual void InitFill(Int_t subIdNum);
88 virtual void TakeAction(TEvePointSelector*);
90 virtual void PointSelected(Int_t
id);
92 virtual const TGPicture* GetListTreeIcon(Bool_t open=kFALSE);
94 virtual void CopyVizParams(
const TEveElement* el);
95 virtual void WriteVizParams(std::ostream& out,
const TString& var);
97 virtual TClass* ProjectedClass(
const TEveProjection* p)
const;
99 ClassDef(TEvePointSet, 0);
107 class TEvePointSetArray :
public TEveElement,
110 public TEvePointSelectorConsumer
112 friend class TEvePointSetArrayEditor;
114 TEvePointSetArray(
const TEvePointSetArray&);
115 TEvePointSetArray& operator=(
const TEvePointSetArray&);
118 TEvePointSet **fBins;
119 Int_t fDefPointSetCapacity;
122 Double_t fMin, fCurMin;
123 Double_t fMax, fCurMax;
128 TEvePointSetArray(
const char* name=
"TEvePointSetArray",
const char* title=
"");
129 virtual ~TEvePointSetArray();
131 virtual void RemoveElementLocal(TEveElement* el);
132 virtual void RemoveElementsLocal();
134 virtual void SetMarkerColor(Color_t tcolor=1);
135 virtual void SetMarkerStyle(Style_t mstyle=1);
136 virtual void SetMarkerSize(Size_t msize=1);
138 virtual void TakeAction(TEvePointSelector*);
140 virtual Int_t Size(Bool_t under=kFALSE, Bool_t over=kFALSE)
const;
142 void InitBins(
const char* quant_name, Int_t nbins, Double_t min, Double_t max);
143 Bool_t Fill(Double_t x, Double_t y, Double_t z, Double_t quant);
144 void SetPointId(TObject*
id);
147 void SetOwnIds(Bool_t o);
149 Int_t GetDefPointSetCapacity()
const {
return fDefPointSetCapacity; }
150 void SetDefPointSetCapacity(Int_t c) { fDefPointSetCapacity = c; }
152 Int_t GetNBins()
const {
return fNBins; }
153 TEvePointSet* GetBin(Int_t bin)
const {
return fBins[bin]; }
155 Double_t GetMin()
const {
return fMin; }
156 Double_t GetCurMin()
const {
return fCurMin; }
157 Double_t GetMax()
const {
return fMax; }
158 Double_t GetCurMax()
const {
return fCurMax; }
160 void SetRange(Double_t min, Double_t max);
162 ClassDef(TEvePointSetArray, 0);
170 class TEvePointSetProjected :
public TEvePointSet,
174 TEvePointSetProjected(
const TEvePointSetProjected&);
175 TEvePointSetProjected& operator=(
const TEvePointSetProjected&);
178 virtual void SetDepthLocal(Float_t d);
181 TEvePointSetProjected();
182 virtual ~TEvePointSetProjected() {}
184 virtual void SetProjection(TEveProjectionManager* proj, TEveProjectable* model);
185 virtual void UpdateProjection();
186 virtual TEveElement* GetProjectedAsElement() {
return this; }
188 virtual void PointSelected(Int_t
id);
191 ClassDef(TEvePointSetProjected, 0);