Ocean
GIGroup.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_GI_GROUP_H
9 #define META_OCEAN_RENDERING_GI_GROUP_H
10 
13 
14 #include "ocean/rendering/Group.h"
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GlobalIllumination
23 {
24 
25 /**
26  * This class wraps a Global Illumination group object.
27  * @ingroup renderinggi
28  */
29 class OCEAN_RENDERING_GI_EXPORT GIGroup :
30  virtual public GINode,
31  virtual public Group
32 {
33  friend class GIFactory;
34 
35  public:
36 
37  /**
38  * Adds a new child node to this group.
39  * @see Group::addChild().
40  */
41  void addChild(const NodeRef& node) override;
42 
43  /**
44  * Registers a light lighting all childs of this group node.
45  * @see Group::registerLight().
46  */
47  void registerLight(const LightSourceRef& light) override;
48 
49  /**
50  * Removes a child node connected to this group.
51  * @see Group::removeChild().
52  */
53  void removeChild(const NodeRef& node) override;
54 
55  /**
56  * Unregisters a light.
57  * @see Group::unregisterLight().
58  */
59  void unregisterLight(const LightSourceRef& light) override;
60 
61  /**
62  * Returns the bounding box of this node.
63  * @see Node::boundingBox().
64  */
65  BoundingBox boundingBox(const bool involveLocalTransformation) const override;
66 
67  /**
68  * Removes all cgukd nodes connected to this group.
69  * @see Group::clear().
70  */
71  void clear() override;
72 
73  /**
74  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
75  * @see GINode::buildTracing().
76  */
77  void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const LightSources& lightSources) const override;
78 
79  protected:
80 
81  /**
82  * Creates a new Global Illumination group object.
83  */
85 
86  /**
87  * Destructs a Global Illumination group object.
88  */
89  ~GIGroup() override;
90 };
91 
92 }
93 
94 }
95 
96 }
97 
98 #endif // META_OCEAN_RENDERING_GI_GROUP_H
This class implements a 3D bounding box.
Definition: BoundingBox.h:23
This class implements a class factory for all Global Illumination objects.
Definition: GIFactory.h:30
This class wraps a Global Illumination group object.
Definition: GIGroup.h:32
GIGroup()
Creates a new Global Illumination group object.
void clear() override
Removes all cgukd nodes connected to this group.
void addChild(const NodeRef &node) override
Adds a new child node to this group.
BoundingBox boundingBox(const bool involveLocalTransformation) const override
Returns the bounding box of this node.
void buildTracing(TracingGroup &group, const HomogenousMatrix4 &modelTransform, const LightSources &lightSources) const override
Builds the tracing object for this node and adds it to an already existing group of tracing objects.
~GIGroup() override
Destructs a Global Illumination group object.
void unregisterLight(const LightSourceRef &light) override
Unregisters a light.
void removeChild(const NodeRef &node) override
Removes a child node connected to this group.
void registerLight(const LightSourceRef &light) override
Registers a light lighting all childs of this group node.
This class wraps a Global Illumination node object.
Definition: GINode.h:36
This class implements a group of tracing objects.
Definition: TracingGroup.h:28
This is the base class for all rendering groups.
Definition: rendering/Group.h:40
std::vector< LightPair > LightSources
Definition of a vector holding light pairs.
Definition: GILightSource.h:40
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15