| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsScriptEnginePrerequisites.h"
- #include "BsScriptObject.h"
- #include "Math/BsDegree.h"
- #include "Image/BsColor.h"
- #include "Renderer/BsLight.h"
- namespace bs
- {
- /** @addtogroup ScriptInteropEngine
- * @{
- */
- /** Interop class between C++ & CLR for Light. */
- class BS_SCR_BE_EXPORT ScriptLight : public ScriptObject <ScriptLight>
- {
- public:
- SCRIPT_OBJ(ENGINE_ASSEMBLY, "BansheeEngine", "NativeLight")
- /** Gets the wrapped native LightInternal object. */
- SPtr<Light> getInternal() const { return mLight; }
- private:
- ScriptLight(MonoObject* managedInstance, const HSceneObject& parentSO);
- ~ScriptLight();
- /** Destroys the internal light handler object. */
- void destroy();
- /** @copydoc ScriptObject::_onManagedInstanceDeleted */
- void _onManagedInstanceDeleted() override;
- SPtr<Light> mLight;
- UINT32 mLastUpdateHash;
- /************************************************************************/
- /* CLR HOOKS */
- /************************************************************************/
- static void internal_create(MonoObject* managedInstance, ScriptSceneObject* parentSO);
- static LightType internal_getType(ScriptLight* thisPtr);
- static void internal_setType(ScriptLight* thisPtr, LightType type);
- static bool internal_getCastsShadow(ScriptLight* thisPtr);
- static void internal_setCastsShadow(ScriptLight* thisPtr, bool castsShadow);
- static bool internal_getUseAutoAttenuation(ScriptLight* thisPtr);
- static void internal_setUseAutoAttenuation(ScriptLight* thisPtr, bool value);
- static void internal_getColor(ScriptLight* thisPtr, Color* color);
- static void internal_setColor(ScriptLight* thisPtr, Color color);
- static float internal_getAttenuationRadius(ScriptLight* thisPtr);
- static void internal_setAttenuationRadius(ScriptLight* thisPtr, float radius);
- static float internal_getSourceRadius(ScriptLight* thisPtr);
- static void internal_setSourceRadius(ScriptLight* thisPtr, float radius);
- static float internal_getIntensity(ScriptLight* thisPtr);
- static void internal_setIntensity(ScriptLight* thisPtr, float intensity);
- static float internal_getSpotAngle(ScriptLight* thisPtr);
- static void internal_setSpotAngle(ScriptLight* thisPtr, float spotAngle);
- static float internal_getSpotFalloffAngle(ScriptLight* thisPtr);
- static void internal_setSpotFalloffAngle(ScriptLight* thisPtr, float spotFalloffAngle);
- static void internal_getBounds(ScriptLight* thisPtr, Sphere* bounds);
- static void internal_updateTransform(ScriptLight* thisPtr, ScriptSceneObject* parent);
- static void internal_onDestroy(ScriptLight* instance);
- };
- /** @} */
- }
|