Ocean
rendering/DirectionalLight.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_DIRECTIONAL_LIGHT_H
9 #define META_OCEAN_RENDERING_DIRECTIONAL_LIGHT_H
10 
13 
14 #include "ocean/math/Quaternion.h"
15 
16 namespace Ocean
17 {
18 
19 namespace Rendering
20 {
21 
22 // Forward declaration
23 class DirectionalLight;
24 
25 /**
26  * Definition of a smart object reference holding a directional light.
27  * @see SmartObjectRef, DirectionalLight.
28  * @ingroup rendering
29  */
31 
32 /**
33  * This class is the base class for all directional lights.
34  * @ingroup rendering
35  */
36 class OCEAN_RENDERING_EXPORT DirectionalLight : virtual public LightSource
37 {
38  public:
39 
40  /**
41  * Returns the direction of this directional light.
42  * @return Light direction
43  * @exception NotSupportedException Is thrown if this function is not supported
44  */
45  virtual Vector3 direction() const;
46 
47  /**
48  * Sets the direction of this directional light.
49  * @param direction Direction to set
50  * @exception NotSupportedException Is thrown if this function is not supported
51  */
52  virtual void setDirection(const Vector3& direction);
53 
54  /**
55  * Returns the type of this object.
56  * @see Object::type().
57  */
58  ObjectType type() const override;
59 
60  protected:
61 
62  /**
63  * Creates a new directional light.
64  */
66 
67  /**
68  * Destructs a directional light.
69  */
70  ~DirectionalLight() override;
71 };
72 
73 }
74 
75 }
76 
77 #endif // META_OCEAN_RENDERING_DIRECTIONAL_LIGHT_H
This class is the base class for all directional lights.
Definition: rendering/DirectionalLight.h:37
ObjectType type() const override
Returns the type of this object.
~DirectionalLight() override
Destructs a directional light.
virtual Vector3 direction() const
Returns the direction of this directional light.
DirectionalLight()
Creates a new directional light.
virtual void setDirection(const Vector3 &direction)
Sets the direction of this directional light.
This is the base class for all lights.
Definition: LightSource.h:38
ObjectType
Definition of different object type.
Definition: Object.h:63
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
SmartObjectRef< DirectionalLight > DirectionalLightRef
Definition of a smart object reference holding a directional light.
Definition: rendering/DirectionalLight.h:23
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15