ROOT » GRAF3D » G3D » TView3D

class TView3D: public TView


The 3D view class

This package was originally written by Evgueni Tcherniaev from IHEP/Protvino.

The original Fortran implementation was adapted to HIGZ/PAW by Olivier Couet and Evgueni Tcherniaev.

This View class is a subset of the original system. It has been converted to a C++ class by Rene Brun.

TView3D creates a 3-D view in the current pad. In this 3D view Lego and Surface plots can be drawn and also 3D polyline and markers. Most of the time a TView3D is created automatically when a 3D object needs to be painted in a pad (for instance a Lego or a Surface plot).

In some case a TView3D should be explicitly. For instance to paint a 3D simple scene composed of simple objects like polylines and polymarkers. The following macro gives an example:

{
   cV3D = new TCanvas("cV3D","PolyLine3D & PolyMarker3D Window",200,10,500,500);

   // Creating a view
   TView3D *view = (TView3D*) TView::CreateView(1);
   view->SetRange(5,5,5,25,25,25);

   // Create a first PolyLine3D
   TPolyLine3D *pl3d1 = new TPolyLine3D(5);
   pl3d1->SetPoint(0, 10, 10, 10);
   pl3d1->SetPoint(1, 15, 15, 10);
   pl3d1->SetPoint(2, 20, 15, 15);
   pl3d1->SetPoint(3, 20, 20, 20);
   pl3d1->SetPoint(4, 10, 10, 20);

   // Create a first PolyMarker3D
   TPolyMarker3D *pm3d1 = new TPolyMarker3D(12);
   pm3d1->SetPoint(0, 10, 10, 10);
   pm3d1->SetPoint(1, 11, 15, 11);
   pm3d1->SetPoint(2, 12, 15, 9);
   pm3d1->SetPoint(3, 13, 17, 20);
   pm3d1->SetPoint(4, 14, 16, 15);
   pm3d1->SetPoint(5, 15, 20, 15);
   pm3d1->SetPoint(6, 16, 18, 10);
   pm3d1->SetPoint(7, 17, 15, 10);
   pm3d1->SetPoint(8, 18, 22, 15);
   pm3d1->SetPoint(9, 19, 28, 25);
   pm3d1->SetPoint(10, 20, 12, 15);
   pm3d1->SetPoint(11, 21, 12, 15);
   pm3d1->SetMarkerSize(2);
   pm3d1->SetMarkerColor(4);
   pm3d1->SetMarkerStyle(2);

   // Draw
   pl3d1->Draw();
   pm3d1->Draw();
}

Several coordinate systems are available:
  • Cartesian
  • Polar
  • Cylindrical
  • Spherical
  • PseudoRapidity/Phi
 

Function Members (Methods)

