12#include "RConfigure.h"
119 for (i = 0; i < 3; i++) {
169 if (
gPad)
gPad->Range(-1, -1, 1, 1);
173 for (i = 0; i < 3; i++) {
199 fLatitude(
tv.fLatitude),
200 fLongitude(
tv.fLongitude),
207 fOutline(
tv.fOutline),
208 fDefaultOutline(
tv.fDefaultOutline),
209 fAutoRange(
tv.fAutoRange),
210 fChanged(
tv.fChanged)
212 for (
Int_t i=0; i<16; i++) {
218 for(
Int_t i=0; i<3; i++) {
228 for(
Int_t i=0; i<4; i++)
251 for(
Int_t i=0; i<16; i++) {
257 for(
Int_t i=0; i<3; i++) {
267 for(
Int_t i=0; i<4; i++)
311 { 2,3,4,1, 6,7,8,5 },
312 { 3,4,1,2, 7,8,5,6 },
313 { 1,2,3,4, 5,6,7,8 },
342 for (
Int_t i=0; i<8; ++i) {
589 for (i = 1; i <= 3; ++i) {
590 for (k = 1; k <= 4; ++k) {
608 for (i = 1; i <= 3; ++i) {
609 for (k = 1; k <= 4; ++k) {
610 tback[k + (i << 2)] =
tran[(i << 2) - 4]*
rota[(k << 2) - 4] +
611 tran[(i << 2) - 3]*
rota[(k << 2) - 3] +
tran[(i << 2) -2]
612 *
rota[(k << 2) - 2] +
tran[(i << 2) - 1]*
rota[(k <<2) - 1];
653 if (!
gPad->IsEditable())
return;
674 x =
gPad->PixeltoX(px);
675 y =
gPad->PixeltoY(py);
701 x =
gPad->PixeltoX(px);
702 y =
gPad->PixeltoY(py);
729 if (
gROOT->IsEscaped()) {
751 gPad->ReleaseViewer3D();
825 for (i = 1; i <=
kphi; ++i) {
830 if (
x1 >= 0 &&
x2 > 0)
continue;
831 if (
x1 <= 0 &&
x2 < 0)
continue;
837 Error(
"FindPhiSectors",
"something strange: num. of critical sector not equal 2");
892 for (i = 1; i <=
kth; ++i) {
897 if (
z1 >= 0 &&
z2 > 0)
continue;
898 if (
z1 <= 0 &&
z2 < 0)
continue;
904 Error(
"FindThetaSectors",
"Something strange: num. of critical sectors not equal 2");
938 for (
Int_t i = 0; i < 3; i++) {
984 }
else if (axis == 2) {
1004 if (
c <= 0)
return 9999;
1031 for (
Int_t i = 0; i < 3; max[i] =
fRmax[i], min[i] =
fRmin[i], i++) { }
1039 for (
Int_t i = 0; i < 3; max[i] =
fRmax[i], min[i] =
fRmin[i], i++) { }
1102 Double_t x,
y, z,
a1,
a2,
a3, b1, b2, b3,
c1,
c2,
c3;
1130 Double_t x,
y, z,
a1,
a2,
a3, b1, b2, b3,
c1,
c2,
c3;
1164 for (i = 1; i <= 2; ++i) {
1166 for (k = 1; k <= 3; ++k) {
1167 if (
fTnorm[k + (i << 2) - 5] < 0) {
1210 for (i = 1; i <= 8; ++i) {
1227 if (i % 2 == 0)
r2 = -
r2;
1239 for (
Int_t i=0;i<3;i++) {
1330 for (
Int_t i = 0; i < 3;
fRmax[i] = max[i],
fRmin[i] = min[i], i++) { }
1334 Error(
"SetRange",
"problem setting view");
1446 Error(
"ResetView",
"Error in min-max scope");
1485 for (
Int_t i=0; i<3; i++) {
1517 for (
Int_t i=0; i<3; i++) {
1626 for (i=0;i<3; i++) max[i] +=
maxSide - (max[i]-min[i]);
1640 for (i=0;i<3; i++) {
1641 if (max[i] > 0) min[i] = -max[i];
1642 else max[i] = -min[i];
1666 for (i=0;i<3; i++) {
1694 for (i=0; i<3; i++) {
1712 for (i=0; i<
nsteps; i++) {
1719 for (
j=0;
j<3;
j++) {
1741 if (count <= 0) count = 1;
1864 if (
R__b.IsReading()) {
1875 if (
R__b.GetParent() &&
R__b.GetVersionOwner() < 22500) {
1884 R__b.ReadStaticArray(sa);
for (i=0;i<12;i++)
fTN[i] = sa[i];
1885 R__b.ReadStaticArray(sa);
for (i=0;i<12;i++)
fTB[i] = sa[i];
1886 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fRmax[i] = sa[i];
1887 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fRmin[i] = sa[i];
1888 R__b.ReadStaticArray(sa);
for (i=0;i<12;i++)
fTnorm[i] = sa[i];
1889 R__b.ReadStaticArray(sa);
for (i=0;i<12;i++)
fTback[i] = sa[i];
1890 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fX1[i] = sa[i];
1891 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fX2[i] = sa[i];
1892 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fY1[i] = sa[i];
1893 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fY2[i] = sa[i];
1894 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fZ1[i] = sa[i];
1895 R__b.ReadStaticArray(sa);
for (i=0;i<3;i++)
fZ2[i] = sa[i];
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char x2
Option_t Option_t TPoint TPoint const char x1
Option_t Option_t TPoint TPoint const char y2
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t MoveWindow
Option_t Option_t TPoint TPoint const char y1
virtual void Streamer(TBuffer &)
static TAxis3D * ToggleRulers(TVirtualPad *pad=nullptr)
Turn ON / OFF the "Ruler", TAxis3D object attached to the current pad.
static TAxis3D * ToggleZoom(TVirtualPad *pad=nullptr)
Turn ON / OFF the "Ruler" and "zoom mode" of the TAxis3D object attached to the current pad (if pad =...
Buffer base class used for serializing objects.
void Delete(Option_t *option="") override=0
Delete this object.
void Paint(Option_t *option="") override
Paint all objects in this collection.
TObject & operator=(const TObject &rhs)
TObject assignment operator.
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.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
@ kMustCleanup
if object destructor must call RecursiveRemove()
static void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax)
Draw cube outline with 3d polylines.
TView3D()
Default constructor.
void NDCtoWC(const Float_t *pn, Float_t *pw) override
Transfer point from normalized to world coordinates.
void ToggleRulers(TVirtualPad *pad=nullptr) override
Turn on /off 3D axis.
void FindPhiSectors(Int_t iopt, Int_t &kphi, Double_t *aphi, Int_t &iphi1, Int_t &iphi2) override
Find critical PHI sectors.
void ZoomIn() override
Zoom in.
Int_t GetSystem() override
void ZoomOut() override
Zoom out.
void FindNormal(Double_t x, Double_t y, Double_t z, Double_t &zn) override
Find Z component of NORMAL in normalized coordinates.
TView3D & operator=(const TView3D &)
Assignment operator.
void ExecuteRotateView(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
void SetPerspective() override
Set perspective option.
Double_t GetPsi() override
void SetParallel() override
Set the parallel option (default).
void DrawOutlineCube(TList *outline, Double_t *rmin, Double_t *rmax) override
Draw the outline of a cube while rotating a 3-d object in the pad.
Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t &ratio) override
Return distance to axis from point px,py.
void ResetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep)
Set view direction (in spherical coordinates).
void FrontView(TVirtualPad *pad=nullptr) override
Set to front view.
void MoveFocus(Double_t *center, Double_t dx, Double_t dy, Double_t dz, Int_t nsteps=10, Double_t dlong=0, Double_t dlat=0, Double_t dpsi=0) override
Move focus to a different box position and extent in nsteps.
Bool_t IsPerspective() const override
void SetRange(const Double_t *min, const Double_t *max) override
Set Range function.
void Centered3DImages(TVirtualPad *pad=nullptr) override
Move view into the center of the scene.
void NormalWCtoNDC(const Float_t *pw, Float_t *pn) override
Transfer vector of NORMAL from word to normalized coordinates.
void FindScope(Double_t *scale, Double_t *center, Int_t &irep) override
Find centre of a MIN-MAX scope and scale factors.
void GetWindow(Double_t &u0, Double_t &v0, Double_t &du, Double_t &dv) const override
Get current window extent.
void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t &irep) override
Set view parameters.
void SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv) override
Set viewing window.
void GetRange(Float_t *min, Float_t *max) override
Get Range function.
void DefinePerspectiveView() override
Define perspective view.
void MoveViewCommand(Char_t chCode, Int_t count=1) override
void ToggleZoom(TVirtualPad *pad=nullptr) override
Turn on /off the interactive option to Zoom / Move / Change attributes of 3D axis correspond this vie...
~TView3D() override
TView3D default destructor.
Double_t GetExtent() const override
Get maximum view extent.
void AdjustScales(TVirtualPad *pad=nullptr) override
Adjust all sides of view in respect of the biggest one.
void ZoomView(TVirtualPad *pad=nullptr, Double_t zoomFactor=1.25) override
ZOOM this view.
void UnzoomView(TVirtualPad *pad=nullptr, Double_t unZoomFactor=1.25) override
unZOOM this view.
static void AdjustPad(TVirtualPad *pad=nullptr)
Force the current pad to be updated.
void WCtoNDC(const Float_t *pw, Float_t *pn) override
Transfer point from world to normalized coordinates.
Bool_t IsClippedNDC(Double_t *p) const override
Check if point is clipped in perspective view.
void SetAxisNDC(const Double_t *x1, const Double_t *x2, const Double_t *y1, const Double_t *y2, const Double_t *z1, const Double_t *z2) override
Store axis coordinates in the NDC system.
void PadRange(Int_t rback) override
Set the correct window size for lego and surface plots.
void ExecuteEvent(Int_t event, Int_t px, Int_t py) override
Execute action corresponding to one event.
void FindThetaSectors(Int_t iopt, Double_t phi, Int_t &kth, Double_t *ath, Int_t &ith1, Int_t &ith2) override
Find critical THETA sectors for given PHI sector.
void TopView(TVirtualPad *pad=nullptr) override
Set to top view.
void SetOutlineToCube() override
This is a function which creates default outline.
void MoveWindow(Char_t option) override
Move view window :
TSeqCollection * fOutline
void RotateView(Double_t phi, Double_t theta, TVirtualPad *pad=nullptr) override
API to rotate view and adjust the pad provided it the current one.
void ResizePad() override
Recompute window for perspective view.
void DefineViewDirection(const Double_t *s, const Double_t *c, Double_t cosphi, Double_t sinphi, Double_t costhe, Double_t sinthe, Double_t cospsi, Double_t sinpsi, Double_t *tnorm, Double_t *tback) override
Define view direction (in spherical coordinates)
void SideView(TVirtualPad *pad=nullptr) override
Set to side view.
void AxisVertex(Double_t ang, Double_t *av, Int_t &ix1, Int_t &ix2, Int_t &iy1, Int_t &iy2, Int_t &iz1, Int_t &iz2) override
Define axis vertices.
void SetDefaultWindow() override
Set default viewing window.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Abstract 3D shapes viewer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Double_t Sqrt(Double_t x)
Returns the square root of x.
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.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.