Ocean
Loading...
Searching...
No Matches
GICylinder.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_CYLINDER_H
9#define META_OCEAN_RENDERING_GI_CYLINDER_H
10
14
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23namespace GlobalIllumination
24{
25
26/**
27 * This class implements a cylinder object.
28 * @ingroup renderinggi
29 */
30class OCEAN_RENDERING_GI_EXPORT GICylinder :
31 virtual public GIShape,
32 virtual protected GITriangleStrips,
33 virtual public Cylinder
34{
35 friend class GIFactory;
36
37 public:
38
39 /**
40 * Returns the height of this cylinder.
41 * @see Cylinder::height().
42 */
43 Scalar height() const override;
44
45 /**
46 * Returns the radius of this cylinder.
47 * @see Cylinder::radius().
48 */
49 Scalar radius() const override;
50
51 /**
52 * Sets the height of this cylinder.
53 * @see Cylinder::setHeight().
54 */
55 bool setHeight(const Scalar height) override;
56
57 /**
58 * Sets the radius of this cylinder.
59 * @see Cylinder::setRadius().
60 */
61 bool setRadius(const Scalar radius) override;
62
63 /**
64 * Sets whether the top face of the cylinder is visible.
65 * @see Cylinder::setTop().
66 */
67 bool setTop(const bool visible) override;
68
69 /**
70 * Sets whether the side face of the cylinder is visible.
71 * @see Cylinder::setSide().
72 */
73 bool setSide(const bool visible) override;
74
75 /**
76 * Sets whether the bottom face of the cylinder is visible.
77 * @see Cylinder::setBottom().
78 */
79 bool setBottom(const bool visible) override;
80
81 /**
82 * Returns the bounding box of this renderable object.
83 * @see GIRenderable boundingBox().
84 */
85 BoundingBox boundingBox() const override;
86
87 /**
88 * Returns the bounding sphere of this renderable object.
89 * @see GIRenderable::boundingSphere().
90 */
92
93 /**
94 * Returns the type of this object.
95 * @see Object::type().
96 */
97 ObjectType type() const override;
98
99 protected:
100
101 /**
102 * Creates a new cylinder object.
103 */
105
106 /**
107 * Destructs a cylinder object.
108 */
109 ~GICylinder() override;
110
111 /**
112 * Rebuilds the primitive vertex, normals and face sets.
113 */
115
116 protected:
117
118 /// Holds the height of this cylinder.
120
121 /// Holds the radius of this cylinder.
123
124 /// Holds the state whether the top face is visible.
126
127 /// Holds the state whether the side face is visible.
129
130 /// Holds the state whether the bottom face is visible.
132};
133
134}
135
136}
137
138}
139
140#endif // META_OCEAN_RENDERING_GI_CYLINDER_H
This class implements a 3D bounding box.
Definition BoundingBox.h:23
This class implements a bounding sphere.
Definition BoundingSphere.h:23
This class is the base class for all cylinders.
Definition rendering/Cylinder.h:36
This class implements a cylinder object.
Definition GICylinder.h:34
ObjectType type() const override
Returns the type of this object.
Scalar cylinderHeight
Holds the height of this cylinder.
Definition GICylinder.h:119
bool setRadius(const Scalar radius) override
Sets the radius of this cylinder.
BoundingSphere boundingSphere() const override
Returns the bounding sphere of this renderable object.
Scalar height() const override
Returns the height of this cylinder.
Scalar radius() const override
Returns the radius of this cylinder.
~GICylinder() override
Destructs a cylinder object.
void rebuildPrimitives()
Rebuilds the primitive vertex, normals and face sets.
Scalar cylinderRadius
Holds the radius of this cylinder.
Definition GICylinder.h:122
BoundingBox boundingBox() const override
Returns the bounding box of this renderable object.
GICylinder()
Creates a new cylinder object.
bool setHeight(const Scalar height) override
Sets the height of this cylinder.
bool cylinderBottom
Holds the state whether the bottom face is visible.
Definition GICylinder.h:131
bool cylinderTop
Holds the state whether the top face is visible.
Definition GICylinder.h:125
bool setTop(const bool visible) override
Sets whether the top face of the cylinder is visible.
bool cylinderSide
Holds the state whether the side face is visible.
Definition GICylinder.h:128
bool setBottom(const bool visible) override
Sets whether the bottom face of the cylinder is visible.
bool setSide(const bool visible) override
Sets whether the side face of the cylinder is visible.
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 triangle strips object.
Definition GITriangleStrips.h:32
ObjectType
Definition of different object type.
Definition Object.h:63
float Scalar
Definition of a scalar type.
Definition Math.h:129
The namespace covering the entire Ocean framework.
Definition Accessor.h:15