public:
virtual~TView3D()
voidTObject::AbstractMethod(const char* method) const
static voidAdjustPad(TVirtualPad* pad = 0)
virtual voidAdjustScales(TVirtualPad* pad = 0)MENU
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidAxisVertex(Double_t ang, Double_t* av, Int_t& ix1, Int_t& ix2, Int_t& iy1, Int_t& iy2, Int_t& iz1, Int_t& iz2)
virtual voidTObject::Browse(TBrowser* b)
virtual voidCentered()MENU
virtual voidCentered3DImages(TVirtualPad* pad = 0)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
static TView*TView::CreateView(Int_t system = 1, const Double_t* rmin = 0, const Double_t* rmax = 0)
virtual voidDefinePerspectiveView()
virtual voidDefineViewDirection(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)
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidDrawOutlineCube(TList* outline, Double_t* rmin, Double_t* rmax)
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidExecuteRotateView(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidFindNormal(Double_t x, Double_t y, Double_t z, Double_t& zn)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual voidFindPhiSectors(Int_t iopt, Int_t& kphi, Double_t* aphi, Int_t& iphi1, Int_t& iphi2)
virtual voidFindScope(Double_t* scale, Double_t* center, Int_t& irep)
virtual voidFindThetaSectors(Int_t iopt, Double_t phi, Int_t& kth, Double_t* ath, Int_t& ith1, Int_t& ith2)
virtual voidFront()MENU
virtual voidFrontView(TVirtualPad* pad = 0)
virtual Bool_tGetAutoRange()
virtual Int_tGetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t& ratio)
virtual Double_tGetDproj() const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Double_tGetDview() const
virtual Double_tGetExtent() const
virtual const char*TObject::GetIconName() const
virtual Double_tGetLatitude()
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
virtual Double_tGetLongitude()
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual TSeqCollection*GetOutline()
virtual Double_tGetPsi()
virtual voidGetRange(Float_t* min, Float_t* max)
virtual voidGetRange(Double_t* min, Double_t* max)
virtual Double_t*GetRmax()
virtual Double_t*GetRmin()
virtual Int_tGetSystem()
virtual Double_t*GetTback()
virtual const char*TObject::GetTitle() const
virtual Double_t*GetTN()
virtual Double_t*GetTnorm()
virtual UInt_tTObject::GetUniqueID() const
virtual voidGetWindow(Double_t& u0, Double_t& v0, Double_t& du, Double_t& dv) const
virtual Double_tGetWindowHeight() const
virtual Double_tGetWindowWidth() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tIsClippedNDC(Double_t* p) const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tIsPerspective() const
virtual Bool_tTObject::IsSortable() const
virtual Bool_tIsViewChanged() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttLine::Modify()
virtual voidMoveFocus(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)
virtual voidMoveViewCommand(Char_t chCode, Int_t count = 1)
virtual voidMoveWindow(Char_t option)
virtual voidNDCtoWC(const Float_t* pn, Float_t* pw)
virtual voidNDCtoWC(const Double_t* pn, Double_t* pw)
virtual voidNormalWCtoNDC(const Float_t* pw, Float_t* pn)
virtual voidNormalWCtoNDC(const Double_t* pw, Double_t* pn)
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
virtual voidPadRange(Int_t rback)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
voidTObject::ResetBit(UInt_t f)
virtual voidResizePad()
virtual voidRotateView(Double_t phi, Double_t theta, TVirtualPad* pad = 0)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidSetAutoRange(Bool_t autorange = kTRUE)
virtual voidSetAxisNDC(const Double_t* x1, const Double_t* x2, const Double_t* y1, const Double_t* y2, const Double_t* z1, const Double_t* z2)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetDefaultWindow()
virtual voidSetDproj(Double_t dproj)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidSetDview(Double_t dview)
virtual voidSetLatitude(Double_t latitude)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidSetLongitude(Double_t longitude)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidSetOutlineToCube()
virtual voidSetParallel()MENU
virtual voidSetPerspective()MENU
virtual voidSetPsi(Double_t psi)
virtual voidSetRange(const Double_t* min, const Double_t* max)
virtual voidSetRange(Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag = 0)
virtual voidSetSystem(Int_t system)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidSetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t& irep)
virtual voidSetViewChanged(Bool_t flag = kTRUE)
virtual voidSetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv)
virtual voidShowAxis()MENU
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidSide()MENU
virtual voidSideView(TVirtualPad* pad = 0)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidToggleRulers(TVirtualPad* pad = 0)
virtual voidToggleZoom(TVirtualPad* pad = 0)
virtual voidTop()MENU
virtual voidTopView(TVirtualPad* pad = 0)
TView3D()
TView3D(Int_t system, const Double_t* rmin, const Double_t* rmax)
virtual voidUnZoom()MENU
virtual voidUnzoomView(TVirtualPad* pad = 0, Double_t unZoomFactor = 1.25)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual voidWCtoNDC(const Float_t* pw, Float_t* pn)
virtual voidWCtoNDC(const Double_t* pw, Double_t* pn)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidZoom()MENU
virtual voidZoomIn()MENU
virtual voidZoomMove()MENU
virtual voidZoomOut()MENU
virtual voidZoomView(TVirtualPad* pad = 0, Double_t zoomFactor = 1.25)
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()
TView3D&operator=(const TView3D&)
voidResetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t& irep)
TView3D(const TView3D&)

Data Members

public:
static TObject::<anonymous>TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::<anonymous>TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TObject::EStatusBitsTObject::kMustCleanup
static TObject::EStatusBitsTObject::kNoContextMenu
static TObject::<anonymous>TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::<anonymous>TObject::kOverwrite
static TView3D::<anonymous>kPerspective
static TObject::<anonymous>TObject::kSingleKey
static TObject::<anonymous>TObject::kWriteDelete
static TObject::<anonymous>TObject::kZombie
protected:
Bool_tfAutoRangeSet to TRUE if range computed automatically
Bool_tfChanged! Set to TRUE after ExecuteRotateView
Bool_tfDefaultOutlineSet to TRUE if outline is default cube
Double_tfDprojDistance from COP to projection plane
Double_tfDviewDistance from COP to COV
Double_tfLatitudeView angle latitude
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Double_tfLongitudeView angle longitude
TSeqCollection*fOutlineCollection of outline's objects
Double_tfPsiView angle psi
Double_tfRmax[3]Upper limits of object
Double_tfRmin[3]Lower limits of object
Int_tfSystemCoordinate system
Double_tfTB[16]
Double_tfTN[16]
Double_tfTback[16]Back transformation matrix
Double_tfTnorm[16]Transformation matrix
Double_tfUVcoord[4]Viewing window limits
Double_tfUpixpad X size in pixels
Double_tfVpixpad Y size in pixels
Double_tfX1[3]First coordinate of X axis
Double_tfX2[3]Second coordinate of X axis
Double_tfY1[3]First coordinate of Y axis
Double_tfY2[3]Second coordinate of Y axis
Double_tfZ1[3]First coordinate of Z axis
Double_tfZ2[3]Second coordinate of Z axis

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TView3D()
 Default constructor
