Ocean
GIPerspectiveView.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Meta Platforms, Inc. and affiliates.
3  *
4  * This source code is licensed under the MIT license found in the
5  * LICENSE file in the root directory of this source tree.
6  */
7 
8 #ifndef META_OCEAN_RENDERING_GI_PERSPECTIVE_VIEW_H
9 #define META_OCEAN_RENDERING_GI_PERSPECTIVE_VIEW_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GlobalIllumination
23 {
24 
25 /**
26  * This class implements a perspective view.
27  * @ingroup renderingi
28  */
29 class OCEAN_RENDERING_GI_EXPORT GIPerspectiveView :
30  virtual public GIView,
31  virtual public PerspectiveView
32 {
33  friend class GIFactory;
34 
35  public:
36 
37  /**
38  * Returns the horizontal field of view in radian.
39  * @see View::fovX().
40  */
41  Scalar fovX() const override;
42 
43  /**
44  * Sets the horizontal field of view in radian.
45  * @see View::setFovX().
46  */
47  bool setFovX(const Scalar fovx) override;
48 
49  /**
50  * Returns a viewing ray into the scene.
51  * @see View::viewingRay().
52  */
53  Line3 viewingRay(const Scalar x, const Scalar y, const unsigned int width, const unsigned int height) const override;
54 
55  protected:
56 
57  /**
58  * Creates a new perspective view.
59  */
61 
62  /**
63  * Destructs a perspective view.
64  */
65  ~GIPerspectiveView() override;
66 
67  /**
68  * (Re-)calculates the view projection matrix.
69  */
70  void calculateProjectionMatrix() override;
71 
72  protected:
73 
74  /// Horizontal field of view in radian.
76 };
77 
78 }
79 
80 }
81 
82 }
83 
84 #endif // META_OCEAN_RENDERING_GI_PERSPECTIVE_VIEW_H
This class implements an infinite line in 3D space.
Definition: Line3.h:70
This class implements a class factory for all Global Illumination objects.
Definition: GIFactory.h:30
This class implements a perspective view.
Definition: GIPerspectiveView.h:32
Line3 viewingRay(const Scalar x, const Scalar y, const unsigned int width, const unsigned int height) const override
Returns a viewing ray into the scene.
GIPerspectiveView()
Creates a new perspective view.
Scalar fovX() const override
Returns the horizontal field of view in radian.
Scalar viewFovX
Horizontal field of view in radian.
Definition: GIPerspectiveView.h:75
~GIPerspectiveView() override
Destructs a perspective view.
bool setFovX(const Scalar fovx) override
Sets the horizontal field of view in radian.
void calculateProjectionMatrix() override
(Re-)calculates the view projection matrix.
This class implements a Global Illumination view object.
Definition: GIView.h:36
This class is the base class for all perspective views.
Definition: PerspectiveView.h:37
float Scalar
Definition of a scalar type.
Definition: Math.h:128
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15