Free Electron
SurfaceDrone.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 __flight_SurfaceDrone_h__
8 #define __flight_SurfaceDrone_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief Drawable suface and canera view of drone
17 
18  @ingroup flight
19 *//***************************************************************************/
20 class FE_DL_EXPORT SurfaceDrone:
21  public SurfaceSphere,
22  virtual public CameraEditable,
23  public CastableAs<SurfaceDrone>
24 {
25  public:
26 
27  SurfaceDrone(void);
28 virtual ~SurfaceDrone(void);
29 
30  //* As Protectable
31 virtual Protectable* clone(Protectable* pInstance=NULL);
32 
33  //* As SurfaceI
34 
35  using SurfaceSphere::draw;
36 
37 virtual void draw(const SpatialTransform&,
38  sp<DrawI> a_spDrawI,
39  const Color* a_color,
40  sp<DrawBufferI> a_spDrawBuffer,
41  sp<PartitionI> a_spPartition)
42  const;
43 
44  //* As CameraEditable
45 virtual
46 const SpatialTransform& cameraMatrix(void) const
47  { return m_xformCam; }
48 
49  /// @brief Field of View (degrees)
50 virtual Vector2 fov(void) const
51  { return Vector2(90,90); }
52 
53  protected:
54 
55 virtual void cache(void);
56 
57  private:
58 
59  void updateState(void);
60 
61  sp<StateCatalog> m_spStateCatalog;
62 
63  I32 m_frame;
64  SpatialTransform m_xformDrone;
65  SpatialTransform m_xformCam;
66 };
67 
68 } /* namespace ext */
69 } /* namespace fe */
70 
71 #endif /* __flight_SurfaceDrone_h__ */
virtual const SpatialTransform & cameraMatrix(void) const
Get camera transform.
Definition: SurfaceDrone.h:46
Base class providing protection counting for cp<>
Definition: Protectable.h:28
kernel
Definition: namespace.dox:3
Special vector for color (RGBA)
Definition: Color.h:21
virtual Vector2 fov(void) const
Field of View (degrees)
Definition: SurfaceDrone.h:50
Spherical Surface.
Definition: SurfaceSphere.h:20
Drawable suface and canera view of drone.
Definition: SurfaceDrone.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192
Adjustable Camera.
Definition: CameraEditable.h:20