Cafu Engine
CompLightRadiosity.hpp
1 /*
2 Cafu Engine, http://www.cafu.de/
3 Copyright (c) Carsten Fuchs and other contributors.
4 This project is licensed under the terms of the MIT license.
5 */
6 
7 #ifndef CAFU_GAMESYS_COMPONENT_RADIOSITY_LIGHT_HPP_INCLUDED
8 #define CAFU_GAMESYS_COMPONENT_RADIOSITY_LIGHT_HPP_INCLUDED
9 
10 #include "CompLight.hpp"
11 
12 
13 namespace cf
14 {
15  namespace GameSys
16  {
17  /// This component adds a radiosity point light source to its entity.
19  {
20  public:
21 
22  /// The constructor.
24 
25  /// The copy constructor.
26  /// @param Comp The component to create a copy of.
28 
29  Vector3fT GetColor() const { return m_Color.Get(); }
30  float GetIntensity() const { return m_Intensity.Get(); }
31  float GetConeAngle() const { return m_ConeAngle.Get(); }
32 
33 
34  // Base class overrides.
36  const char* GetName() const { return "RadiosityLight"; }
37 
38 
39  // The TypeSys related declarations for this class.
40  const cf::TypeSys::TypeInfoT* GetType() const { return &TypeInfo; }
41  static void* CreateInstance(const cf::TypeSys::CreateParamsT& Params);
42  static const cf::TypeSys::TypeInfoT TypeInfo;
43 
44 
45  protected:
46 
47  // The Lua API methods of this class.
48  static int toString(lua_State* LuaState);
49 
50  static const luaL_Reg MethodsList[]; ///< The list of Lua methods for this class.
51  static const char* DocClass;
52  static const cf::TypeSys::MethsDocT DocMethods[];
53  static const cf::TypeSys::VarsDocT DocVars[];
54 
55 
56  private:
57 
59  TypeSys::VarT<float> m_Intensity;
60  TypeSys::VarT<float> m_ConeAngle;
61  };
62  }
63 }
64 
65 #endif
The common base class for light source components.
Definition: CompLight.hpp:18
This is a "wrapper" around a normal C++ variable.
Definition: SetCompVar.hpp:15
This class represents a polymorphic 3-dimensional vector.
Definition: Misc.hpp:11
const char * GetName() const
Returns the name of this component.
Definition: CompLightRadiosity.hpp:36
This component adds a radiosity point light source to its entity.
Definition: CompLightRadiosity.hpp:18
ComponentRadiosityLightT()
The constructor.
Definition: CompLightRadiosity.cpp:42
static const luaL_Reg MethodsList[]
The list of Lua methods for this class.
Definition: CompLightRadiosity.hpp:50
ComponentRadiosityLightT * Clone() const
The virtual copy constructor.
Definition: CompLightRadiosity.cpp:66
Definition: TypeSys.hpp:52
Definition: TypeSys.hpp:57
This class keeps type information (about an entity class that occurs in the game).
Definition: TypeSys.hpp:79
const T & Get() const
Returns the value of this variable.
Definition: Variables.hpp:182
Definition: TypeSys.hpp:68