Ocean
rendering/LOD.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_LOD_H
9 #define META_OCEAN_RENDERING_LOD_H
10 
12 #include "ocean/rendering/Group.h"
13 
14 namespace Ocean
15 {
16 
17 namespace Rendering
18 {
19 
20 // Forward declaration
21 class LOD;
22 
23 /**
24  * Definition of a smart object reference holding a LOD node.
25  * @see SmartObjectRef, LOD.
26  * @ingroup rendering
27  */
29 
30 /**
31  * This class is the base class for all level-of-detail nodes.
32  * @ingroup rendering
33  */
34 class OCEAN_RENDERING_EXPORT LOD : virtual public Group
35 {
36  public:
37 
38  /**
39  * Definition of a vector holding distance ranges.
40  */
41  typedef std::vector<Scalar> DistanceRanges;
42 
43  public:
44 
45  /**
46  * Returns the n+1 distance ranges for n child nodes.
47  * @return Distance ranges specified
48  * @exception NotSupportedException Is thrown if this function is not supported
49  */
50  virtual DistanceRanges distanceRanges() const;
51 
52  /**
53  * Sets the n+1 distance ranges for n child nodes.
54  * @param ranges Distance ranges for the LOD node
55  * @exception NotSupportedException Is thrown if this function is not supported
56  */
57  virtual void setDistanceRanges(const DistanceRanges& ranges);
58 
59  /**
60  * Returns the type of this object.
61  * @see Object::type().
62  */
63  ObjectType type() const override;
64 
65  protected:
66 
67  /**
68  * Creates a new LOD node.
69  */
70  LOD();
71 
72  /**
73  * Destructs a LOD node.
74  */
75  ~LOD() override;
76 };
77 
78 }
79 
80 }
81 
82 #endif // META_OCEAN_RENDERING_LOD_H
This is the base class for all rendering groups.
Definition: rendering/Group.h:40
This class is the base class for all level-of-detail nodes.
Definition: rendering/LOD.h:35
~LOD() override
Destructs a LOD node.
ObjectType type() const override
Returns the type of this object.
virtual DistanceRanges distanceRanges() const
Returns the n+1 distance ranges for n child nodes.
virtual void setDistanceRanges(const DistanceRanges &ranges)
Sets the n+1 distance ranges for n child nodes.
std::vector< Scalar > DistanceRanges
Definition of a vector holding distance ranges.
Definition: rendering/LOD.h:41
LOD()
Creates a new LOD node.
ObjectType
Definition of different object type.
Definition: Object.h:63
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
SmartObjectRef< LOD > LODRef
Definition of a smart object reference holding a LOD node.
Definition: rendering/LOD.h:21
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15