TView
class description - source file - inheritance tree
protected:
void ResetView(Float_t longitude, Float_t latitude, Float_t psi, Int_t& irep)
public:
TView TView(Int_t system)
TView TView()
TView TView(Float_t* rmin, Float_t* rmax, Int_t system = 1)
TView TView(TView&)
virtual void ~TView()
virtual void AxisVertex(Float_t ang, Float_t* av, Int_t& ix1, Int_t& ix2, Int_t& iy1, Int_t& iy2, Int_t& iz1, Int_t& iz2)
TClass* Class()
virtual void DefineViewDirection(Float_t* s, Float_t* c, Double_t cosphi, Double_t sinphi, Double_t costhe, Double_t sinthe, Double_t cospsi, Double_t sinpsi, Float_t* tnorm, Float_t* tback)
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual void ExecuteRotateView(Int_t event, Int_t px, Int_t py)
virtual void FindNormal(Float_t x, Float_t y, Float_t z, Float_t& zn)
virtual void FindPhiSectors(Int_t iopt, Int_t& kphi, Float_t* aphi, Int_t& iphi1, Int_t& iphi2)
virtual void FindScope(Float_t* scale, Float_t* center, Int_t& irep)
virtual void FindThetaSectors(Int_t iopt, Float_t phi, Int_t& kth, Float_t* ath, Int_t& ith1, Int_t& ith2)
Bool_t GetAutoRange()
virtual Int_t GetDistancetoAxis(Int_t axis, Int_t px, Int_t py, Float_t& ratio)
Float_t GetLatitude()
Float_t GetLongitude()
TSeqCollection* GetOutline()
Float_t GetPsi()
virtual void GetRange(Float_t* min, Float_t* max)
Float_t* GetRmax()
Float_t* GetRmin()
Int_t GetSystem()
Float_t* GetTN()
Float_t* GetTnorm()
virtual TClass* IsA() const
virtual void NDCtoWC(Float_t* pn, Float_t* pw)
virtual void NormalWCtoNDC(Float_t* pw, Float_t* pn)
virtual void PadRange(Float_t rback)
virtual void SetAutoRange(Bool_t autorange = kTRUE)
virtual void SetAxisNDC(Float_t* x1, Float_t* x2, Float_t* y1, Float_t* y2, Float_t* z1, Float_t* z2)
void SetLatitude(Float_t latitude)
void SetLongitude(Float_t longitude)
virtual void SetOutlineToCube()
void SetPsi(Float_t psi)
virtual void SetRange(Float_t* min, Float_t* max)
virtual void SetRange(Float_t x0, Float_t y0, Float_t z0, Float_t x1, Float_t y1, Float_t z1, Int_t flag = 0)
virtual void SetSystem(Int_t system)
virtual void SetView(Float_t longitude, Float_t latitude, Float_t psi, Int_t& irep)
virtual void ShowMembers(TMemberInspector& insp, char* parent)
virtual void Streamer(TBuffer& b)
virtual void WCtoNDC(Float_t* pw, Float_t* pn)
protected:
Int_t fSystem Coordinate system
Float_t fLatitude View angle latitude
Float_t fLongitude View angle longitude
Float_t fPsi View angle psi
Float_t fTN[12]
Float_t fTB[12]
Float_t fRmax[3] Upper limits of object
Float_t fRmin[3] Lower limits of object
Float_t fTnorm[12] Transformation matrix
Float_t fTback[12] Back transformation matrix
Float_t fX1[3] First coordinate of X axis
Float_t fX2[3] Second coordinate of X axis
Float_t fY1[3] First coordinate of Y axis
Float_t fY2[3] Second coordinate of Y axis
Float_t fZ1[3] First coordinate of Z axis
Float_t fZ2[3] Second coordinate of Z axis
TSeqCollection* fOutline Collection of outline's objects
Bool_t fDefaultOutline Set to TRUE if outline is default cube
Bool_t fAutoRange Set to TRUE if range computed automatically
*-*-*-*-*-*-*-*-*-*-*-*-*The V I E W 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 *
*-* *
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TView()
*-*-*-*-*-*-*-*-*-*-*-*-*-*View default constructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ========================
~TView()
*-*-*-*-*-*-*-*-*-*-*-*-*-*View default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
*-* =======================
TView(Int_t system)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*View constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ================
*-* Creates a 3-D view in the current pad
*-* By default pad range in 3-D view is (-1,-1,1,1), so ...
*-*
*-* 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
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
TView(Float_t *rmin, Float_t *rmax, Int_t system)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*View 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
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void AxisVertex(Float_t ang, Float_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 vertixes *
*-* 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 DefineViewDirection(Float_t *s, Float_t *c,
Double_t cosphi, Double_t sinphi,
Double_t costhe, Double_t sinthe,
Double_t cospsi, Double_t sinpsi,
Float_t *tnorm, Float_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 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(Float_t x, Float_t y, Float_t z, Float_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, Float_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 separatrices *
*-* *
*-* Output: IPHI1 - initial sector *
*-* IPHI2 - final sector *
*-* *
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void FindThetaSectors(Int_t iopt, Float_t phi, Int_t &kth, Float_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 separatrices *
*-* *
*-* Output: ITH1 - initial sector *
*-* ITH2 - final sector *
*-* *
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void FindScope(Float_t *scale, Float_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, Float_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
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void GetRange(Float_t *min, Float_t *max)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*Get Range function-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ==================
*-*
void NDCtoWC(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 NormalWCtoNDC(Float_t *pw, Float_t *pn)
*-*-*Transfer vector of NORMAL from word to normalized coodinates-*-*-*-*
*-* ============================================================
*-*
*-* Input: PW(3) - vector of NORMAL in word coordinate system
*-* PN(3) - vector of NORMAL in normalized coordinate system
*-*
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
void PadRange(Float_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(Float_t *x1, Float_t *x2, Float_t *y1, Float_t *y2, Float_t *z1, Float_t *z2)
*-*-*-*-*-*-*-*-*-*-*-*-*Store axis coordinates in the NDC system*-*-*-*
*-* ========================================
*-*
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 SetRange(Float_t *min, Float_t *max)
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*Set Range function-*-*-*-*-*-*-*-*-*-*-*-*-*
*-* ==================
*-*
void SetRange(Float_t x0, Float_t y0, Float_t z0, Float_t x1, Float_t y1, Float_t z1, Int_t flag)
*-*-*-*-*-*-*-*-*-*-*-*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 SetView(Float_t longitude, Float_t latitude, Float_t psi, Int_t &irep)
void ResetView(Float_t longitude, Float_t latitude, Float_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(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 *
*-* *
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Inline Functions
Bool_t GetAutoRange()
Float_t GetLatitude()
Float_t GetLongitude()
Float_t GetPsi()
Float_t* GetRmax()
Float_t* GetRmin()
TSeqCollection* GetOutline()
Float_t* GetTN()
Float_t* GetTnorm()
Int_t GetSystem()
void SetAutoRange(Bool_t autorange = kTRUE)
void SetLatitude(Float_t latitude)
void SetLongitude(Float_t longitude)
void SetPsi(Float_t psi)
void SetSystem(Int_t system)
TClass* Class()
TClass* IsA() const
void ShowMembers(TMemberInspector& insp, char* parent)
void Streamer(TBuffer& b)
TView TView(TView&)
Author: Rene Brun, Nenad Buncic, Evgueni Tcherniaev, Olivier Couet 18/08/95
Last update: 2.23/04 09/10/99 22.40.57 by Rene Brun
Copyright (c) 1995-1999, The ROOT System, All rights reserved. *
ROOT page - Class index - Top of the page
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.