Ocean
Loading...
Searching...
No Matches
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
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GlobalIllumination
23{
24
25/**
26 * This class implements a triangle strips object.
27 * @ingroup renderinggi
28 */
29class 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 */
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 */
78
79 protected:
80
81 /// Number of strip elements.
82 unsigned int triangleStripsNumberStrips = 0u;
83
84 /// Number of indices for all strips.
85 unsigned int triangleStripsNumberIndices = 0u;
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
VertexIndexGroups strips() const override
Returns the strips of this primitive object.
GIStripPrimitive()
Creates a new GLESceneGraph stripped primitive object.
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
friend class GIFactory
Definition GITriangleStrips.h:33
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
TriangleStrips()
Creates a new triangle strips object.
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
SmartObjectRef< AttributeSet > AttributeSetRef
Definition of a smart object reference holding an attribute set.
Definition AttributeSet.h:32
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
Namespace of the Rendering Global Illumination library.
Definition GIAttribute.h:23
Namespace of the Rendering library.
Definition AbsoluteTransform.h:18
The namespace covering the entire Ocean framework.
Definition Accessor.h:15