99 fRefObject(m3d.fRefObject)
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;
171 if (fRefObject) {
gPad->SetSelected(fRefObject);
return 0;}
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];
305 bin = h->
GetBin(ix,iy,iz);
307 if (w > wmax) wmax =
w;
308 if (w < wmin) wmin =
w;
316 gPad->Range(-1,-1,1,1);
345 bin = h->
GetBin(ix,iy,iz);
347 if (w == 0)
continue;
348 scale = (w-wmin)/(wmax-wmin);
349 m3.
SetPosition(0.5*(xmin+xmax),0.5*(ymin+ymax),0.5*(zmin+zmax));
350 m3.
SetSize(scale*(xmax-xmin),scale*(ymax-ymin),scale*(zmax-zmin));
366 out<<
" TMarker3DBox *";
368 out<<
"marker3DBox = new TMarker3DBox("<<fX<<
","
375 <<fPhi<<
");"<<std::endl;
380 out<<
" marker3DBox->Draw();"<<std::endl;
418 points[ 0] = -
fDx ; points[ 1] = -
fDy ; points[ 2] = -
fDz;
419 points[ 3] = -
fDx ; points[ 4] =
fDy ; points[ 5] = -
fDz;
420 points[ 6] =
fDx ; points[ 7] =
fDy ; points[ 8] = -
fDz;
421 points[ 9] =
fDx ; points[10] = -
fDy ; points[11] = -
fDz;
422 points[12] = -
fDx ; points[13] = -
fDy ; points[14] =
fDz;
423 points[15] = -
fDx ; points[16] =
fDy ; points[17] =
fDz;
424 points[18] =
fDx ; points[19] =
fDy ; points[20] =
fDz;
425 points[21] =
fDx ; points[22] = -
fDy ; points[23] =
fDz;
438 m[0] = costh * cosfi; m[1] = -sinfi; m[2] = sinth*cosfi;
439 m[3] = costh * sinfi; m[4] = cosfi; m[5] = sinth*sinfi;
440 m[6] = -sinth; m[7] = 0; m[8] = costh;
441 for (
Int_t i = 0; i < 8; i++) {
446 points[3*i] = fX + m[0] * x + m[1] * y + m[2] *
z;
447 points[3*i+1] = fY + m[3] * x + m[4] * y + m[5] *
z;
448 points[3*i+2] = fZ + m[6] * x + m[7] * y + m[8] *
z;
456 void TMarker3DBox::Streamer(
TBuffer &R__b)
466 TObject::Streamer(R__b);
467 TAttLine::Streamer(R__b);
468 TAttFill::Streamer(R__b);
470 TAtt3D::Streamer(R__b);
472 TAtt3D::Streamer(R__b);
Int_t GetFirst() const
Return first bin on the axis i.e.
virtual void SetRefObject(TObject *obj=0)
double dist(Rotation3D const &r1, Rotation3D const &r2)
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
virtual Double_t GetBinContent(Int_t bin) const
Return content of bin number bin.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
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 Double_t GetBinLowEdge(Int_t bin) const
Return low edge of bin.
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
void ClearSectionsValid()
Clear any sections marked valid.
virtual ~TMarker3DBox()
Marker3DBox shape default destructor.
virtual Double_t GetBinWidth(Int_t bin) const
Return bin width.
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.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
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 Int_t GetVersionOwner() const =0
virtual void Modify()
Change current fill area attributes if necessary.
virtual void Local2Master(Double_t *local, Double_t *master)
Convert one point from local system to master reference system.
virtual void SetPoints(Double_t *buff) const
Set points.
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.
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)
Class to manage histogram axis.
virtual Double_t GetBinUpEdge(Int_t bin) const
Return up edge of bin.
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 TestBit(UInt_t f) const
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 Color_t GetLineColor() const
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.
Int_t GetLast() const
Return last bin on the axis i.e.
Binding & operator=(OUT(*fun)(void))
Mother of all ROOT objects.
virtual Color_t GetMarkerColor() const
A special 3-D marker designed for event display.
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 Version_t ReadVersion(UInt_t *start=0, UInt_t *bcnt=0, const TClass *cl=0)=0
Bool_t SectionsValid(UInt_t mask) const