108 TAttLine::operator=(m3d);
109 TAttFill::operator=(m3d);
110 TAtt3D::operator=(m3d);
140 const Int_t numPoints = 8;
145 if (!view)
return dist;
146 const Int_t seg1[12] = {0,1,2,3,4,5,6,7,0,1,2,3};
147 const Int_t seg2[12] = {1,2,3,0,5,6,7,4,4,5,6,7};
151 Int_t i, i1, i2, dsegment;
154 for (i = 0; i < 12; i++) {
165 if (dsegment < dist) dist = dsegment;
183 if (
gPad->GetView())
gPad->GetView()->ExecuteRotateView(event, px, py);
200 buffer.
fID =
nullptr;
211 if (!viewer3D)
return;
221 if (!buffer.
SetRawSizes(nbPnts, 3*nbPnts, nbSegs, 3*nbSegs, nbPols, 6*nbPols)) {
236 dlocal[0] = buffer.
fPnts[3*j];
237 dlocal[1] = buffer.
fPnts[3*j+1];
238 dlocal[2] = buffer.
fPnts[3*j+2];
239 gGeometry->Local2Master(&dlocal[0],&dmaster[0]);
240 buffer.
fPnts[3*j] = dmaster[0];
241 buffer.
fPnts[3*j+1] = dmaster[1];
242 buffer.
fPnts[3*j+2] = dmaster[2];
294 TAxis *xaxis =
h->GetXaxis();
295 TAxis *yaxis =
h->GetYaxis();
296 TAxis *zaxis =
h->GetZaxis();
298 wmin =
h->GetMinimum();
299 wmax =
h->GetMaximum();
304 gPad->Range(-1,-1,1,1);
324 for (ix=xaxis->
GetFirst();ix<=xaxis->GetLast();ix++) {
325 xmin =
h->GetXaxis()->GetBinLowEdge(ix);
326 xmax =
xmin +
h->GetXaxis()->GetBinWidth(ix);
327 for (iy=yaxis->
GetFirst();iy<=yaxis->GetLast();iy++) {
328 ymin =
h->GetYaxis()->GetBinLowEdge(iy);
329 ymax =
ymin +
h->GetYaxis()->GetBinWidth(iy);
330 for (iz=zaxis->
GetFirst();iz<=zaxis->GetLast();iz++) {
331 zmin =
h->GetZaxis()->GetBinLowEdge(iz);
332 zmax = zmin +
h->GetZaxis()->GetBinWidth(iz);
333 bin =
h->GetBin(ix,iy,iz);
334 w =
h->GetBinContent(bin);
335 if (w < wmin)
continue;
336 if (w > wmax) w = wmax;
338 if (scale == 0)
continue;
353 TString::Format(
"%g, %g, %g, %g, %g, %g, %g, %g",
fX,
fY,
fZ,
fDx,
fDy,
fDz,
fTheta,
fPhi));
416 m[0] = costh * cosfi;
m[1] = -sinfi;
m[2] = sinth*cosfi;
417 m[3] = costh * sinfi;
m[4] = cosfi;
m[5] = sinth*sinfi;
418 m[6] = -sinth;
m[7] = 0;
m[8] = costh;
419 for (
Int_t i = 0; i < 8; i++) {
int Int_t
Signed integer 4 bytes (int).
short Version_t
Class version identifier (short).
unsigned int UInt_t
Unsigned integer 4 bytes (unsigned int).
double Double_t
Double 8 bytes.
float Float_t
Float 4 bytes (float).
const char Option_t
Option string (const char).
externTGeometry * gGeometry
virtual void Streamer(TBuffer &)
virtual void Streamer(TBuffer &)
virtual void SaveFillAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1001)
virtual void Streamer(TBuffer &)
virtual Color_t GetLineColor() const
Return the line color.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Int_t DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
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 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.
virtual Version_t ReadVersion(UInt_t *start=nullptr, UInt_t *bcnt=nullptr, const TClass *cl=nullptr)=0
virtual Int_t CheckByteCount(UInt_t startpos, UInt_t bcnt, const TClass *clss)=0
virtual Int_t ReadClassBuffer(const TClass *cl, void *pointer, const TClass *onfile_class=nullptr)=0
virtual Int_t WriteClassBuffer(const TClass *cl, void *pointer)=0
TH1 is the base class of all histogram classes in ROOT.
virtual void SetPoints(Double_t *buff) const
Set points.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
virtual void SetSize(Float_t dx, Float_t dy, Float_t dz)
Set size.
TMarker3DBox & operator=(const TMarker3DBox &)
assignment operator
Int_t DistancetoPrimitive(Int_t px, Int_t py) override
Compute distance from point px,py to a Marker3DBox.
static void PaintH3(TH1 *h, Option_t *option)
Paint 3-d histogram h with marker3dboxes.
~TMarker3DBox() override
Marker3DBox shape default destructor.
TClass * IsA() const override
void Paint(Option_t *option) override
Paint marker 3D box.
virtual void SetDirection(Float_t theta, Float_t phi)
Set direction.
virtual void SetPosition(Float_t x, Float_t y, Float_t z)
Set position.
TMarker3DBox()
Marker3DBox default constructor.
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
virtual void SetRefObject(TObject *obj=nullptr)
void Streamer(TBuffer &) override
Stream an object of class TMarker3DBox.
TMarker3DBox(const TMarker3DBox &)
copy constructor
TObject & operator=(const TObject &rhs) noexcept
TObject assignment operator.
Bool_t TestBit(UInt_t f) const
virtual void Streamer(TBuffer &)
Stream an object of class TObject.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
static void SavePrimitiveDraw(std::ostream &out, const char *variable_name, Option_t *option=nullptr)
Save invocation of primitive Draw() method Skipped if option contains "nodraw" string.
TObject()
TObject constructor.
static void SavePrimitiveConstructor(std::ostream &out, TClass *cl, const char *variable_name, const char *constructor_agrs="", Bool_t empty_line=kTRUE)
Save object constructor in the output stream "out".
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)=0
static TView * CreateView(Int_t system=1, const Double_t *rmin=nullptr, const Double_t *rmax=nullptr)
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=nullptr)=0
LongDouble_t Power(LongDouble_t x, LongDouble_t y)
Returns x raised to the power y.
Double_t Cos(Double_t)
Returns the cosine of an angle of x radians.
Double_t Sin(Double_t)
Returns the sine of an angle of x radians.