79 fName =
"TPolyMarker3D";
87 fName =
"TPolyMarker3D";
109 fName =
"TPolyMarker3D";
137 fName =
"TPolyMarker3D";
182 if (
fP)
delete []
fP;
226 const Int_t inaxis = 7;
235 if (px < puxmin - inaxis)
return dist;
236 if (py > puymin + inaxis)
return dist;
237 if (px > puxmax + inaxis)
return dist;
238 if (py < puymax - inaxis)
return dist;
241 if (!view)
return dist;
246 for (i=0;i<
Size();i++) {
250 if (u < gPad->GetUxmin() || u >
gPad->GetUxmax())
continue;
251 if (v < gPad->GetUymin() || v >
gPad->GetUymax())
continue;
252 x1 =
gPad->XtoAbsPixel(u);
253 y1 =
gPad->YtoAbsPixel(v);
256 if (dpoint < dist) dist = dpoint;
277 newpolymarker->
fN =
n;
293 if (
gPad->GetView())
gPad->GetView()->ExecuteRotateView(event, px, py);
302 std::cout <<
" TPolyMarker3D N=" <<
Size() <<
" Option="<<option<<std::endl;
321 npoints += pm->
Size();
333 for (
Int_t i = 0; i < np; i++) {
334 SetPoint(currPoint++, p[3*i], p[3*i+1], p[3*i+2]);
346 if (
Size() <= 0)
return;
361 if (!viewer3D)
return;
386 dlocal[0] = buffer.
fPnts[3*j];
387 dlocal[1] = buffer.
fPnts[3*j+1];
388 dlocal[2] = buffer.
fPnts[3*j+2];
390 buffer.
fPnts[3*j] = dmaster[0];
391 buffer.
fPnts[3*j+1] = dmaster[1];
392 buffer.
fPnts[3*j+2] = dmaster[2];
416 const Int_t kMaxEntry = 100000;
417 Int_t in, bin, binx, biny, binz;
426 bin = h->
GetBin(binx,biny,binz);
436 if (entry > kMaxEntry) scale = kMaxEntry/
Double_t(entry);
441 gPad->Range(-1,-1,1,1);
454 if (entry == 0)
return;
474 bin = h->
GetBin(binx,biny,binz);
476 for (in=0;in<ncounts;in++) {
495 printf(
"TPolyMarker3D N=%d, Option=%s\n",
fN,option);
501 printf(
" x[%d]=%g, y[%d]=%g, z[%d]=%g\n",i,
fP[3*i],i,
fP[3*i+1],i,
fP[3*i+2]);
516 out<<
" TPolyMarker3D *";
519 out<<
" pmarker3D->SetName("<<quote<<
GetName()<<quote<<
");"<<std::endl;
524 out<<
" pmarker3D->SetPoint("<<i<<
","<<
fP[3*i]<<
","<<
fP[3*i+1]<<
","<<
fP[3*i+2]<<
");"<<std::endl;
526 out<<
" pmarker3D->Draw();"<<std::endl;
560 if (!
fP || n >=
fN) {
594 if (
fP)
delete []
fP;
597 for (
Int_t i = 0; i <
fN; i++) {
599 fP[3*i+1] = p[3*i+1];
600 fP[3*i+2] = p[3*i+2];
624 if (
fP)
delete []
fP;
627 for (
Int_t i = 0; i <
fN; i++) {
641 void TPolyMarker3D::Streamer(
TBuffer &
b)
646 if (R__v > 2) b.
ClassBegin(TPolyMarker3D::IsA());
648 TObject::Streamer(b);
650 TAttMarker::Streamer(b);
662 if (R__v > 1)
fName.Streamer(b);
663 if (R__v > 2) b.
ClassEnd(TPolyMarker3D::IsA());
669 TObject::Streamer(b);
671 TAttMarker::Streamer(b);
694 if (n < 0 || n >=
Size())
return;
707 if (n < 0 || n >=
Size())
return;
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual void ClassBegin(const TClass *, Version_t=-1)=0
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual void Paint(Option_t *option="")
Paint a TPolyMarker3D.
static void PaintH3(TH1 *h, Option_t *option)
Paint 3-d histogram h with 3-d polymarkers.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
virtual void SetName(const char *name)
Change (i.e.
virtual ~TPolyMarker3D()
3-D polymarker destructor.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
Use this attribute class when an object should have 3D capabilities.
Buffer base class used for serializing objects.
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual void SetRange(const Double_t *min, const Double_t *max)=0
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
void ClearSectionsValid()
Clear any sections marked valid.
Short_t Min(Short_t a, Short_t b)
void ToLower()
Change string to lower-case.
TPolyMarker3D & operator=(const TPolyMarker3D &)
assignment operator
virtual UInt_t WriteVersion(const TClass *cl, Bool_t useBcnt=kFALSE)=0
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
if object in a list can be deleted
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void ClassMember(const char *, const char *=0, Int_t=-1, Int_t=-1)=0
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void Copy(TObject &object) const
Copy this to obj.
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual void Copy(TObject &polymarker) const
Copy polymarker to polymarker obj.
virtual Size_t GetMarkerSize() const
Return the marker size.
Abstract 3D shapes viewer.
virtual void SetPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="")
Re-initialize polymarker with n points from p.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream.
virtual void SaveMarkerAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t sizdef=1)
Save line attributes as C++ statement(s) on output stream out.
TPolyMarker3D()
3-D polymarker default constructor.
virtual void DrawPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="")
Draw this 3-D polymarker with new coordinates.
void SetSectionsValid(UInt_t mask)
virtual Double_t Rndm()
Machine independent random number generator.
virtual void Modify()
Change current marker attributes if necessary.
Bool_t SectionsValid(UInt_t mask) const
virtual void GetPoint(Int_t n, Float_t &x, Float_t &y, Float_t &z) const
Fills the parameters x, y, z with the coordinate of the n-th point n must be between 0 and Size() - 1...
Int_t GetLast() const
Return last bin on the axis i.e.
Class to manage histogram axis.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
Collection abstract base class.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t SetRawSizes(UInt_t reqPnts, UInt_t reqPntsCapacity, UInt_t reqSegs, UInt_t reqSegsCapacity, UInt_t reqPols, UInt_t reqPolsCapacity)
Set kRaw tessellation section of buffer with supplied sizes.
Generic 3D primitive description class.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a 3-D polymarker.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
virtual void SetByteCount(UInt_t cntpos, Bool_t packInVersion=kFALSE)=0
R__EXTERN TRandom * gRandom
virtual Int_t GetBin(Int_t binx, Int_t biny=0, Int_t binz=0) const
Return Global bin number corresponding to binx,y,z.
virtual void ReadFastArray(Bool_t *b, Int_t n)=0
virtual void Draw(Option_t *option="")
Draws 3-D polymarker with its current attributes.
virtual void WriteFastArray(const Bool_t *b, Int_t n)=0
if object destructor must call RecursiveRemove()
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
virtual void ls(Option_t *option="") const
List this 3-D polymarker.
virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
Set point following LastPoint to x, y, z.
static const double x1[5]
virtual const char * GetName() const
Returns name of object.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void Print(Option_t *option="") const
Print 3-D polymarker with its attributes on stdout.
static TView * CreateView(Int_t system=1, const Double_t *rmin=0, const Double_t *rmax=0)
Create a concrete default 3-d view via the plug-in manager.
Binding & operator=(OUT(*fun)(void))
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual void ClassEnd(const TClass *)=0
Short_t Max(Short_t a, Short_t b)
virtual Float_t * GetP() const
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
virtual Int_t Merge(TCollection *list)
Merge polymarkers in the collection in this polymarker.
virtual Color_t GetMarkerColor() const
Return the marker color.
Double_t Sqrt(Double_t x)
R__EXTERN TGeometry * gGeometry
constexpr Int_t kDimension
virtual void PadRange(Int_t rback)=0
virtual Int_t Size() const
TAxis * GetXaxis()
Get the behaviour adopted by the object about the statoverflows. See EStatOverflows for more informat...
virtual Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.