| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899 |
- $#include "Light.h"
- enum LightType
- {
- LIGHT_DIRECTIONAL = 0,
- LIGHT_SPOT,
- LIGHT_POINT
- };
- struct BiasParameters
- {
- BiasParameters();
- BiasParameters(float constantBias, float slopeScaledBias);
- ~BiasParameters();
- };
- struct CascadeParameters
- {
- CascadeParameters();
- CascadeParameters(float split1, float split2, float split3, float split4, float fadeStart, float biasAutoAdjust = 1.0f);
- ~CascadeParameters();
- };
- struct FocusParameters
- {
- FocusParameters();
- FocusParameters(bool focus, bool nonUniform, bool autoSize, float quantize, float minView);
- ~FocusParameters();
- };
- class Light : public Drawable
- {
- void SetLightType(LightType type);
- void SetPerVertex(bool enable);
- void SetColor(const Color& color);
- void SetSpecularIntensity(float intensity);
- void SetBrightness(float brightness);
- void SetRange(float range);
- void SetFov(float fov);
- void SetAspectRatio(float aspectRatio);
- void SetFadeDistance(float distance);
- void SetShadowFadeDistance(float distance);
- void SetShadowBias(const BiasParameters& parameters);
- void SetShadowCascade(const CascadeParameters& parameters);
- void SetShadowFocus(const FocusParameters& parameters);
- void SetShadowIntensity(float intensity);
- void SetShadowResolution(float resolution);
- void SetShadowNearFarRatio(float nearFarRatio);
- void SetRampTexture(Texture* texture);
- void SetShapeTexture(Texture* texture);
-
- LightType GetLightType() const;
- bool GetPerVertex() const;
- const Color& GetColor() const;
- float GetSpecularIntensity() const;
- float GetBrightness() const;
- Color GetEffectiveColor() const;
- float GetEffectiveSpecularIntensity() const;
- float GetRange() const;
- float GetFov() const;
- float GetAspectRatio() const;
- float GetFadeDistance() const;
- float GetShadowFadeDistance() const;
- const BiasParameters& GetShadowBias() const;
- const CascadeParameters& GetShadowCascade() const;
- const FocusParameters& GetShadowFocus() const;
- float GetShadowIntensity() const;
- float GetShadowResolution() const;
- float GetShadowNearFarRatio() const;
- Texture* GetRampTexture() const;
- Texture* GetShapeTexture() const;
- Frustum GetFrustum() const;
- int GetNumShadowSplits() const;
- bool IsNegative() const;
-
- tolua_property__get_set LightType lightType;
- tolua_property__get_set bool perVertex;
- tolua_property__get_set Color& color;
- tolua_property__get_set float specularIntensity;
- tolua_property__get_set float brightness;
- tolua_property__get_set float range;
- tolua_property__get_set float fov;
- tolua_property__get_set float aspectRatio;
- tolua_property__get_set float fadeDistance;
- tolua_property__get_set float shadowFadeDistance;
- tolua_property__get_set BiasParameters& shadowBias;
- tolua_property__get_set CascadeParameters& shadowCascade;
- tolua_property__get_set FocusParameters& shadowFocus;
- tolua_property__get_set float shadowIntensity;
- tolua_property__get_set float shadowResolution;
- tolua_property__get_set float shadowNearFarRatio;
- tolua_property__get_set Texture* rampTexture;
- tolua_property__get_set Texture* shapeTexture;
- tolua_readonly tolua_property__get_set Frustum frustum;
- tolua_readonly tolua_property__get_set int numShadowSplits;
- tolua_readonly tolua_property__is_set bool negative;
- tolua_readonly tolua_property__get_set Color effectiveColor;
- tolua_readonly tolua_property__get_set float effectiveSpecularIntensity;
- };
|