TView3D(Int_t system, const Double_t* rmin, const Double_t* rmax)
 TView3D constructor

  Creates a 3-D view in the current pad
  rmin[3], rmax[3] are the limits of the object depending on
  the selected coordinate system

  Before drawing a 3-D object in a pad, a 3-D view must be created.
  Note that a view is automatically created when drawing legos or surfaces.

  The coordinate system is selected via system:
   system = 1  Cartesian
   system = 2  Polar
   system = 3  Cylindrical
   system = 4  Spherical
   system = 5  PseudoRapidity/Phi
TView3D(const TView3D& )
 Copy constructor.
TView3D& operator=(const TView3D& )
 Assignment operator.
~TView3D()
 TView3D default destructor.
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)
 Define axis vertices.

    Input  ANG     - angle between X and Y axis

    Output: AV(3,8) - axis vertices
            IX1     - 1st point of X-axis
            IX2     - 2nd point of X-axis
            IY1     - 1st point of Y-axis
            IY2     - 2nd point of Y-axis
            IZ1     - 1st point of Z-axis
            IZ2     - 2nd point of Z-axis


                     8                        6
                    / \                      /|\
                 5 /   \ 7                5 / | \ 7
                  |\   /|                  |  |  |
      THETA < 90  | \6/ |     THETA > 90   | /2\ |
      (Top view)  |  |  |   (Bottom view)  |/   \|
                 1 \ | /3                 1 \   /3
                    \|/                      \ /
                     2                        4

void DefinePerspectiveView()
 Define perspective view.

 Compute transformation matrix from world coordinates
 to normalised coordinates (-1 to +1)
   Input :
      theta, phi - spherical angles giving the direction of projection
      psi - screen rotation angle
      cov[3] - center of view
      dview - distance from COV to COP (center of projection)
      umin, umax, vmin, vmax - view window in projection plane
      dproj - distance from COP to projection plane
      bcut, fcut - backward/forward range w.r.t projection plane (fcut<=0)
   Output :
      nper[16] - normalizing transformation
 compute tr+rot to get COV in origin, view vector parallel to -Z axis, up
 vector parallel to Y.

                         ^Yv   UP ^  proj. plane
                        |        |   /|
                       |        |  /  |
                      |   dproj  /  x--- center of window (COW)
                 COV |----------|--x--|------------> Zv
                              /           | VRP'z
                       /   --->      |  /
                /     VPN       |/
               Xv

   1 - translate COP to origin of MARS : Tper = T(-copx, -copy, -copz)
   2 - rotate VPN : R = Rz(-psi)*Rx(-theta)*Rz(-phi) (inverse Euler)
   3 - left-handed screen reference to right-handed one of MARS : Trl

   T12 = Tper*R*Trl
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)
 Define view direction (in spherical coordinates)

              Compute transformation matrix from world coordinates
              to normalised coordinates (-1 to +1)

    Input: S(3)    - scale factors
           C(3)    - centre of scope
           COSPHI  - longitude COS
           SINPHI  - longitude SIN
           COSTHE  - latitude COS (angle between +Z and view direc.)
           SINTHE  - latitude SIN
           COSPSI  - screen plane rotation angle COS
           SINPSI  - screen plane rotation angle SIN
void DrawOutlineCube(TList* outline, Double_t* rmin, Double_t* rmax)
 Draw the outline of a cube while rotating a 3-d object in the pad.
