entitylightsource.c 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. enum LightSourceType
  2. {
  3. NotDef,
  4. PointLight,
  5. SpotLight
  6. };
  7. class EntityLightSource extends Entity
  8. {
  9. //---------------------------------------------------------------------------
  10. // Generic interface
  11. //---------------------------------------------------------------------------
  12. proto native void SetLightType(int pType); // This works only if it's caled in the light's constructor!
  13. proto native int GetLightType();
  14. proto native void SetEnabled(bool pState);
  15. proto native bool IsEnabled();
  16. proto native void SetCastShadow(bool pState);
  17. proto native bool GetCastShadow();
  18. proto native bool EnableSpecular(bool pState);
  19. proto native bool EnableLinear(bool pState);
  20. proto native void SetPulseCoef(float pState);
  21. proto native void SetVisibleDuringDaylight(bool pState);
  22. proto native bool IsVisibleDuringDaylight();
  23. proto native void SetRadius(float pValue);
  24. proto native float GetRadius();
  25. //---------------------------------------------------------------------------
  26. // heat haze
  27. //---------------------------------------------------------------------------
  28. proto native void EnableHeatHaze(bool pState);
  29. proto native void SetHeatHazeRadius(float pValue);
  30. proto native float GetHeatHazeRadius();
  31. proto native void SetHeatHazePower(float pValue);
  32. proto native float GetHeatHazePower();
  33. //---------------------------------------------------------------------------
  34. // colors & brightness
  35. //---------------------------------------------------------------------------
  36. proto native void SetDiffuseColor(float pRed, float pGreen, float pBlue);
  37. proto native void SetDiffuseColorV(vector pColorVector);
  38. proto native void SetDiffuseAlpha(float pAlpha);
  39. proto native vector GetDiffuseColorV();
  40. proto native float GetDiffuseAlpha();
  41. proto native void SetAmbientColor(float pRed, float pGreen, float pBlue);
  42. proto native void SetAmbientColorV(vector pColorVector);
  43. proto native void SetAmbientAlpha(float pAlpha);
  44. proto native vector GetAmbientColorV();
  45. proto native float GetAmbientAlpha();
  46. proto native void SetBrightness(float pValue);
  47. proto native float GetBrightness();
  48. //---------------------------------------------------------------------------
  49. // flares
  50. //---------------------------------------------------------------------------
  51. proto native void SetFlareVisible(bool pState);
  52. proto native bool IsFlareVisible();
  53. proto native void SetFlareRelPosition(vector pPosition);
  54. proto native vector GetFlareRelPosition();
  55. //---------------------------------------------------------------------------
  56. // spot light specifics
  57. //---------------------------------------------------------------------------
  58. proto native void SetSpotLightAngle(float pValue);
  59. proto native float GetSpotLightAngle();
  60. };