BsScriptLight.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #pragma once
  2. #include "BsScriptEnginePrerequisites.h"
  3. #include "BsScriptObject.h"
  4. #include "BsVector3.h"
  5. #include "BsQuaternion.h"
  6. #include "BsDegree.h"
  7. #include "BsColor.h"
  8. #include "BsLight.h"
  9. namespace BansheeEngine
  10. {
  11. /**
  12. * @brief Interop class between C++ & CLR for Light.
  13. */
  14. class BS_SCR_BE_EXPORT ScriptLight : public ScriptObject <ScriptLight>
  15. {
  16. public:
  17. SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeLight")
  18. /**
  19. * @brief Gets the wrapped native LightInternal object.
  20. */
  21. SPtr<Light> getInternal() const { return mLight; }
  22. private:
  23. ScriptLight(MonoObject* managedInstance, const HSceneObject& parentSO);
  24. ~ScriptLight();
  25. SPtr<Light> mLight;
  26. UINT32 mLastUpdateHash;
  27. /************************************************************************/
  28. /* CLR HOOKS */
  29. /************************************************************************/
  30. static void internal_create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
  31. static LightType internal_getType(ScriptLight* thisPtr);
  32. static void internal_setType(ScriptLight* thisPtr, LightType type);
  33. static bool internal_getCastsShadow(ScriptLight* thisPtr);
  34. static void internal_setCastsShadow(ScriptLight* thisPtr, bool castsShadow);
  35. static Color internal_getColor(ScriptLight* thisPtr);
  36. static void internal_setColor(ScriptLight* thisPtr, Color color);
  37. static float internal_getRange(ScriptLight* thisPtr);
  38. static void internal_setRange(ScriptLight* thisPtr, float range);
  39. static float internal_getIntensity(ScriptLight* thisPtr);
  40. static void internal_setIntensity(ScriptLight* thisPtr, float intensity);
  41. static Degree internal_getSpotAngle(ScriptLight* thisPtr);
  42. static void internal_setSpotAngle(ScriptLight* thisPtr, Degree spotAngle);
  43. static Degree internal_getSpotFalloffAngle(ScriptLight* thisPtr);
  44. static void internal_setSpotFalloffAngle(ScriptLight* thisPtr, Degree spotFalloffAngle);
  45. static Sphere internal_getBounds(ScriptLight* thisPtr);
  46. static void internal_updateTransform(ScriptLight* thisPtr, ScriptSceneObject* parent);
  47. static void internal_onDestroy(ScriptLight* instance);
  48. };
  49. }