Ocean
Loading...
Searching...
No Matches
GISphere.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_SPHERE_H
9#define META_OCEAN_RENDERING_GI_SPHERE_H
10
14
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23namespace GlobalIllumination
24{
25
26/**
27 * This class implements a spehere node.
28 * @ingroup renderinggi
29 */
30class OCEAN_RENDERING_GI_EXPORT GISphere :
31 virtual public GIShape,
32 virtual protected GITriangleStrips,
33 virtual public Sphere
34{
35 friend class GIFactory;
36
37 public:
38
39 /**
40 * Returns the radius of this sphere.
41 * @see Sphere::radius().
42 */
43 Scalar radius() const override;
44
45 /**
46 * Sets the radius of this sphere.
47 * @see Sphere::setRadius().
48 */
49 bool setRadius(const Scalar radius) 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 sphere node.
79 */
81
82 /**
83 * Destructs a sphere node.
84 */
85 ~GISphere() override;
86
87 /**
88 * Rebuilds the primitive vertex, normals and face sets.
89 */
91
92 private:
93
94 /// Radius of this sphere
96};
97
98}
99
100}
101
102}
103
104#endif // META_OCEAN_RENDERING_GI_SPHERE_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 Global Illumination shape objects.
Definition GIShape.h:34
This class implements a spehere node.
Definition GISphere.h:34
BoundingBox boundingBox() const override
Returns the bounding box of this renderable object.
BoundingSphere boundingSphere() const override
Returns the bounding sphere of this renderable 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.
ObjectType type() const override
Returns the type of this object.
bool setRadius(const Scalar radius) override
Sets the radius of this sphere.
~GISphere() override
Destructs a sphere node.
void rebuildPrimitives()
Rebuilds the primitive vertex, normals and face sets.
Scalar radius() const override
Returns the radius of this sphere.
Scalar sphereRadius
Radius of this sphere.
Definition GISphere.h:95
This class implements a triangle strips object.
Definition GITriangleStrips.h:32
This class implements a group of tracing objects.
Definition TracingGroup.h:28
ObjectType
Definition of different object type.
Definition Object.h:63
This class is the base class for all spheres.
Definition rendering/Sphere.h:36
float Scalar
Definition of a scalar type.
Definition Math.h:129
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