Ocean
Loading...
Searching...
No Matches
GLESSphere.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_GLES_SPHERE_H
9#define META_OCEAN_RENDERING_GLES_SPHERE_H
10
14
16
17namespace Ocean
18{
19
20namespace Rendering
21{
22
23namespace GLESceneGraph
24{
25
26/**
27 * This class implements a GLESceneGraph spehere node.
28 * @ingroup renderinggles
29 */
30class OCEAN_RENDERING_GLES_EXPORT GLESSphere :
31 virtual public GLESShape,
32 virtual protected GLESTriangleStrips,
33 virtual public Sphere
34{
35 friend class GLESFactory;
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 type of this object.
53 * @see Object::type().
54 */
55 ObjectType type() const override;
56
57 protected:
58
59 /**
60 * Creates a new GLESceneGraph sphere node.
61 */
63
64 /**
65 * Destructs a GLESceneGraph sphere node.
66 */
67 ~GLESSphere() override;
68
69 /**
70 * Rebuilds the primitive vertex, normals and face sets.
71 */
72 void rebuildPrimitives() override;
73
74 /**
75 * Updates the bounding box of this primitive.
76 * @see GLESIndependentPrimitive::updateBoundingBox().
77 */
78 void updateBoundingBox() override;
79
80 private:
81
82 /// Radius of this sphere
83 Scalar radius_ = Scalar(1);
84};
85
86}
87
88}
89
90}
91
92#endif // META_OCEAN_RENDERING_GLES_SPHERE_H
This class implements a class factory for all GLESceneGraph objects.
Definition GLESFactory.h:30
This class is the base class for all GLESceneGraph shape objects.
Definition GLESShape.h:34
This class implements a GLESceneGraph spehere node.
Definition GLESSphere.h:34
void rebuildPrimitives() override
Rebuilds the primitive vertex, normals and face sets.
Scalar radius() const override
Returns the radius of this sphere.
void updateBoundingBox() override
Updates the bounding box of this primitive.
GLESSphere()
Creates a new GLESceneGraph sphere node.
~GLESSphere() override
Destructs a GLESceneGraph sphere node.
bool setRadius(const Scalar radius) override
Sets the radius of this sphere.
ObjectType type() const override
Returns the type of this object.
This class implements a GLESceneGraph triangle strips object.
Definition GLESTriangleStrips.h:32
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
The namespace covering the entire Ocean framework.
Definition Accessor.h:15