Ocean
Loading...
Searching...
No Matches
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#include "ocean/math/Numeric.h"
17
18namespace Ocean
19{
20
21namespace Rendering
22{
23
24namespace GlobalIllumination
25{
26
27/**
28 * This class implements a perspective view.
29 * @ingroup renderinggi
30 */
31class OCEAN_RENDERING_GI_EXPORT GIPerspectiveView :
32 virtual public GIView,
33 virtual public PerspectiveView
34{
35 friend class GIFactory;
36
37 public:
38
39 /**
40 * Returns the horizontal field of view in radian.
41 * @see View::fovX().
42 */
43 Scalar fovX() const override;
44
45 /**
46 * Sets the horizontal field of view in radian.
47 * @see View::setFovX().
48 */
49 bool setFovX(const Scalar fovx) override;
50
51 /**
52 * Returns a viewing ray into the scene.
53 * @see View::viewingRay().
54 */
55 Line3 viewingRay(const Scalar x, const Scalar y, const unsigned int width, const unsigned int height) const override;
56
57 protected:
58
59 /**
60 * Creates a new perspective view.
61 */
63
64 /**
65 * Destructs a perspective view.
66 */
68
69 /**
70 * (Re-)calculates the view projection matrix.
71 */
73
74 protected:
75
76 /// Horizontal field of view in radian.
78};
79
80}
81
82}
83
84}
85
86#endif // META_OCEAN_RENDERING_GI_PERSPECTIVE_VIEW_H
static constexpr Scalar deg2rad(const Scalar deg)
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.
friend class GIFactory
Definition GIPerspectiveView.h:35
Scalar fovX() const override
Returns the horizontal field of view in radian.
Scalar viewFovX
Horizontal field of view in radian.
Definition GIPerspectiveView.h:77
~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.
PerspectiveView()
Creates a new perspective view object.
LineT3< Scalar > Line3
Definition of the Line3 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with single o...
Definition Line3.h:27
float Scalar
Definition of a scalar type.
Definition Math.h:129
Namespace of the Rendering Global Illumination library.
Definition GIAttribute.h:23
Namespace of the Rendering library.
Definition AbsoluteTransform.h:18
The namespace covering the entire Ocean framework.
Definition Accessor.h:15