Ocean
Loading...
Searching...
No Matches
GIBox.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_BOX_H
9#define META_OCEAN_RENDERING_GI_BOX_H
10
14
15#include "ocean/rendering/Box.h"
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23namespace GlobalIllumination
24{
25
26/**
27 * This class implements a GLESceneGraph box object.
28 * @ingroup renderinggles
29 */
30class OCEAN_RENDERING_GI_EXPORT GIBox :
31 virtual public GIShape,
32 virtual protected GITriangles,
33 virtual public Box
34{
35 friend class GIFactory;
36
37 public:
38
39 /**
40 * Returns the dimensions of the box.
41 * @see Box::size().
42 */
43 Vector3 size() const override;
44
45 /**
46 * Sets the dimensions of the box.
47 * @see Box::setSize().
48 */
49 bool setSize(const Vector3& size) override;
50
51 /**
52 * Returns the bounding box of this renderable object.
53 * @see GIRenderable boundingBox().
54 */
55 BoundingBox boundingBox() const override;
56
57 /**
58 * Returns the bounding sphere of this renderable object.
59 * @see GIRenderable::boundingSphere().
60 */
62
63 /**
64 * Returns the type of this object.
65 * @see Object::type().
66 */
67 ObjectType type() const override;
68
69 /**
70 * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
71 * @see GIRenderable::buildTracing().
72 */
73 void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const AttributeSetRef& attributes, const LightSources& lightSources) const override;
74
75 protected:
76
77 /**
78 * Creates a new box object.
79 */
81
82 /**
83 * Destructs a box object.
84 */
85 ~GIBox() override;
86
87 /**
88 * Rebuilds the primitive vertex, normals and face sets.
89 */
91
92 protected:
93
94 /// Dimension of the box.
96
97 /// Diagonal of the box.
99};
100
101}
102
103}
104
105}
106
107#endif // META_OCEAN_RENDERING_GI_BOX_H
This class implements a 3D bounding box.
Definition BoundingBox.h:23
This class implements a bounding sphere.
Definition BoundingSphere.h:23
Box()
Creates a new box object with default edge length (1, 1, 1) The box will be defined about the origin...
Scalar boxDiagonal
Diagonal of the box.
Definition GIBox.h:98
Vector3 boxSize
Dimension of the box.
Definition GIBox.h:95
void rebuildPrimitives()
Rebuilds the primitive vertex, normals and face sets.
Vector3 size() const override
Returns the dimensions of the box.
bool setSize(const Vector3 &size) override
Sets the dimensions of the box.
friend class GIFactory
Definition GIBox.h:35
~GIBox() override
Destructs a box object.
BoundingSphere boundingSphere() const override
Returns the bounding sphere of this renderable object.
BoundingBox boundingBox() const override
Returns the bounding box of this renderable object.
ObjectType type() const override
Returns the type of this 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.
GIShape()
Creates a new Global Illumination shape object.
GITriangles()
Creates a new triangles object.
This class implements a group of tracing objects.
Definition TracingGroup.h:28
ObjectType
Definition of different object type.
Definition Object.h:62
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
VectorT3< Scalar > Vector3
Definition of a 3D vector.
Definition Vector3.h:29
float Scalar
Definition of a scalar type.
Definition Math.h:129
SmartObjectRef< AttributeSet > AttributeSetRef
Definition of a smart object reference holding an attribute set.
Definition AttributeSet.h:32
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