80 fName =
"TPolyMarker3D";
88 fName =
"TPolyMarker3D";
110 fName =
"TPolyMarker3D";
138 fName =
"TPolyMarker3D";
165 tp3.TPolyMarker3D::Copy(*
this);
175 if (
fP)
delete []
fP;
188 p.TPolyMarker3D::Copy(*
this);
223 const Int_t inaxis = 7;
232 if (px < puxmin - inaxis)
return dist;
233 if (py > puymin + inaxis)
return dist;
234 if (px > puxmax + inaxis)
return dist;
235 if (py < puymax - inaxis)
return dist;
238 if (!view)
return dist;
243 for (i=0;i<
Size();i++) {
247 if (u < gPad->GetUxmin() || u >
gPad->GetUxmax())
continue;
248 if (v < gPad->GetUymin() ||
v >
gPad->GetUymax())
continue;
249 x1 =
gPad->XtoAbsPixel(u);
250 y1 =
gPad->YtoAbsPixel(
v);
253 if (dpoint < dist) dist = dpoint;
274 newpolymarker->
fN =
n;
290 if (
gPad->GetView())
gPad->GetView()->ExecuteRotateView(
event, px, py);
299 std::cout <<
" TPolyMarker3D N=" <<
Size() <<
" Option="<<option<<std::endl;
315 Error(
"Add",
"Attempt to add object of class: %s to a %s",pm->
ClassName(),this->ClassName());
318 npoints += pm->
Size();
330 for (
Int_t i = 0; i < np; i++) {
343 if (
Size() <= 0)
return;
358 if (!viewer3D)
return;
383 dlocal[0] = buffer.
fPnts[3*j];
384 dlocal[1] = buffer.
fPnts[3*j+1];
385 dlocal[2] = buffer.
fPnts[3*j+2];
387 buffer.
fPnts[3*j] = dmaster[0];
388 buffer.
fPnts[3*j+1] = dmaster[1];
389 buffer.
fPnts[3*j+2] = dmaster[2];
413 const Int_t kMaxEntry = 100000;
414 Int_t in, bin, binx, biny, binz;
416 TAxis *xaxis =
h->GetXaxis();
417 TAxis *yaxis =
h->GetYaxis();
418 TAxis *zaxis =
h->GetZaxis();
423 bin =
h->GetBin(binx,biny,binz);
424 entry +=
h->GetBinContent(bin);
433 if (entry > kMaxEntry) scale = kMaxEntry/
Double_t(entry);
438 gPad->Range(-1,-1,1,1);
451 if (entry == 0)
return;
471 bin =
h->GetBin(binx,biny,binz);
472 ncounts =
Int_t(
h->GetBinContent(bin)*scale+0.5);
473 for (in=0;in<ncounts;in++) {
492 printf(
"TPolyMarker3D N=%d, Option=%s\n",
fN,option);
498 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]);
510 if (
gROOT->ClassSaved(TPolyMarker3D::Class())) {
513 out<<
" TPolyMarker3D *";
516 out<<
" pmarker3D->SetName("<<quote<<
GetName()<<quote<<
");"<<std::endl;
521 out<<
" pmarker3D->SetPoint("<<i<<
","<<
fP[3*i]<<
","<<
fP[3*i+1]<<
","<<
fP[3*i+2]<<
");"<<std::endl;
523 out<<
" pmarker3D->Draw();"<<std::endl;
557 if (!
fP ||
n >=
fN) {
591 if (
fP)
delete []
fP;
594 for (
Int_t i = 0; i <
fN; i++) {
596 fP[3*i+1] = p[3*i+1];
597 fP[3*i+2] = p[3*i+2];
621 if (
fP)
delete []
fP;
624 for (
Int_t i = 0; i <
fN; i++) {
638void TPolyMarker3D::Streamer(
TBuffer &
b)
643 if (R__v > 2)
b.ClassBegin(TPolyMarker3D::IsA());
644 if (R__v > 2)
b.ClassMember(
"TObject");
645 TObject::Streamer(
b);
646 if (R__v > 2)
b.ClassMember(
"TAttMarker");
647 TAttMarker::Streamer(
b);
648 if (R__v > 2)
b.ClassMember(
"fN",
"Int_t");
656 if (R__v > 2)
b.ClassMember(
"fOption",
"TString");
658 if (R__v > 2)
b.ClassMember(
"fName",
"TString");
659 if (R__v > 1)
fName.Streamer(
b);
660 if (R__v > 2)
b.ClassEnd(TPolyMarker3D::IsA());
661 b.CheckByteCount(R__s, R__c, TPolyMarker3D::IsA());
663 R__c =
b.WriteVersion(TPolyMarker3D::IsA(),
kTRUE);
664 b.ClassBegin(TPolyMarker3D::IsA());
665 b.ClassMember(
"TObject");
666 TObject::Streamer(
b);
667 b.ClassMember(
"TAttMarker");
668 TAttMarker::Streamer(
b);
669 b.ClassMember(
"fN",
"Int_t");
676 b.ClassMember(
"fOption",
"TString");
678 b.ClassMember(
"fName",
"TString");
680 b.ClassEnd(TPolyMarker3D::IsA());
681 b.SetByteCount(R__c,
kTRUE);
691 if (n < 0 || n >=
Size())
return;
704 if (n < 0 || n >=
Size())
return;
static const double x1[5]
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
R__EXTERN TGeometry * gGeometry
constexpr Int_t kDimension
R__EXTERN TRandom * gRandom
Use this attribute class when an object should have 3D capabilities.
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.
virtual void Modify()
Change current marker attributes if necessary.
virtual Style_t GetMarkerStyle() const
Return the marker style.
virtual void SetMarkerColor(Color_t mcolor=1)
Set the marker color.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void SetMarkerStyle(Style_t mstyle=1)
Set the marker style.
void Copy(TAttMarker &attmarker) const
Copy this marker attributes to a new TAttMarker.
virtual void SetMarkerSize(Size_t msize=1)
Set the marker size.
Class to manage histogram axis.
virtual Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
Int_t GetLast() const
Return last bin on the axis i.e.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
Int_t GetFirst() const
Return first bin on the axis i.e.
Generic 3D primitive description class.
Bool_t SectionsValid(UInt_t mask) const
void ClearSectionsValid()
Clear any sections marked valid.
void SetSectionsValid(UInt_t mask)
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.
Buffer base class used for serializing objects.
Collection abstract base class.
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
TH1 is the base class of all histogram classes in ROOT.
Mother of all ROOT objects.
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual const char * ClassName() const
Returns name of class to which the object belongs.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Copy(TObject &object) const
Copy this to obj.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kCanDelete
if object in a list can be deleted
@ kMustCleanup
if object destructor must call RecursiveRemove()
static void PaintH3(TH1 *h, Option_t *option)
Paint 3-d histogram h with 3-d polymarkers.
virtual Int_t Merge(TCollection *list)
Merge polymarkers in the collection in this polymarker.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream.
virtual void DrawPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="")
Draw this 3-D polymarker with new coordinates.
void SetPoint(Int_t n, Double_t x, Double_t y, Double_t z)
Set point n to x, y, z.
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...
virtual void SetPolyMarker(Int_t n, Float_t *p, Marker_t marker, Option_t *option="")
Re-initialize polymarker with n points from p.
virtual ~TPolyMarker3D()
3-D polymarker destructor.
virtual Int_t Size() const
virtual const char * GetName() const
Returns name of object.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetName(const char *name)
Change (i.e.
TPolyMarker3D & operator=(const TPolyMarker3D &)
assignment operator
virtual void Paint(Option_t *option="")
Paint a TPolyMarker3D.
virtual Float_t * GetP() const
virtual void Copy(TObject &polymarker) const
Copy polymarker to polymarker obj.
virtual Int_t SetNextPoint(Double_t x, Double_t y, Double_t z)
Set point following LastPoint to x, y, z.
virtual void Print(Option_t *option="") const
Print 3-D polymarker with its attributes on stdout.
virtual void ls(Option_t *option="") const
List this 3-D polymarker.
Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a 3-D polymarker.
virtual void Draw(Option_t *option="")
Draws 3-D polymarker with its current attributes.
TPolyMarker3D()
3-D polymarker default constructor.
static void IndentLevel()
Functions used by ls() to indent an object hierarchy.
virtual Double_t Rndm()
Machine independent random number generator.
void ToLower()
Change string to lower-case.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
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.
virtual void PadRange(Int_t rback)=0
virtual void SetRange(const Double_t *min, const Double_t *max)=0
Abstract 3D shapes viewer.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
Short_t Max(Short_t a, Short_t b)
Double_t Sqrt(Double_t x)
Short_t Min(Short_t a, Short_t b)