Aether3D Game Engine
PointLightComponent.hpp
1 #ifndef POINT_LIGHT_HPP
2 #define POINT_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  float GetRadius() const { return radius; }
25 
27  void SetRadius( float aRadius ) { radius = aRadius; }
28 
30  std::string GetSerialized() const;
31 
32  private:
33  friend class GameObject;
34  friend class Scene;
35 
37  static int Type() { return 8; }
38 
40  static unsigned New();
41 
43  static PointLightComponent* Get( unsigned index );
44 
45  RenderTexture shadowMap;
46  float radius = 10;
47  GameObject* gameObject = nullptr;
48  bool castsShadow = false;
49  };
50 }
51 #endif
void SetCastShadow(bool enable, int shadowMapSize)
float GetRadius() const
Definition: PointLightComponent.hpp:24
Definition: AudioClip.hpp:4
Render texture.
Definition: RenderTexture.hpp:12
bool CastsShadow() const
Definition: PointLightComponent.hpp:17
Point light illuminates the scene from a given position into all directions.
Definition: PointLightComponent.hpp:10
std::string GetSerialized() const
GameObject is composed of components that define its behavior.
Definition: GameObject.hpp:9
class GameObject * GetGameObject() const
Definition: PointLightComponent.hpp:14
Contains game objects in a transform hierarchy.
Definition: Scene.hpp:17
void SetRadius(float aRadius)
Definition: PointLightComponent.hpp:27