Ocean
GLESGroup.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_GROUP_H
9 #define META_OCEAN_RENDERING_GLES_GROUP_H
10 
13 
14 #include "ocean/rendering/Group.h"
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GLESceneGraph
23 {
24 
25 /**
26  * This class implements a GLESceneGraph group object.
27  * @ingroup renderinggles
28  */
29 class OCEAN_RENDERING_GLES_EXPORT GLESGroup :
30  virtual public GLESNode,
31  virtual public Group
32 {
33  friend class GLESFactory;
34 
35  public:
36 
37  /**
38  * Returns the bounding box of this node.
39  * @see Node::boundingBox().
40  */
41  BoundingBox boundingBox(const bool involveLocalTransformation) const override;
42 
43  /**
44  * Adds a new child node to this group.
45  * @see Group::addChild().
46  */
47  void addChild(const NodeRef& node) override;
48 
49  /**
50  * Registers a light lighting all children of this group node.
51  * @see Group::registerLight().
52  */
53  void registerLight(const LightSourceRef& light) override;
54 
55  /**
56  * Removes a child node connected to this group.
57  * @see Group::removeChild().
58  */
59  void removeChild(const NodeRef& node) override;
60 
61  /**
62  * Unregisters a light.
63  * @see Group::unregisterLight().
64  */
65  void unregisterLight(const LightSourceRef& light) override;
66 
67  /**
68  * Removes all child nodes connected to this group.
69  * @see Group::clear().
70  */
71  void clear() 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_object, const Lights& lights, GLESTraverser& traverser) const override;
78 
79  protected:
80 
81  /**
82  * Creates a new GLESceneGraph group object.
83  */
85 
86  /**
87  * Destructs a GLESceneGraph group object.
88  */
89  ~GLESGroup() override;
90 };
91 
92 }
93 
94 }
95 
96 }
97 
98 #endif // META_OCEAN_RENDERING_GLES_GROUP_H
This class implements a 3D bounding box.
Definition: BoundingBox.h:23
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
void addToTraverser(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projectionMatrix, const HomogenousMatrix4 &camera_T_object, const Lights &lights, GLESTraverser &traverser) const override
Adds this node and all child node to a traverser.
GLESGroup()
Creates a new GLESceneGraph group object.
void registerLight(const LightSourceRef &light) override
Registers a light lighting all children of this group node.
void unregisterLight(const LightSourceRef &light) override
Unregisters a light.
void addChild(const NodeRef &node) override
Adds a new child node to this group.
void removeChild(const NodeRef &node) override
Removes a child node connected to this group.
~GLESGroup() override
Destructs a GLESceneGraph group object.
void clear() override
Removes all child nodes connected to this group.
BoundingBox boundingBox(const bool involveLocalTransformation) const override
Returns the bounding box of this node.
This class implements a GLESceneGraph node object.
Definition: GLESNode.h:40
This class implements a traverser for renderables.
Definition: GLESTraverser.h:39
This is the base class for all rendering groups.
Definition: rendering/Group.h:40
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