void ExecuteEvent(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event.
void ExecuteRotateView(Int_t event, Int_t px, Int_t py)
 Execute action corresponding to one event.

  This member function is called when a object is clicked with the locator

  If Left button clicked in the object area, while the button is kept down
  the cube representing the surrounding frame for the corresponding
  new latitude and longitude position is drawn.
void FindNormal(Double_t x, Double_t y, Double_t z, Double_t& zn)
 Find Z component of NORMAL in normalized coordinates.

    Input: X - X-component of NORMAL
           Y - Y-component of NORMAL
           Z - Z-component of NORMAL

    Output: ZN - Z-component of NORMAL in normalized coordinates
void FindPhiSectors(Int_t iopt, Int_t& kphi, Double_t* aphi, Int_t& iphi1, Int_t& iphi2)
 Find critical PHI sectors.

    Input: IOPT    - options: 1 - from BACK to FRONT 'BF'
                              2 - from FRONT to BACK 'FB'
           KPHI    - number of phi sectors
           APHI(*) - PHI separators (modified internally)

    Output: IPHI1  - initial sector
            IPHI2  - final sector
void FindThetaSectors(Int_t iopt, Double_t phi, Int_t& kth, Double_t* ath, Int_t& ith1, Int_t& ith2)
 Find critical THETA sectors for given PHI sector.

    Input: IOPT        - options: 1 - from BACK to FRONT 'BF'
                                  2 - from FRONT to BACK 'FB'
           PHI         - PHI sector
           KTH         - number of THETA sectors
           ATH(*)      - THETA separators (modified internally)

    Output: ITH1  - initial sector
            ITH2  - final sector
void FindScope(Double_t* scale, Double_t* center, Int_t& irep)
 Find centre of a MIN-MAX scope and scale factors

    Output: SCALE(3)  - scale factors
            CENTER(3) - centre
            IREP      - reply (-1 if error in min-max)
Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Double_t& ratio)
 Return distance to axis from point px,py.

  Algorithm:

       A(x1,y1)         P                             B(x2,y2)
       ------------------------------------------------
                        I
                        I
                        I
                        I
                       M(x,y)

  Let us call  a = distance AM     A=a**2
               b = distance BM     B=b**2
               c = distance AB     C=c**2
               d = distance PM     D=d**2
               u = distance AP     U=u**2
               v = distance BP     V=v**2     c = u + v

  D = A - U
  D = B - V  = B -(c-u)**2
     ==> u = (A -B +C)/2c
Double_t GetExtent() const
 Get maximum view extent.
void GetRange(Float_t* min, Float_t* max)
 Get Range function.
void GetRange(Double_t* min, Double_t* max)
 Get Range function.
void GetWindow(Double_t& u0, Double_t& v0, Double_t& du, Double_t& dv) const
 Get current window extent.
Bool_t IsClippedNDC(Double_t* p) const
 Check if point is clipped in perspective view.
void NDCtoWC(const Float_t* pn, Float_t* pw)
 Transfer point from normalized to world coordinates.

    Input: PN(3) - point in world coordinate system
           PW(3) - point in normalized coordinate system
void NDCtoWC(const Double_t* pn, Double_t* pw)
 Transfer point from normalized to world coordinates.

    Input: PN(3) - point in world coordinate system
           PW(3) - point in normalized coordinate system
void NormalWCtoNDC(const Float_t* pw, Float_t* pn)
 Transfer vector of NORMAL from word to normalized coordinates.

    Input: PW(3) - vector of NORMAL in word coordinate system
           PN(3) - vector of NORMAL in normalized coordinate system
void NormalWCtoNDC(const Double_t* pw, Double_t* pn)
 Transfer vector of NORMAL from word to normalized coordinates.

    Input: PW(3) - vector of NORMAL in word coordinate system
           PN(3) - vector of NORMAL in normalized coordinate system
void PadRange(Int_t rback)
 Set the correct window size for lego and surface plots.

  Set the correct window size for lego and surface plots.
  And draw the background if necessary.

    Input parameters:

   RBACK : Background colour
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)
 Store axis coordinates in the NDC system.
void SetDefaultWindow()
 Set default viewing window.
void SetOutlineToCube()
 This is a function which creates default outline.

      x = fRmin[0]        X = fRmax[0]
      y = fRmin[1]        Y = fRmax[1]
      z = fRmin[2]        Z = fRmax[2]


               (x,Y,Z) +---------+ (X,Y,Z)
                      /         /|
                     /         / |
                    /         /  |
           (x,y,Z) +---------+   |
                   |         |   + (X,Y,z)
                   |         |  /
                   |         | /
                   |         |/
                   +---------+
                (x,y,z)   (X,y,z)

void SetParallel()
 Set the parallel option (default).
void SetPerspective()
 Set perspective option.
void SetRange(const Double_t* min, const Double_t* max)
 Set Range function.
void SetRange(Double_t x0, Double_t y0, Double_t z0, Double_t x1, Double_t y1, Double_t z1, Int_t flag = 0)
 Set 3-D View range.

 Input:  x0, y0, z0 are minimum coordinates
         x1, y1, z1 are maximum coordinates

         flag values are: 0 (set always) <- default
                          1 (shrink view)
                          2 (expand view)

