Ocean
GIRenderable.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_RENDERABLE_H
9 #define META_OCEAN_RENDERING_GI_RENDERABLE_H
10 
15 
16 #include "ocean/math/Line3.h"
20 
22 #include "ocean/rendering/Node.h"
24 #include "ocean/rendering/Scene.h"
25 
26 namespace Ocean
27 {
28 
29 namespace Rendering
30 {
31 
32 namespace GlobalIllumination
33 {
34 
35 // Forward declaration.
36 class GIFramebuffer;
37 
38 /**
39  * This class is the base class for all Global Illumination renderable objects.
40  * @ingroup renderinggi
41  */
42 class OCEAN_RENDERING_GI_EXPORT GIRenderable :
43  virtual public GIObject,
44  virtual public Renderable
45 {
46  public:
47 
48  /**
49  * Returns the bounding box of this renderable object.
50  * @return Bounding box
51  */
52  virtual BoundingBox boundingBox() const = 0;
53 
54  /**
55  * Returns the bounding sphere of this renderable object.
56  * @return Bounding sphere
57  */
58  virtual BoundingSphere boundingSphere() const = 0;
59 
60  /**
61  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
62  * @param group The existing group of tracing objects to which the new tracing object will be added
63  * @param modelTransform The model transformation matrix for this node
64  * @param attributes The attributes of this renderable object defining the appearance of the object
65  * @param lightSources The light sources which will be used to light this node
66  */
67  virtual void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const AttributeSetRef& attributes, const LightSources& lightSources) const = 0;
68 
69  protected:
70 
71  /**
72  * Creates a new Global Illumination renderable object.
73  */
75 
76  /**
77  * Destructs a Global Illumination renderable object.
78  */
79  ~GIRenderable() override;
80 };
81 
82 }
83 
84 }
85 
86 }
87 
88 #endif // META_OCEAN_RENDERING_GI_RENDERABLE_H
This class implements a 3D bounding box.
Definition: BoundingBox.h:23
This class implements a bounding sphere.
Definition: BoundingSphere.h:23
This class is the base class for all Global Illumination objects.
Definition: GIObject.h:29
This class is the base class for all Global Illumination renderable objects.
Definition: GIRenderable.h:45
virtual BoundingSphere boundingSphere() const =0
Returns the bounding sphere of this renderable object.
virtual void buildTracing(TracingGroup &group, const HomogenousMatrix4 &modelTransform, const AttributeSetRef &attributes, const LightSources &lightSources) const =0
Builds the tracing object for this node and adds it to an already existing group of tracing objects.
GIRenderable()
Creates a new Global Illumination renderable object.
~GIRenderable() override
Destructs a Global Illumination renderable object.
virtual BoundingBox boundingBox() const =0
Returns the bounding box of this renderable object.
This class implements a group of tracing objects.
Definition: TracingGroup.h:28
This class is the base class for all renderable objects.
Definition: Renderable.h:38
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