Ocean
GLESPerspectiveView.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_GLES_PERSPECTIVE_VIEW_H
9 #define META_OCEAN_RENDERING_GLES_PERSPECTIVE_VIEW_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GLESceneGraph
23 {
24 
25 /**
26  * This class implements a perspective view for GLESceneGraph.
27  * @ingroup renderinggles
28  */
29 class OCEAN_RENDERING_GLES_EXPORT GLESPerspectiveView :
30  virtual public GLESView,
31  virtual public PerspectiveView
32 {
33  friend class GLESFactory;
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  /**
56  * Sets the projection matrix explicitly.
57  * @see PerspectiveView::setProjectionMatrix().
58  */
59  void setProjectionMatrix(const SquareMatrix4& clip_T_view) override;
60 
61  protected:
62 
63  /**
64  * Creates a new perspective view.
65  */
67 
68  /**
69  * Destructs a perspective view.
70  */
72 
73  /**
74  * (Re-)calculates the view projection matrix.
75  * @see GLESView::calculateProjectionMatrix().
76  */
77  bool calculateProjectionMatrix() override;
78 
79  protected:
80 
81  /// The view's horizontal field of view in radian, with range (0, PI)
83 };
84 
85 }
86 
87 }
88 
89 }
90 
91 #endif // META_OCEAN_RENDERING_GLES_PERSPECTIVE_VIEW_H
This class implements an infinite line in 3D space.
Definition: Line3.h:70
This class implements a class factory for all GLESceneGraph objects.
Definition: GLESFactory.h:30
This class implements a perspective view for GLESceneGraph.
Definition: GLESPerspectiveView.h:32
Scalar fovX_
The view's horizontal field of view in radian, with range (0, PI)
Definition: GLESPerspectiveView.h:82
Scalar fovX() const override
Returns the horizontal field of view in radian.
GLESPerspectiveView()
Creates a new perspective view.
~GLESPerspectiveView() override
Destructs a perspective view.
bool calculateProjectionMatrix() override
(Re-)calculates the view projection matrix.
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.
bool setFovX(const Scalar fovx) override
Sets the horizontal field of view in radian.
void setProjectionMatrix(const SquareMatrix4 &clip_T_view) override
Sets the projection matrix explicitly.
This class implements a GLESceneGraph view object.
Definition: GLESView.h:34
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