Ocean
GIGeometry.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_GEOMETRY_H
9 #define META_OCEAN_RENDERING_GI_GEOMETRY_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GlobalIllumination
23 {
24 
25 /**
26  * This class wraps a geometry node.
27  * @ingroup renderinggi
28  */
29 class OCEAN_RENDERING_GI_EXPORT GIGeometry :
30  virtual public GINode,
31  virtual public Geometry
32 {
33  friend class GIFactory;
34 
35  public:
36 
37  /**
38  * Adds a new renderable object to this geometry.
39  * @see Geometry::addRenderable().
40  */
41  void addRenderable(const RenderableRef& renderable, const AttributeSetRef& attributes) override;
42 
43  /**
44  * Removes a renderable object connected to this geometry.
45  * @see Geometry::removeRenderalbe().
46  */
47  void removeRenderable(const RenderableRef& renderable) override;
48 
49  /**
50  * Returns the bounding box of this node.
51  * @see Node::boundingBox().
52  */
53  BoundingBox boundingBox(const bool involveLocalTransformation = true) const override;
54 
55  /**
56  * Returns the bounding sphere of this node.
57  * @see Node::boundingSphere().
58  */
59  BoundingSphere boundingSphere(const bool involveLocalTransformation = true) const override;
60 
61  /**
62  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
63  * @see GINode::buildTracing().
64  */
65  void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const LightSources& lightSources) const override;
66 
67  protected:
68 
69  /**
70  * Creates a new geometry object.
71  */
73 
74  /**
75  * Destructs a geometry object.
76  */
77  ~GIGeometry() override;
78 };
79 
80 }
81 
82 }
83 
84 }
85 
86 #endif // META_OCEAN_RENDERING_GI_GEOMETRY_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 rendering geometry nodes.
Definition: rendering/Geometry.h:43
This class implements a class factory for all Global Illumination objects.
Definition: GIFactory.h:30
This class wraps a geometry node.
Definition: GIGeometry.h:32
void addRenderable(const RenderableRef &renderable, const AttributeSetRef &attributes) override
Adds a new renderable object to this geometry.
BoundingBox boundingBox(const bool involveLocalTransformation=true) const override
Returns the bounding box of this node.
void removeRenderable(const RenderableRef &renderable) override
Removes a renderable object connected to this geometry.
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.
GIGeometry()
Creates a new geometry object.
BoundingSphere boundingSphere(const bool involveLocalTransformation=true) const override
Returns the bounding sphere of this node.
~GIGeometry() override
Destructs a geometry object.
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 class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
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