Ocean
Loading...
Searching...
No Matches
GLESDirectionalLight.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_DIRECTIONAL_LIGHT_H
9#define META_OCEAN_RENDERING_GLES_DIRECTIONAL_LIGHT_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GLESceneGraph
23{
24
25/**
26 * This class implements a GLESceneGraph directional light object.
27 * @ingroup renderinggles
28 */
29class OCEAN_RENDERING_GLES_EXPORT GLESDirectionalLight :
30 virtual public GLESLightSource,
31 virtual public DirectionalLight
32{
33 friend class GLESFactory;
34
35 public:
36
37 /**
38 * Returns the direction of this directional light.
39 * @see DirectionalLight::direction().
40 */
41 Vector3 direction() const override;
42
43 /**
44 * Sets the direction of this directional light.
45 * @see DirectionalLight::setDirection().
46 */
47 void setDirection(const Vector3& direction) override;
48
49 /**
50 * Binds this light source.
51 * @see GLESLightSource::bindLight().
52 */
53 void bindLight(GLESShaderProgram& shaderProgram, const HomogenousMatrix4& camera_T_model, const HomogenousMatrix4& camera_T_world, const SquareMatrix3& normalMatrix, const unsigned int index) override;
54
55 protected:
56
57 /**
58 * Creates a new GLESceneGraph directional light object.
59 */
61
62 /**
63 * Destructs a GLESceneGraph directional light object.
64 */
66
67 protected:
68
69 /// Direction of the light in relation to the local coordinate system.
71};
72
73}
74
75}
76
77}
78
79#endif // META_OCEAN_RENDERING_GLES_DIRECTIONAL_LIGHT_H
This class is the base class for all directional lights.
Definition rendering/DirectionalLight.h:37
This class implements a GLESceneGraph directional light object.
Definition GLESDirectionalLight.h:32
~GLESDirectionalLight() override
Destructs a GLESceneGraph directional light object.
Vector3 direction_
Direction of the light in relation to the local coordinate system.
Definition GLESDirectionalLight.h:70
void bindLight(GLESShaderProgram &shaderProgram, const HomogenousMatrix4 &camera_T_model, const HomogenousMatrix4 &camera_T_world, const SquareMatrix3 &normalMatrix, const unsigned int index) override
Binds this light source.
Vector3 direction() const override
Returns the direction of this directional light.
GLESDirectionalLight()
Creates a new GLESceneGraph directional light object.
void setDirection(const Vector3 &direction) override
Sets the direction of this directional light.
This class implements a class factory for all GLESceneGraph objects.
Definition GLESFactory.h:30
This class is the base class for all GLESceneGraph light sources.
Definition GLESLightSource.h:53
This class implements a container for an OpenGL ES shader program.
Definition GLESShaderProgram.h:53
The namespace covering the entire Ocean framework.
Definition Accessor.h:15