Ocean
GINode.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_NODE_H
9 #define META_OCEAN_RENDERING_GI_NODE_H
10 
17 
18 #include "ocean/rendering/Node.h"
19 
20 namespace Ocean
21 {
22 
23 namespace Rendering
24 {
25 
26 namespace GlobalIllumination
27 {
28 
29 /**
30  * This class wraps a Global Illumination node object.
31  * @ingroup renderinggi
32  */
33 class OCEAN_RENDERING_GI_EXPORT GINode :
34  virtual public GIObject,
35  virtual public Node
36 {
37  public:
38 
39  /**
40  * Returns whether the node is visible.
41  * @see Node::visible().
42  */
43  bool visible() const override;
44 
45  /**
46  * Sets whether the node is visible.
47  * @see Node::setVisible().
48  */
49  void setVisible(const bool visible) override;
50 
51  /**
52  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
53  * @param group The existing group of tracing objects to which the new tracing object will be added
54  * @param modelTransform The model transformation matrix for this node
55  * @param lightSources The light sources which will be used to light this node
56  */
57  virtual void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const LightSources& lightSources) const = 0;
58 
59  protected:
60 
61  /**
62  * Creates a new Global Illumination node object.
63  */
64  GINode();
65 
66  /**
67  * Destructs a Global Illumination node object.
68  */
69  ~GINode() override;
70 
71  protected:
72 
73  /// Specifies whether this frame is visible.
75 };
76 
77 }
78 
79 }
80 
81 }
82 
83 #endif // META_OCEAN_RENDERING_GI_NODE_H
This class wraps a Global Illumination node object.
Definition: GINode.h:36
bool visible() const override
Returns whether the node is visible.
GINode()
Creates a new Global Illumination node object.
~GINode() override
Destructs a Global Illumination node object.
virtual void buildTracing(TracingGroup &group, const HomogenousMatrix4 &modelTransform, const LightSources &lightSources) const =0
Builds the tracing object for this node and adds it to an already existing group of tracing objects.
void setVisible(const bool visible) override
Sets whether the node is visible.
bool nodeVisible
Specifies whether this frame is visible.
Definition: GINode.h:74
This class is the base class for all Global Illumination objects.
Definition: GIObject.h:29
This class implements a group of tracing objects.
Definition: TracingGroup.h:28
This is the base class for all rendering nodes.
Definition: rendering/Node.h:47
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