Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
19class TEveTrans;
20
22{
24
25private:
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
31public:
33
34protected:
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
42public:
44 ~TEveGridStepper() override {}
45
46 void Reset();
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);
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 ClassDefOverride(TEveGridStepper, 1); // Provide discrete position coordinates for placement of objects on regular grids.
76}; // end class TEveGridStepper
77
78#endif
bool Bool_t
Definition RtypesCore.h:63
float Float_t
Definition RtypesCore.h:57
#define ClassDefOverride(name, id)
Definition Rtypes.h:341
winID h TVirtualViewer3D TVirtualGLPainter p
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 TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char mx
Sub-editor for TEveGridStepper class.
Provide discrete position coordinates for placement of objects on regular grids.
Float_t GetOy() const
Bool_t Step()
Move to the next grid position.
TEveGridStepper & operator=(const TEveGridStepper &)
EStepMode_e fMode
TEveGridStepper(const TEveGridStepper &)
Internal traversal variables.
Int_t GetCz() const
~TEveGridStepper() override
void GetPosition(Float_t *p)
Get current position.
void SetTransAdvance(TEveTrans *mx)
Set position into the translation part of mx and advance to the next grid position.
Int_t * fValueArr[3]
Int_t * fLimitArr[3]
void Subtract(TEveGridStepper &s)
Subtract current position of 's' from origin of this.
Float_t GetDx() const
void SetDs(Float_t dx, Float_t dy, Float_t dz=0)
void Reset()
Reset position to origin.
void SetOs(Float_t ox, Float_t oy, Float_t oz=0)
void SetNs(Int_t nx, Int_t ny, Int_t nz=1)
Int_t GetNx() const
Float_t GetOz() const
Int_t GetNy() const
Int_t GetCx() const
Float_t GetDz() const
Float_t GetDy() const
Int_t GetNz() const
void SetTrans(TEveTrans *mx)
Set position into the translation part of mx.
Float_t GetOx() const
Int_t GetCy() const
TEveTrans is a 4x4 transformation matrix for homogeneous coordinates stored internally in a column-ma...
Definition TEveTrans.h:27
Mother of all ROOT objects.
Definition TObject.h:41