Ocean
GITriangles.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_TRIANGLES_H
9 #define META_OCEAN_RENDERING_GI_TRIANGLES_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GlobalIllumination
23 {
24 
25 /**
26  * This class implements triangles.
27  * @ingroup renderinggi
28  */
29 class OCEAN_RENDERING_GI_EXPORT GITriangles :
30  virtual public GIIndependentPrimitive,
31  virtual public Triangles
32 {
33  friend class GIFactory;
34 
35  public:
36 
37  /**
38  * Returns the faces of this triangles object.
39  * @see Triangles::faces().
40  */
41  TriangleFaces faces() const override;
42 
43  /**
44  * Returns the number of triangle faces defined in this primitive.
45  * @see Triangles::numberFaces().
46  */
47  unsigned int numberFaces() const override;
48 
49  /**
50  * Returns the bounding box of this renderable object.
51  * @see GIRenderable boundingBox().
52  */
53  BoundingBox boundingBox() const override;
54 
55  /**
56  * Returns the bounding sphere of this renderable object.
57  * @see GIRenderable::boundingSphere().
58  */
59  BoundingSphere boundingSphere() const override;
60 
61  /**
62  * Sets the faces of this triangles object.
63  * @see Triangles::setFaces().
64  */
65  void setFaces(const TriangleFaces& faces) override;
66 
67  /**
68  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
69  * @see GIRenderable::buildTracing().
70  */
71  void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const AttributeSetRef& attributes, const LightSources& lightSources) const override;
72 
73  protected:
74 
75  /**
76  * Creates a new triangles object.
77  */
79 
80  /**
81  * Destructs a triangles object.
82  */
83  ~GITriangles() override;
84 
85  protected:
86 
87  /// Faces of the triangles.
89 };
90 
91 }
92 
93 }
94 
95 }
96 
97 #endif // META_OCEAN_RENDERING_GI_TRIANGLES_H
This class implements a 3D bounding box.
Definition: BoundingBox.h:23
This class implements a bounding sphere.
Definition: BoundingSphere.h:23
This class implements a class factory for all Global Illumination objects.
Definition: GIFactory.h:30
This class implements the base class for all independent primitive.
Definition: GIIndependentPrimitive.h:32
This class implements triangles.
Definition: GITriangles.h:32
TriangleFaces faces() const override
Returns the faces of this triangles object.
~GITriangles() override
Destructs a triangles object.
void buildTracing(TracingGroup &group, const HomogenousMatrix4 &modelTransform, const AttributeSetRef &attributes, const LightSources &lightSources) const override
Builds the tracing object for this node and adds it to an already existing group of tracing objects.
BoundingBox boundingBox() const override
Returns the bounding box of this renderable object.
TriangleFaces trianglesFaces
Faces of the triangles.
Definition: GITriangles.h:88
unsigned int numberFaces() const override
Returns the number of triangle faces defined in this primitive.
GITriangles()
Creates a new triangles object.
BoundingSphere boundingSphere() const override
Returns the bounding sphere of this renderable object.
void setFaces(const TriangleFaces &faces) override
Sets the faces of this triangles object.
This class implements a group of tracing objects.
Definition: TracingGroup.h:28
This class is the base for all triangles objects.
Definition: Triangles.h:42
std::vector< TriangleFace > TriangleFaces
Definition of a vector holding triangle faces.
Definition: TriangleFace.h:23
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