void SetWindow(Double_t u0, Double_t v0, Double_t du, Double_t dv)
 Set viewing window.
void SetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t& irep)
 Set view parameters.
void ResizePad()
 Recompute window for perspective view.
void ResetView(Double_t longitude, Double_t latitude, Double_t psi, Int_t& irep)
 Set view direction (in spherical coordinates).

    Input  PHI     - longitude
           THETA   - latitude (angle between +Z and view direction)
           PSI     - rotation in screen plane

    Output: IREP   - reply (-1 if error in min-max)

    Errors: error in min-max scope
void WCtoNDC(const Float_t* pw, Float_t* pn)
 Transfer point from world to normalized coordinates.

    Input: PW(3) - point in world coordinate system
           PN(3) - point in normalized coordinate system
void WCtoNDC(const Double_t* pw, Double_t* pn)
 Transfer point from world to normalized coordinates.

    Input: PW(3) - point in world coordinate system
           PN(3) - point in normalized coordinate system
void AdjustPad(TVirtualPad* pad = 0)
 Force the current pad to be updated.
void RotateView(Double_t phi, Double_t theta, TVirtualPad* pad = 0)
 API to rotate view and adjust the pad provided it the current one.
void SideView(TVirtualPad* pad = 0)
 Set to side view.
void FrontView(TVirtualPad* pad = 0)
 Set to front view.
void TopView(TVirtualPad* pad = 0)
 Set to top view.
void ToggleRulers(TVirtualPad* pad = 0)
 Turn on /off 3D axis.
void ToggleZoom(TVirtualPad* pad = 0)
 Turn on /off the interactive option to
  Zoom / Move / Change attributes of 3D axis correspond this view.
void AdjustScales(TVirtualPad* pad = 0)
 Adjust all sides of view in respect of the biggest one.
void Centered3DImages(TVirtualPad* pad = 0)
 Move view into the center of the scene.
void UnzoomView(TVirtualPad* pad = 0, Double_t unZoomFactor = 1.25)
 unZOOM this view.
void ZoomView(TVirtualPad* pad = 0, Double_t zoomFactor = 1.25)
 ZOOM this 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)
 Move focus to a different box position and extent in nsteps. Perform
 rotation with dlat,dlong,dpsi at each step.
void MoveViewCommand(Char_t chCode, Int_t count = 1)
 'a' increase scale factor (clip cube borders)
 's' decrease scale factor (clip cube borders)
void MoveWindow(Char_t option)
 Move view window :
 l,L - left
 h,H - right
 u,U - down
 i,I - up
void ZoomIn()
 Zoom in.
void ZoomOut()
 Zoom out.
void Streamer(TBuffer& )
 Stream an object of class TView3D.
void Centered()
void Front()
void ShowAxis()
void Side()
void Top()
{TopView();}
void ZoomMove()
void Zoom()
void UnZoom()
Double_t GetDview() const
{return fDview;}
Double_t GetDproj() const
{return fDproj;}
Bool_t GetAutoRange()
{return fAutoRange;}
Double_t GetLatitude()
{return fLatitude;}
Double_t GetLongitude()
{return fLongitude;}
Double_t GetPsi()
{return fPsi;}
Double_t * GetRmax()
{return fRmax;}
Double_t * GetRmin()
{return fRmin;}
TSeqCollection * GetOutline()
{return fOutline; }
Double_t * GetTback()
{return fTback;}
Double_t * GetTN()
{return fTN;}
Double_t * GetTnorm()
{return fTnorm;}
Int_t GetSystem()
{return fSystem;}
Double_t GetWindowWidth() const
{return 0.5*(fUVcoord[1]-fUVcoord[0]);}
Double_t GetWindowHeight() const
{return 0.5*(fUVcoord[3]-fUVcoord[2]);}
Bool_t IsPerspective() const
Bool_t IsViewChanged() const
{return fChanged;}
void SetAutoRange(Bool_t autorange = kTRUE)
{fAutoRange=autorange;}
void SetDview(Double_t dview)
{fDview=dview;}
void SetDproj(Double_t dproj)
{fDproj=dproj;}
void SetLatitude(Double_t latitude)
{fLatitude = latitude;}
void SetLongitude(Double_t longitude)
{fLongitude = longitude;}
void SetPsi(Double_t psi)
{fPsi = psi;}
void SetSystem(Int_t system)
{fSystem = system;}
void SetViewChanged(Bool_t flag = kTRUE)
{fChanged = flag;}