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)
206 if ( ! filename.Contains(
".gif+"))
208 Error(
"StartImageAutoSaveAnimatedGif",
"Name should end with '.gif+'. Not starting.");
226 if ( ! filename.Contains(
"%"))
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;
318 if (
TGLPhysicalShape *
const shape = const_cast<TGLPhysicalShape *>(*shapeIter))
ShapeVec_t::iterator ShapeVec_i
TGLVertex3 Center() const
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 StopImageAutoSave()
Stops automatic saving of images.
void Reset()
Reset the timer.
R__EXTERN void * gTQSender
std::list< TGLSceneInfo * > SceneInfoList_t
Bool_t TestBit(UInt_t f) const
void SetImageGUIOutMode(Int_t m)
Set output mode for GUI operation: 1 - animated gif; 2 - a series of pngs.
const TGLMatrix & GetCamTrans() const
Short_t Range(Short_t lb, Short_t ub, Short_t x)
virtual Bool_t RotateRad(Double_t hRotate, Double_t vRotate)
Rotate camera around center.
TString fImageGUIBaseName
void Timeout()
Called on every timer timeout.
Concrete physical shape - a GL drawable.
TGLCamera & CurrentCamera() const
void Stop()
Stop the stopwatch.
void StartImageAutoSaveAnimatedGif(const TString &filename)
Start saving into animated gif.
3 component (x/y/z) vertex class.
const TGLBoundingBox & BoundingBox() const
3 component (x/y/z) vector class.
void Continue()
Resume a stopped stopwatch.
void RotateScene()
"Scene rotation": either find a special object, which will be an axis of rotation (it's Z actually) o...
TGLMatrix & RefCamTrans()
void StartImageAutoSave(const TString &filename)
Start saving into a set of images.
void SetADolly(Double_t a)
Set relative amplitude of forward/backward oscillation.
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...
Automatically rotates GL camera.
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...
void SetATheta(Double_t a)
Set relative amplitude of theta oscillation.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void TurnOff()
Remove timer from system timer list.
Handles synchronous and a-synchronous timer events.
const TGLBoundingBox & GetTransformedBBox()
void StartImageAutoSaveWithGUISettings()
Start auto-saving images as set-up via GUI.
Base GL viewer object - used by both standalone and embedded (in pad) GL.
void Stop()
Stop the auto-rotator.
Concrete class describing an orientated (free) or axis aligned box of 8 vertices. ...
void SetDt(Double_t dt)
Set time between two redraws in seconds.
TGLAutoRotator(const TGLAutoRotator &)
Double_t GetTheta() const
Get angle between camera up axis.
const TGLVector3 & Axis(UInt_t i, Bool_t normalised=kTRUE) const
virtual ~TGLAutoRotator()
Destructor.
SceneInfoList_t::iterator SceneInfoList_i
void Start()
Start the auto-rotator.
virtual void TurnOn()
Add the timer to the system timer list.
const TGLLogicalShape * GetLogical() const
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void MoveLF(Int_t ai, Double_t amount)
Translate in local frame.
Bool_t SavePicture()
Save current image using the default file name which can be set via SetPictureFileName() and defaults...
TGLVector3 GetBaseVec(Int_t b) const
void SetTime(Long_t milliSec)
ShapeVec_t fShapesOfInterest