Aether3D Game Engine
DirectionalLightComponent.hpp
1 #ifndef DIRECTIONAL_LIGHT_HPP
2 #define DIRECTIONAL_LIGHT_HPP
3 
4 #include <string>
5 #include "RenderTexture.hpp"
6 
7 namespace ae3d
8 {
11  {
12  public:
14  class GameObject* GetGameObject() const { return gameObject; }
15 
17  bool CastsShadow() const { return castsShadow; }
18 
21  void SetCastShadow( bool enable, int shadowMapSize );
22 
24  std::string GetSerialized() const;
25 
26  private:
27  friend class GameObject;
28  friend class Scene;
29 
31  static int Type() { return 6; }
32 
34  static unsigned New();
35 
37  static DirectionalLightComponent* Get( unsigned index );
38 
39  RenderTexture shadowMap;
40  GameObject* gameObject = nullptr;
41  bool castsShadow = false;
42  };
43 }
44 #endif
class GameObject * GetGameObject() const
Definition: DirectionalLightComponent.hpp:14
Definition: AudioClip.hpp:4
Directional light illuminates the Scene from a given direction. Ideal for sunlight.
Definition: DirectionalLightComponent.hpp:10
void SetCastShadow(bool enable, int shadowMapSize)
Render texture.
Definition: RenderTexture.hpp:12
GameObject is composed of components that define its behavior.
Definition: GameObject.hpp:9
bool CastsShadow() const
Definition: DirectionalLightComponent.hpp:17
std::string GetSerialized() const
Contains game objects in a transform hierarchy.
Definition: Scene.hpp:17