Logo ROOT   6.12/07
Reference Guide
TEveGridStepper.h
Go to the documentation of this file.
1 // @(#)root/eve:$Id$
2 // Authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TEveGridStepper
13 #define ROOT_TEveGridStepper
14 
15 #include "TEveUtil.h"
16 
17 #include "TObject.h"
18 
19 class TEveTrans;
20 
21 class TEveGridStepper : public TObject
22 {
24 
25 private:
26  Int_t *fLimitArr[3], *fValueArr[3]; //! Internal traversal variables.
27 
28  TEveGridStepper(const TEveGridStepper&); // Not implemented
29  TEveGridStepper& operator=(const TEveGridStepper&); // Not implemented
30 
31 public:
33 
34 protected:
35  EStepMode_e fMode; // Stepping mode, order of filling.
36 
37  Int_t fCx, fCy, fCz; // Current positions during filling / traversal.
38  Int_t fNx, fNy, fNz; // Number of slots in each direction.
39  Float_t fDx, fDy, fDz; // Step size in each direction.
40  Float_t fOx, fOy, fOz; // Initial offset for each direction.
41 
42 public:
44  virtual ~TEveGridStepper() {}
45 
46  void Reset();
47  void Subtract(TEveGridStepper& s);
48  void SetNs(Int_t nx, Int_t ny, Int_t nz=1)
49  { fNx = nx; fNy = ny; fNz = nz; }
50  void SetDs(Float_t dx, Float_t dy, Float_t dz=0)
51  { fDx = dx; fDy = dy; fDz = dz; }
52  void SetOs(Float_t ox, Float_t oy, Float_t oz=0)
53  { fOx = ox; fOy = oy; fOz = oz; }
54 
55  Bool_t Step();
56 
57  void GetPosition(Float_t* p);
58 
59  void SetTrans(TEveTrans* mx);
60  void SetTransAdvance(TEveTrans* mx);
61 
62  Int_t GetCx() const { return fCx; }
63  Int_t GetCy() const { return fCy; }
64  Int_t GetCz() const { return fCz; }
65  Int_t GetNx() const { return fNx; }
66  Int_t GetNy() const { return fNy; }
67  Int_t GetNz() const { return fNz; }
68  Float_t GetDx() const { return fDx; }
69  Float_t GetDy() const { return fDy; }
70  Float_t GetDz() const { return fDz; }
71  Float_t GetOx() const { return fOx; }
72  Float_t GetOy() const { return fOy; }
73  Float_t GetOz() const { return fOz; }
74 
75  ClassDef(TEveGridStepper, 1); // Provide discrete position coordinates for placement of objects on regular grids.
76 }; // end class TEveGridStepper
77 
78 #endif
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition: TEveTrans.h:26
Float_t GetDz() const
void SetOs(Float_t ox, Float_t oy, Float_t oz=0)
float Float_t
Definition: RtypesCore.h:53
virtual ~TEveGridStepper()
Int_t GetNx() const
void SetTrans(TEveTrans *mx)
Set position into the translation part of mx.
Int_t GetCz() const
int Int_t
Definition: RtypesCore.h:41
void GetPosition(Float_t *p)
Get current position.
bool Bool_t
Definition: RtypesCore.h:59
void Reset()
Reset position to origin.
void SetTransAdvance(TEveTrans *mx)
Set position into the translation part of mx and advance to the next grid position.
TEveGridStepper(const TEveGridStepper &)
Internal traversal variables.
Int_t GetNz() const
#define ClassDef(name, id)
Definition: Rtypes.h:320
Float_t GetDy() const
Int_t GetCy() const
TEveGridStepper & operator=(const TEveGridStepper &)
Sub-editor for TEveGridStepper class.
Float_t GetOy() const
Float_t GetOz() const
EStepMode_e fMode
Int_t GetCx() const
Provide discrete position coordinates for placement of objects on regular grids.
Float_t GetDx() const
void Subtract(TEveGridStepper &s)
Subtract current position of 's' from origin of this.
void SetDs(Float_t dx, Float_t dy, Float_t dz=0)
static constexpr double s
Mother of all ROOT objects.
Definition: TObject.h:37
Bool_t Step()
Move to the next grid position.
void SetNs(Int_t nx, Int_t ny, Int_t nz=1)
Float_t GetOx() const
Int_t * fLimitArr[3]
Int_t GetNy() const
Int_t * fValueArr[3]