142 const Int_t numPoints = 8;
147 if (!view)
return dist;
148 const Int_t seg1[12] = {0,1,2,3,4,5,6,7,0,1,2,3};
149 const Int_t seg2[12] = {1,2,3,0,5,6,7,4,4,5,6,7};
153 Int_t i, i1, i2, dsegment;
156 for (i = 0; i < 12; i++) {
158 view->
WCtoNDC(&points[i1], xndc);
163 view->
WCtoNDC(&points[i2], xndc);
167 if (dsegment < dist) dist = dsegment;
185 if (
gPad->GetView())
gPad->GetView()->ExecuteRotateView(event, px, py);
213 if (!viewer3D)
return;
223 if (!buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
238 dlocal[0] = buffer.
fPnts[3*j];
239 dlocal[1] = buffer.
fPnts[3*j+1];
240 dlocal[2] = buffer.
fPnts[3*j+2];
242 buffer.
fPnts[3*j] = dmaster[0];
243 buffer.
fPnts[3*j+1] = dmaster[1];
244 buffer.
fPnts[3*j+2] = dmaster[2];
306 gPad->Range(-1,-1,1,1);
335 bin = h->
GetBin(ix,iy,iz);
337 if (w < wmin)
continue;
338 if (w > wmax) w = wmax;
340 if (scale == 0)
continue;
341 m3.
SetPosition(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax));
342 m3.
SetSize(scale*(xmax-xmin),scale*(ymax-ymin),scale*(zmax-zmin));
358 out<<
" TMarker3DBox *";
360 out<<
"marker3DBox = new TMarker3DBox("<<
fX<<
"," 367 <<
fPhi<<
");"<<std::endl;
372 out<<
" marker3DBox->Draw();"<<std::endl;
410 points[ 0] = -
fDx ; points[ 1] = -
fDy ; points[ 2] = -
fDz;
411 points[ 3] = -
fDx ; points[ 4] =
fDy ; points[ 5] = -
fDz;
412 points[ 6] =
fDx ; points[ 7] =
fDy ; points[ 8] = -
fDz;
413 points[ 9] =
fDx ; points[10] = -
fDy ; points[11] = -
fDz;
414 points[12] = -
fDx ; points[13] = -
fDy ; points[14] =
fDz;
415 points[15] = -
fDx ; points[16] =
fDy ; points[17] =
fDz;
416 points[18] =
fDx ; points[19] =
fDy ; points[20] =
fDz;
417 points[21] =
fDx ; points[22] = -
fDy ; points[23] =
fDz;
430 m[0] = costh * cosfi; m[1] = -sinfi; m[2] = sinth*cosfi;
431 m[3] = costh * sinfi; m[4] = cosfi; m[5] = sinth*sinfi;
432 m[6] = -sinth; m[7] = 0; m[8] = costh;
433 for (
Int_t i = 0; i < 8; i++) {
438 points[3*i] =
fX + m[0] * x + m[1] * y + m[2] *
z;
439 points[3*i+1] =
fY + m[3] * x + m[4] * y + m[5] *
z;
440 points[3*i+2] =
fZ + m[6] * x + m[7] * y + m[8] *
z;
448 void TMarker3DBox::Streamer(
TBuffer &R__b)
458 TObject::Streamer(R__b);
459 TAttLine::Streamer(R__b);
460 TAttFill::Streamer(R__b);
461 TAtt3D::Streamer(R__b);
virtual void SetRefObject(TObject *obj=0)
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual Double_t GetMaximum(Double_t maxval=FLT_MAX) const
Return maximum value smaller than maxval of bins in the range, unless the value has been overridden b...
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
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.
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Compute distance from point px,py to a Marker3DBox.
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.
virtual ~TMarker3DBox()
Marker3DBox shape default destructor.
virtual void Modify()
Change current line attributes if necessary.
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Execute action corresponding to one event.
virtual void SetDirection(Float_t theta, Float_t phi)
Set direction.
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
static const double x2[5]
Fill Area Attributes class.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual void Modify()
Change current fill area attributes if necessary.
static constexpr double m3
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
Abstract 3D shapes viewer.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
void SetSectionsValid(UInt_t mask)
static void PaintH3(TH1 *h, Option_t *option)
Paint 3-d histogram h with marker3dboxes.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Bool_t SectionsValid(UInt_t mask) const
Int_t GetLast() const
Return last bin on the axis i.e.
Class to manage histogram axis.
virtual Int_t AddObject(const TBuffer3D &buffer, Bool_t *addChildren=0)=0
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
Save fill attributes as C++ statement(s) on output stream out.
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.
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 Double_t GetMinimum(Double_t minval=-FLT_MAX) const
Return minimum value larger than minval of bins in the range, unless the value has been overridden by...
virtual Color_t GetLineColor() const
Return the line color.
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=0)=0
TMarker3DBox & operator=(const TMarker3DBox &)
assignment operator
static const double x1[5]
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
Compute distance from point px,py to a line.
virtual void Paint(Option_t *option)
Paint marker 3D box.
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.
A special 3-D marker designed for event display.
TMarker3DBox()
Marker3DBox default constructor.
virtual Color_t GetMarkerColor() const
Return the marker color.
virtual void SetPosition(Float_t x, Float_t y, Float_t z)
Set position.
virtual void SetSize(Float_t dx, Float_t dy, Float_t dz)
Set size.
R__EXTERN TGeometry * gGeometry
virtual void PadRange(Int_t rback)=0
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
virtual void SetPoints(Double_t *buff) const
Set points.
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