Ocean
GITriangleStrips.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_TRIANGLE_STRIPS_H
9 #define META_OCEAN_RENDERING_GI_TRIANGLE_STRIPS_H
10 
13 
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GlobalIllumination
23 {
24 
25 /**
26  * This class implements a triangle strips object.
27  * @ingroup renderinggi
28  */
29 class OCEAN_RENDERING_GI_EXPORT GITriangleStrips :
30  virtual public GIStripPrimitive,
31  virtual public TriangleStrips
32 {
33  friend class GIFactory;
34 
35  public:
36 
37  /**
38  * Returns the number of triangle strips defined in this primitive.
39  * @see StripPrimitive::numberStrips().
40  */
41  unsigned int numberStrips() const override;
42 
43  /**
44  * Returns the bounding box of this renderable object.
45  * @see GIRenderable boundingBox().
46  */
47  BoundingBox boundingBox() const override;
48 
49  /**
50  * Returns the bounding sphere of this renderable object.
51  * @see GIRenderable::boundingSphere().
52  */
53  BoundingSphere boundingSphere() const override;
54 
55  /**
56  * Sets the strips of this primitive object.
57  * @see StripPtrimitive::setStrips().
58  */
59  void setStrips(const VertexIndexGroups& strips) override;
60 
61  /**
62  * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
63  * @see GIRenderable::buildTracing().
64  */
65  void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const AttributeSetRef& attributes, const LightSources& lightSources) const override;
66 
67  protected:
68 
69  /**
70  * Creates a new triangle strips object.
71  */
73 
74  /**
75  * Destructs a triangle strips object.
76  */
77  ~GITriangleStrips() override;
78 
79  protected:
80 
81  /// Number of strip elements.
83 
84  /// Number of indices for all strips.
86 };
87 
88 }
89 
90 }
91 
92 }
93 
94 #endif // META_OCEAN_RENDERING_GI_TRIANGLE_STRIPS_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 is the base class for all stripped primitives.
Definition: GIStripPrimitive.h:32
This class implements a triangle strips object.
Definition: GITriangleStrips.h:32
unsigned int numberStrips() const override
Returns the number of triangle strips defined in this primitive.
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.
unsigned int triangleStripsNumberIndices
Number of indices for all strips.
Definition: GITriangleStrips.h:85
BoundingSphere boundingSphere() const override
Returns the bounding sphere of this renderable object.
unsigned int triangleStripsNumberStrips
Number of strip elements.
Definition: GITriangleStrips.h:82
void setStrips(const VertexIndexGroups &strips) override
Sets the strips of this primitive object.
~GITriangleStrips() override
Destructs a triangle strips object.
GITriangleStrips()
Creates a new triangle strips object.
BoundingBox boundingBox() const override
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 for all rendering triangle strips.
Definition: TriangleStrips.h:36
std::vector< VertexIndices > VertexIndexGroups
Definition of a vector holding vertex indices.
Definition: rendering/Rendering.h:125
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