Ocean
Loading...
Searching...
No Matches
GLESSwitch.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_SWITCH_H
9#define META_OCEAN_RENDERING_GLES_SWITCH_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GLESceneGraph
23{
24
25/**
26 * This class implements an OpenGLESceneGraph switch node.
27 * @see Switch
28 * @ingroup renderinggles
29 */
30class OCEAN_RENDERING_GLES_EXPORT GLESSwitch :
31 virtual public GLESGroup,
32 virtual public Switch
33{
34 friend class GLESFactory;
35
36 public:
37
38 /**
39 * Returns the index of the active node.
40 * @see Switch::activeNode().
41 */
42 Index32 activeNode() const override;
43
44 /**
45 * Sets the index of the active node.
46 * @see Switch::setActiveNode().
47 */
48 void setActiveNode(const Index32 index) override;
49
50 /**
51 * Adds this node and all child node to a traverser.
52 * @see GLESNode::addToTraverser().
53 */
54 void addToTraverser(const GLESFramebuffer& framebuffer, const SquareMatrix4& projectionMatrix, const HomogenousMatrix4& camera_T_parent, const Lights& lights, GLESTraverser& traverser) const override;
55
56 private:
57
58 /**
59 * Creates a new OpenGLESceneGraph switch object.
60 */
62
63 /**
64 * Destructs an OpenGLESceneGraph switch object.
65 */
66 ~GLESSwitch() override;
67
68 private:
69
70 /// Index of the child to render.
72};
73
74}
75
76}
77
78}
79
80#endif // META_OCEAN_RENDERING_GLES_SWITCH_H
This class implements a base for all GLESceneGraph framebuffers.
Definition rendering/glescenegraph/GLESFramebuffer.h:34
GLESGroup()
Creates a new GLESceneGraph group object.
friend class GLESFactory
Definition GLESSwitch.h:34
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.
Index32 activeNodeIndex_
Index of the child to render.
Definition GLESSwitch.h:71
Index32 activeNode() const override
Returns the index of the active node.
GLESSwitch()
Creates a new OpenGLESceneGraph switch object.
void setActiveNode(const Index32 index) override
Sets the index of the active node.
~GLESSwitch() override
Destructs an OpenGLESceneGraph switch object.
This class implements a traverser for renderables.
Definition GLESTraverser.h:39
Switch()
Creates a new switch object.
static constexpr Index32 invalidIndex
Definitio of an invalid index.
Definition rendering/Switch.h:43
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
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
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