46 fViewer(
v), fCamera(0),
52 fWTheta(0.15), fATheta(0.5),
53 fWDolly(0.30), fADolly(0.4),
55 fImageCount(0), fImageAutoSave(
kFALSE),
56 fImageGUIBaseName(
"animation"), fImageGUIOutMode(1)
58 fTimer->
Connect(
"Timeout()",
"TGLAutoRotator",
this,
"Timeout()");
155 Error(
"Timeout",
"Not running or not called via timer.");
159 using namespace TMath;
173 if (th + delta_t > 3.0 || th + delta_t < 0.1416)
208 Error(
"StartImageAutoSaveAnimatedGif",
"Name should end with '.gif+'. Not starting.");
228 Error(
"StartImageAutoSave",
"Name should include a '%%' character, like 'image-%%05d.png'. Not starting.");
254 Warning(
"SetImageGUIOutMode",
"Invalid value, ignoring");
291 for (; sceneIter != scenes.end(); ++sceneIter) {
299 axisShape = testShape;
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 Int_t count const char ColorStruct_t color const char filename
R__EXTERN void * gTQSender
Automatically rotates GL camera.
void Start()
Start the auto-rotator.
void RotateScene()
"Scene rotation": either find a special object, which will be an axis of rotation (it's Z actually) o...
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
void Stop()
Stop the auto-rotator.
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
TString fImageGUIBaseName
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
void StopImageAutoSave()
Stops automatic saving of images.
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
TGLAutoRotator(const TGLAutoRotator &)
void SetDt(Double_t dt)
Set time between two redraws in seconds.
void StartImageAutoSave(const TString &filename)
Start saving into a set of images.
~TGLAutoRotator() override
Destructor.
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
void Timeout()
Called on every timer timeout.
Concrete class describing an orientated (free) or axis aligned box of 8 vertices.
TGLVertex3 Center() const
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
const TGLMatrix & GetCamTrans() const
Double_t GetTheta() const
Get angle between camera up axis.
TGLMatrix & RefCamTrans()
void MoveLF(Int_t ai, Double_t amount)
Translate in local frame.
TGLVector3 GetBaseVec(Int_t b) const
Concrete physical shape - a GL drawable.
const TGLBoundingBox & BoundingBox() const
const TGLLogicalShape * GetLogical() const
const TGLBoundingBox & GetTransformedBBox()
ShapeVec_t fShapesOfInterest
ShapeVec_t::iterator ShapeVec_i
3 component (x/y/z) vector class.
3 component (x/y/z) vertex class.
std::list< TGLSceneInfo * > SceneInfoList_t
SceneInfoList_t::iterator SceneInfoList_i
Base GL viewer object - used by both standalone and embedded (in pad) GL.
void RequestDraw(Short_t LOD=TGLRnrCtx::kLODMed)
Post request for redraw of viewer at level of detail 'LOD' Request is directed via cross thread gVirt...
TGLCamera & CurrentCamera() const
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
R__ALWAYS_INLINE Bool_t TestBit(UInt_t f) const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Bool_t Connect(const char *signal, const char *receiver_class, void *receiver, const char *slot)
Non-static method is used to connect from the signal of this object to the receiver slot.
Double_t RealTime()
Stop the stopwatch (if it is running) and return the realtime (in seconds) passed between the start a...
void Start(Bool_t reset=kTRUE)
Start the stopwatch.
void Continue()
Resume a stopped stopwatch.
void Stop()
Stop the stopwatch.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Handles synchronous and a-synchronous timer events.
virtual void TurnOff()
Remove timer from system timer list.
virtual void TurnOn()
Add the timer to the system timer list.
void Reset()
Reset the timer.
void SetTime(Long_t milliSec)
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
constexpr Double_t PiOver2()
Short_t Range(Short_t lb, Short_t ub, Short_t x)
Returns x if lb < x < up, lb if x < lb and ub if x > ub.