Ocean
Loading...
Searching...
No Matches
GLESStereoView.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_STEREO_VIEW_H
9#define META_OCEAN_RENDERING_GLES_STEREO_VIEW_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GLESceneGraph
23{
24
25/**
26 * This class implements a perspective stereo view for GLESceneGraph.
27 * @ingroup renderinggles
28 */
29class OCEAN_RENDERING_GLES_EXPORT GLESStereoView :
30 virtual public GLESView,
31 virtual public StereoView
32{
33 friend class GLESFactory;
34
35 public:
36
37 /**
38 * Returns the transformation between the center of both views (device) and world.
39 * @see StereoView::transformation().
40 */
42
43 /**
44 * Returns the position and orientation of the left view in world coordinates (the left extrinsic camera data, the inverse of the known View Matrix).
45 * @see StereoView::leftTransformation().
46 */
48
49 /**
50 * Returns the position and orientation of the right view in world coordinates (the right extrinsic camera data, the inverse of the known View Matrix).
51 * @see StereoView::rightTransformation().
52 */
54
55 /**
56 * Returns the left projection matrix.
57 * @see StereoView::leftProjectionMatrix().
58 */
60
61 /**
62 * Returns the right projection matrix.
63 * @see StereoView::rightProjectionMatrix().
64 */
66
67 /**
68 * Sets the position and orientation of the center between left and right view (device) in world coordinates.
69 * @see StereoView::setTransformation().
70 */
71 void setTransformation(const HomogenousMatrix4& world_T_device) override;
72
73 /**
74 * Sets the position and orientation of the left view in world coordinates (the left extrinsic camera data, the inverse of the known View Matrix).
75 * @see StereoView::setLeftTransformation().
76 */
77 void setLeftTransformation(const HomogenousMatrix4& world_T_leftView) override;
78
79 /**
80 * Sets the position and orientation of the right view in world coordinates (the right extrinsic camera data, the inverse of the known View Matrix).
81 * @see StereoView::setRightTransformation().
82 */
83 void setRightTransformation(const HomogenousMatrix4& world_T_rightView) override;
84
85 /**
86 * Sets the left projection matrix.
87 * @see StereoView::setLeftProjectionMatrix().
88 */
89 void setLeftProjectionMatrix(const SquareMatrix4& leftClip_T_leftView_) override;
90
91 /**
92 * Sets the right projection matrix.
93 * @see StereoView::setRightProjectionMatrix().
94 */
96
97 protected:
98
99 /**
100 * Creates a new perspective view.
101 */
103
104 /**
105 * Destructs a perspective view.
106 */
107 ~GLESStereoView() override;
108
109 /**
110 * Returns the projection matrix of this view.
111 * Protected function as it has no meaning in stereo views.
112 * @return The invalid 4x4 matrix
113 */
115
116 protected:
117
118 /// The transformation between device and world.
120
121 /// The transformation between left view and world.
123
124 /// The transformation between right view and world.
126
127 /// The left projection matrix.
129
130 /// The right projection matrix.
132};
133
134}
135
136}
137
138}
139
140#endif // META_OCEAN_RENDERING_GLES_STEREO_VIEW_H
friend class GLESFactory
Definition GLESStereoView.h:33
HomogenousMatrix4 transformation() const override
Returns the transformation between the center of both views (device) and world.
void setRightProjectionMatrix(const SquareMatrix4 &rightClip_T_rightView_) override
Sets the right projection matrix.
~GLESStereoView() override
Destructs a perspective view.
HomogenousMatrix4 rightTransformation() const override
Returns the position and orientation of the right view in world coordinates (the right extrinsic came...
SquareMatrix4 rightClip_T_rightView_
The right projection matrix.
Definition GLESStereoView.h:131
SquareMatrix4 rightClip_T_leftView_
The left projection matrix.
Definition GLESStereoView.h:128
SquareMatrix4 projectionMatrix() const override
Returns the projection matrix of this view.
GLESStereoView()
Creates a new perspective view.
HomogenousMatrix4 world_T_leftView_
The transformation between left view and world.
Definition GLESStereoView.h:122
void setRightTransformation(const HomogenousMatrix4 &world_T_rightView) override
Sets the position and orientation of the right view in world coordinates (the right extrinsic camera ...
HomogenousMatrix4 world_T_rightView_
The transformation between right view and world.
Definition GLESStereoView.h:125
void setLeftTransformation(const HomogenousMatrix4 &world_T_leftView) override
Sets the position and orientation of the left view in world coordinates (the left extrinsic camera da...
void setLeftProjectionMatrix(const SquareMatrix4 &leftClip_T_leftView_) override
Sets the left projection matrix.
SquareMatrix4 leftProjectionMatrix() const override
Returns the left projection matrix.
HomogenousMatrix4 world_T_device_
The transformation between device and world.
Definition GLESStereoView.h:119
void setTransformation(const HomogenousMatrix4 &world_T_device) override
Sets the position and orientation of the center between left and right view (device) in world coordin...
HomogenousMatrix4 leftTransformation() const override
Returns the position and orientation of the left view in world coordinates (the left extrinsic camera...
SquareMatrix4 rightProjectionMatrix() const override
Returns the right projection matrix.
GLESView()
Creates a new view object.
StereoView()
Creates a new stereo view object.
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
SquareMatrixT4< Scalar > SquareMatrix4
Definition of the SquareMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition SquareMatrix4.h:39
Namespace of the Rendering GLESceneGraph library.
Definition rendering/glescenegraph/android/Android.h:20
Namespace of the Rendering library.
Definition AbsoluteTransform.h:18
The namespace covering the entire Ocean framework.
Definition Accessor.h:15