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.
71 Index32 activeNodeIndex_ = invalidIndex;
72};
73
74}
75
76}
77
78}
79
80#endif // META_OCEAN_RENDERING_GLES_SWITCH_H
This class implements a class factory for all GLESceneGraph objects.
Definition GLESFactory.h:30
This class implements a base for all GLESceneGraph framebuffers.
Definition rendering/glescenegraph/GLESFramebuffer.h:34
This class implements a GLESceneGraph group object.
Definition GLESGroup.h:32
This class implements an OpenGLESceneGraph switch node.
Definition GLESSwitch.h:33
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 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
This class is the base class for all switch nodes.
Definition rendering/Switch.h:37
uint32_t Index32
Definition of a 32 bit index value.
Definition Base.h:84
constexpr VertexIndex invalidIndex
Definition of an invalid vertex index.
Definition rendering/Rendering.h:77
std::vector< LightPair > Lights
Definition of a set holding light sources.
Definition GLESLightSource.h:44
The namespace covering the entire Ocean framework.
Definition Accessor.h:15