Logo ROOT  
Reference Guide
TPoints3DABC.h
Go to the documentation of this file.
1// @(#)root/g3d:$Id$
2// Author: Valery Fine(fine@mail.cern.ch) 24/04/99
3
4/*************************************************************************
5 * Copyright (C) 1995-2000, 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#ifndef ROOT_TPoints3DABC
12#define ROOT_TPoints3DABC
13
14
15//////////////////////////////////////////////////////////////////////////
16// //
17// TPoints3DABC //
18// //
19// Abstract class to define Arrays of 3D points //
20// //
21//////////////////////////////////////////////////////////////////////////
22
23#include "TObject.h"
24
25class TPoints3DABC : public TObject {
26
27public:
29 virtual ~TPoints3DABC(){;}
30
31 static Int_t DistancetoLine(Int_t px, Int_t py, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t lineWidth = 1 );
32
33 virtual Int_t Add(Float_t x, Float_t y, Float_t z);
34 virtual Int_t AddLast(Float_t x, Float_t y, Float_t z);
36 virtual Int_t GetLastPosition()const =0;
37 // GetN() returns the number of allocated cells if any.
38 // GetN() > 0 shows how many cells
39 // can be available via GetP() method.
40 // GetN() == 0 then GetP() must return 0 as well
41 virtual Int_t GetN() const;
42 virtual Float_t *GetP() const;
43 virtual Float_t GetX(Int_t idx) const =0;
44 virtual Float_t GetY(Int_t idx) const =0;
45 virtual Float_t GetZ(Int_t idx) const =0;
46 virtual Float_t *GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1) const;
47 virtual const Float_t *GetXYZ(Int_t idx) =0;
48 virtual Option_t *GetOption() const =0;
49 virtual void PaintPoints(Int_t n, Float_t *p,Option_t *option="") =0;
50 virtual Int_t SetLastPosition(Int_t idx)=0;
52 virtual void SetOption(Option_t *option="")=0;
53 virtual Int_t SetPoint(Int_t point, Float_t x, Float_t y, Float_t z)=0;
54 virtual Int_t SetPoints(Int_t n, Float_t *p=0, Option_t *option="") =0;
55 virtual Int_t Size() const =0;
56
57 ClassDef(TPoints3DABC,0) //A 3-D Points
58};
59
60#endif
static const double x2[5]
static const double x1[5]
int Int_t
Definition: RtypesCore.h:41
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
#define ClassDef(name, id)
Definition: Rtypes.h:326
Mother of all ROOT objects.
Definition: TObject.h:37
Abstract class to define Arrays of 3D points.
Definition: TPoints3DABC.h:25
virtual Float_t GetX(Int_t idx) const =0
virtual Int_t AddLast(Float_t x, Float_t y, Float_t z)
Add one 3D point defined by x,y,z to the array of the points as its last element.
virtual Int_t SetNextPoint(Float_t x, Float_t y, Float_t z)
Add one 3D point defined by x,y,z to the array of the points as its last element.
static Int_t DistancetoLine(Int_t px, Int_t py, Float_t x1, Float_t y1, Float_t x2, Float_t y2, Int_t lineWidth=1)
Compute distance from point px,py to an axis of the band defined.
virtual void SetOption(Option_t *option="")=0
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)=0
Computes distance from point (px,py) to the object.
virtual Int_t SetPoints(Int_t n, Float_t *p=0, Option_t *option="")=0
virtual Float_t * GetXYZ(Float_t *xyz, Int_t idx, Int_t num=1) const
GetXYZ(Float_t *xyz,Int_t idx,Int_t num=1) fills the buffer supplied by the calling code with the poi...
virtual Int_t SetLastPosition(Int_t idx)=0
virtual Float_t GetZ(Int_t idx) const =0
virtual Int_t GetN() const
GetN() returns the number of allocated cells if any.
virtual Int_t Size() const =0
virtual ~TPoints3DABC()
Definition: TPoints3DABC.h:29
virtual Float_t * GetP() const
GetP() returns the pointer to the float point array of points if available The number of the availabl...
virtual Int_t SetPoint(Int_t point, Float_t x, Float_t y, Float_t z)=0
virtual const Float_t * GetXYZ(Int_t idx)=0
virtual Int_t Add(Float_t x, Float_t y, Float_t z)
Add one 3D point defined by x,y,z to the array of the points as its last element.
virtual void PaintPoints(Int_t n, Float_t *p, Option_t *option="")=0
virtual Float_t GetY(Int_t idx) const =0
virtual Int_t GetLastPosition() const =0
virtual Option_t * GetOption() const =0
Double_t y[n]
Definition: legend1.C:17
Double_t x[n]
Definition: legend1.C:17
const Int_t n
Definition: legend1.C:16