Free Electron
ViewerI.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_ViewerI_h__
8 #define __viewer_ViewerI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 //* TODO move token method implementations to a ViewerBase
16 
17 /**************************************************************************//**
18  @brief Simple viewer interface
19 
20  @ingroup viewer
21 *//***************************************************************************/
22 class FE_DL_EXPORT ViewerI:
23  virtual public Component,
24  public CastableAs<ViewerI>
25 {
26  public:
27  /// Adopts a WindowI
28 virtual void bind(sp<WindowI> spWindowI) {}
29 
30  /// Adopts a DrawI
31 virtual void bind(sp<DrawI> spDrawI) {}
32 
33  /// Returns the current DrawI
34 virtual sp<DrawI> getDrawI(void) const
35  { return sp<DrawI>(NULL); }
36 
37  /// Returns the current CameraControllerI
39  { return sp<CameraControllerI>(NULL); }
40 
41  /// Replaces the current CameraControllerI
42 virtual void setCameraControllerI(
43  sp<CameraControllerI> spCameraControllerI) {}
44 
45  /// Returns frames per seconds
46 virtual Real frameRate(void) const
47  { return 0.0; }
48 
49 };
50 
51 } /* namespace ext */
52 } /* namespace fe */
53 
54 #endif /* __viewer_ViewerI_h__ */
virtual void setCameraControllerI(sp< CameraControllerI > spCameraControllerI)
Replaces the current CameraControllerI.
Definition: ViewerI.h:42
virtual void bind(sp< DrawI > spDrawI)
Adopts a DrawI.
Definition: ViewerI.h:31
virtual void bind(sp< WindowI > spWindowI)
Adopts a WindowI.
Definition: ViewerI.h:28
kernel
Definition: namespace.dox:3
virtual sp< DrawI > getDrawI(void) const
Returns the current DrawI.
Definition: ViewerI.h:34
Simple viewer interface.
Definition: ViewerI.h:22
virtual Real frameRate(void) const
Returns frames per seconds.
Definition: ViewerI.h:46
virtual sp< CameraControllerI > getCameraControllerI(void) const
Returns the current CameraControllerI.
Definition: ViewerI.h:38
Base for all interfacable components.
Definition: Component.h:20
Intrusive Smart Pointer.
Definition: src/core/ptr.h:53
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192