Free Electron
CameraI.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 __draw_CameraI_h__
8 #define __draw_CameraI_h__
9 
10 namespace fe
11 {
12 namespace ext
13 {
14 
15 /**************************************************************************//**
16  @brief viewing position
17 
18  @ingroup draw
19 *//***************************************************************************/
20 class FE_DL_EXPORT CameraI:
21  virtual public Component,
22  public CastableAs<CameraI>
23 {
24  public:
25  /** @brief Set camera transform
26 
27  The camera transform is the inverse of the
28  transform to the viewpoint.
29  */
30 virtual void setCameraMatrix(const SpatialTransform& matrix) =0;
31 virtual
32  /// @brief Get camera transform
33 const SpatialTransform& cameraMatrix(void) const =0;
34 
35  /// @brief Set perspective Field of View (degrees)
36 virtual void setFov(Vector2 a_fov) =0;
37  /// @brief Get perspective Field of View (degrees)
38 virtual Vector2 fov(void) const =0;
39 
40  /// @brief Set distance clipping planes
41 virtual void setPlanes(Real nearplane,Real farplane) =0;
42  /// @brief Get distance clipping planes
43 virtual void getPlanes(Real& nearplane,Real& farplane) =0;
44 
45  /// @brief Set clipping planes
46 virtual void setOrtho(Real a_zoom, const Vector2 &a_center) =0;
47  /// @brief Get clipping planes
48 virtual void getOrtho(Real &a_zoom, Vector2 &a_center) const =0;
49 
50  /** @brief choose drawing to 2D pixel coordinates
51 
52  Does not apply the cameraMatrix to the render
53  system, but still allows it to be used for
54  ViewI::project() and ViewI::unproject().
55 
56  */
57 virtual void setRasterSpace(BWORD a_rasterSpace) =0;
58  /// @brief Get raster space mode (on/off)
59 virtual BWORD rasterSpace(void) const =0;
60 };
61 
62 } /* namespace ext */
63 } /* namespace fe */
64 
65 #endif /* __draw_CameraI_h__ */
kernel
Definition: namespace.dox:3
Base for all interfacable components.
Definition: Component.h:20
viewing position
Definition: CameraI.h:20
Per-class participation non-RTTI fallback dynamic casting mechanism.
Definition: Castable.h:192