Ocean
Loading...
Searching...
No Matches
GLESAbsoluteTransform.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_ABSOLUTE_TRANSFORM_H
9#define META_OCEAN_RENDERING_GLES_ABSOLUTE_TRANSFORM_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GLESceneGraph
23{
24
25/**
26 * This class implements a GLESceneGraph absolute transform node.
27 * @ingroup renderinggles
28 */
29class OCEAN_RENDERING_GLES_EXPORT GLESAbsoluteTransform :
30 virtual public GLESGroup,
31 virtual public AbsoluteTransform
32{
33 friend class GLESFactory;
34
35 public:
36
37 /**
38 * Returns the current transfomation type.
39 * @see AbsoluteTransform::transformationType().
40 */
42
43 /**
44 * Returns the relative screen position of the head-up node.
45 * @see AbsoluteTransformation::headUpRelativePosition().
46 */
48
49 /**
50 * Returns the transformation which is applied on top of the absolute transformation.
51 * @see AbsoluteTransformation::transformation().
52 */
54
55 /**
56 * Sets or changes the transfomation type.
57 * @see AbsoluteTransform::setTransformationType().
58 */
60
61 /**
62 * Sets the relative screen position of the head-up node.
63 * @see AbsoluteTransform::setHeadUpRelativePosition().
64 */
65 bool setHeadUpRelativePosition(const Vector2& position) override;
66
67 /**
68 * Sets an additional transformation which is applied on top of the absolute transformation.
69 * @see AbsoluteTransform::setTransformation().
70 */
71 void setTransformation(const HomogenousMatrix4& absolute_T_children) override;
72
73 /**
74 * Adds this node and all child node to a traverser.
75 * @see GLESNode::addToTraverser().
76 */
77 void addToTraverser(const GLESFramebuffer& framebuffer, const SquareMatrix4& projectionMatrix, const HomogenousMatrix4& camera_T_parent, const Lights& lights, GLESTraverser& traverser) const override;
78
79 protected:
80
81 /**
82 * Creates a new GLESceneGraph absolute transform node.
83 */
85
86 /**
87 * Destructs a GLESceneGraph absolute transform node.
88 */
90
91 protected:
92
93 /// The transformation type to be used.
95
96 /// The relative screen position, for headup transformations.
98
99 /// The transformation between all children and the absolute transformation.
101};
102
103}
104
105}
106
107}
108
109#endif // META_OCEAN_RENDERING_GLES_ABSOLUTE_TRANSFORM_H
ObjectType type() const override
Returns the type of this object.
AbsoluteTransform()
Creates a new absolute transform node.
TransformationType
Defines different transformation types.
Definition AbsoluteTransform.h:43
@ TT_NONE
Transformation with no explicit absolute coordinate system.
Definition AbsoluteTransform.h:45
friend class GLESFactory
Definition GLESAbsoluteTransform.h:33
TransformationType transformationType() const override
Returns the current transfomation type.
void addToTraverser(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projectionMatrix, const HomogenousMatrix4 &camera_T_parent, const Lights &lights, GLESTraverser &traverser) const override
Adds this node and all child node to a traverser.
TransformationType transformationType_
The transformation type to be used.
Definition GLESAbsoluteTransform.h:94
HomogenousMatrix4 transformation() const override
Returns the transformation which is applied on top of the absolute transformation.
bool setTransformationType(const TransformationType type) override
Sets or changes the transfomation type.
Vector2 headUpRelativePosition() const override
Returns the relative screen position of the head-up node.
HomogenousMatrix4 absolute_T_children_
The transformation between all children and the absolute transformation.
Definition GLESAbsoluteTransform.h:100
GLESAbsoluteTransform()
Creates a new GLESceneGraph absolute transform node.
bool setHeadUpRelativePosition(const Vector2 &position) override
Sets the relative screen position of the head-up node.
Vector2 headUpPosition_
The relative screen position, for headup transformations.
Definition GLESAbsoluteTransform.h:97
~GLESAbsoluteTransform() override
Destructs a GLESceneGraph absolute transform node.
void setTransformation(const HomogenousMatrix4 &absolute_T_children) override
Sets an additional transformation which is applied on top of the absolute transformation.
This class implements a base for all GLESceneGraph framebuffers.
Definition rendering/glescenegraph/GLESFramebuffer.h:34
GLESGroup()
Creates a new GLESceneGraph group object.
This class implements a traverser for renderables.
Definition GLESTraverser.h:39
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
VectorT2< Scalar > Vector2
Definition of a 2D vector.
Definition Vector2.h:28
SquareMatrixT4< Scalar > SquareMatrix4
Definition of the SquareMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION either with ...
Definition SquareMatrix4.h:39
float Scalar
Definition of a scalar type.
Definition Math.h:129
std::vector< LightPair > Lights
Definition of a set holding light sources.
Definition GLESLightSource.h:44
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