Ocean
GLESLOD.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_LOD_H
9 #define META_OCEAN_RENDERING_GLES_LOD_H
10 
13 
14 #include "ocean/rendering/LOD.h"
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 namespace GLESceneGraph
23 {
24 
25 /**
26  * This class implements a GLESceneGraph group object.
27  * @ingroup renderinggles
28  */
29 class OCEAN_RENDERING_GLES_EXPORT GLESLOD :
30  virtual public GLESGroup,
31  virtual public LOD
32 {
33  friend class GLESFactory;
34 
35  public:
36 
37  /**
38  * Returns the n+1 distance ranges for n child nodes.
39  * @see LOD::distanceRanges().
40  */
41  DistanceRanges distanceRanges() const override;
42 
43  /**
44  * Sets the n+1 distance ranges for n child nodes.
45  * @see LOD::setDistanceRanges().
46  */
47  void setDistanceRanges(const DistanceRanges& ranges) override;
48 
49  /**
50  * Adds this node and all child node to a traverser.
51  * @see GLESNode::addToTraverser().
52  */
53  void addToTraverser(const GLESFramebuffer& framebuffer, const SquareMatrix4& projectionMatrix, const HomogenousMatrix4& camera_T_object, const Lights& lights, GLESTraverser& traverser) const override;
54 
55  protected:
56 
57  /**
58  * Creates a new GLESceneGraph group object.
59  */
61 
62  /**
63  * Destructs a GLESceneGraph group object.
64  */
65  ~GLESLOD() override;
66 
67  protected:
68 
69  /// The distance ranges for the individual nodes, n+1 ranges for n childs.
71 };
72 
73 }
74 
75 }
76 
77 }
78 
79 #endif // META_OCEAN_RENDERING_GLES_LOD_H
This class implements a class factory for all GLESceneGraph objects.
Definition: GLESFactory.h:30
This class implements a base for all GLESceneGraph framebuffers.
Definition: rendering/glescenegraph/GLESFramebuffer.h:34
This class implements a GLESceneGraph group object.
Definition: GLESGroup.h:32
This class implements a GLESceneGraph group object.
Definition: GLESLOD.h:32
DistanceRanges distanceRanges_
The distance ranges for the individual nodes, n+1 ranges for n childs.
Definition: GLESLOD.h:70
~GLESLOD() override
Destructs a GLESceneGraph group object.
GLESLOD()
Creates a new GLESceneGraph group object.
void setDistanceRanges(const DistanceRanges &ranges) override
Sets the n+1 distance ranges for n child nodes.
DistanceRanges distanceRanges() const override
Returns the n+1 distance ranges for n child nodes.
void addToTraverser(const GLESFramebuffer &framebuffer, const SquareMatrix4 &projectionMatrix, const HomogenousMatrix4 &camera_T_object, const Lights &lights, GLESTraverser &traverser) const override
Adds this node and all child node to a traverser.
This class implements a traverser for renderables.
Definition: GLESTraverser.h:39
This class is the base class for all level-of-detail nodes.
Definition: rendering/LOD.h:35
std::vector< Scalar > DistanceRanges
Definition of a vector holding distance ranges.
Definition: rendering/LOD.h:41
std::vector< LightPair > Lights
Definition of a set holding light sources.
Definition: GLESLightSource.h:44
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15