Free Electron
PerspectiveViewer.h
Go to the documentation of this file.
1 /* Copyright (C) 2003-2021 Free Electron Organization
2  Any use of this software requires a license. If a valid license
3  was not distributed with this file, visit freeelectron.org. */
4 
5 /** @file */
6 
7 #ifndef __viewer__PerspectiveViewer_h__
8 #define __viewer__PerspectiveViewer_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /** Perspective viewer
16 
17  @copydoc PerspectiveViewer_info
18  */
19 class FE_DL_EXPORT PerspectiveViewer :
20  public Initialize<PerspectiveViewer>,
21  virtual public SignalerViewerI,
22  virtual public HandlerI
23 {
24  public:
25  PerspectiveViewer(void);
26 virtual ~PerspectiveViewer(void);
27  void initialize(void);
28 
29  //* As ViewerI
30  using ViewerI::bind;
31 virtual void bind(sp<WindowI> spWindowI);
32 virtual void render(Real a_time,Real a_timestep) {}
33 virtual Real frameRate(void) const;
34 
35  //* As HandlerI
36 virtual void handle(Record& record);
37 virtual void handleBind(sp<SignalerI> spSignalerI,
38  sp<Layout> spLayout);
39 
40  private:
41  sp<WindowI> m_spWindowI;
42  PathAccessor<SpatialTransform> m_paPerspMatrix;
43  AsSignal m_asSignal;
44  AsWindata m_asWindata;
45  sp<ViewI> m_view;
46 
47  Real m_frameMS;
48  Real m_frameRate;
49  Real m_frameTotal;
50  U32 m_frameCount;
51  SystemTicker m_ticker;
52 };
53 
54 } /* namespace ext */
55 } /* namespace fe */
56 
57 #endif /* __viewer__PerspectiveViewer_h__ */
58 
window data
Definition: datatoolAS.h:38
virtual void bind(sp< WindowI > spWindowI)
Adopts a WindowI.
Definition: ViewerI.h:28
possible attributes of a top level signal
Definition: datatoolAS.h:16
Simple viewer interface.
Definition: SignalerViewerI.h:22
kernel
Definition: namespace.dox:3
Perspective viewer.
Definition: PerspectiveViewer.h:19
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
virtual void render(Real a_time, Real a_timestep)
Send signals for one frame.
Definition: PerspectiveViewer.h:32
Interface to handle signals from an SignalerI.
Definition: HandlerI.h:22
High precision timer.
Definition: SystemTicker.h:174
Reference to an instance of a Layout.
Definition: RecordSB.h:35
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53