Drawable.pkg 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. $#include "Drawable.h"
  2. static const unsigned DRAWABLE_GEOMETRY;
  3. static const unsigned DRAWABLE_LIGHT;
  4. static const unsigned DRAWABLE_ZONE;
  5. static const unsigned DRAWABLE_ANY;
  6. static const unsigned DEFAULT_VIEWMASK;
  7. static const unsigned DEFAULT_LIGHTMASK;
  8. static const unsigned DEFAULT_SHADOWMASK;
  9. static const unsigned DEFAULT_ZONEMASK;
  10. static const int MAX_VERTEX_LIGHTS;
  11. static const float ANIMATION_LOD_BASESCALE;
  12. enum UpdateGeometryType
  13. {
  14. UPDATE_NONE = 0,
  15. UPDATE_MAIN_THREAD,
  16. UPDATE_WORKER_THREAD
  17. };
  18. class Drawable : public Component
  19. {
  20. void SetDrawDistance(float distance);
  21. void SetShadowDistance(float distance);
  22. void SetLodBias(float bias);
  23. void SetViewMask(unsigned mask);
  24. void SetLightMask(unsigned mask);
  25. void SetShadowMask(unsigned mask);
  26. void SetZoneMask(unsigned mask);
  27. void SetMaxLights(unsigned num);
  28. void SetCastShadows(bool enable);
  29. void SetOccluder(bool enable);
  30. void SetOccludee(bool enable);
  31. void MarkForUpdate();
  32. const BoundingBox& GetBoundingBox() const;
  33. const BoundingBox& GetWorldBoundingBox();
  34. unsigned char GetDrawableFlags() const;
  35. float GetDrawDistance() const;
  36. float GetShadowDistance() const;
  37. float GetLodBias() const;
  38. unsigned GetViewMask() const;
  39. unsigned GetLightMask() const;
  40. unsigned GetShadowMask() const;
  41. unsigned GetZoneMask() const;
  42. unsigned GetMaxLights() const;
  43. bool GetCastShadows() const;
  44. bool IsOccluder() const;
  45. bool IsOccludee() const;
  46. void SetZone(Zone* zone, bool temporary = false);
  47. void SetSortValue(float value);
  48. void SetMinMaxZ(float minZ, float maxZ);
  49. void MarkInView(const FrameInfo& frame, bool mainView = true);
  50. void ClearLights();
  51. void AddLight(Light* light);
  52. void AddVertexLight(Light* light);
  53. void LimitLights();
  54. void LimitVertexLights();
  55. void SetBasePass(unsigned batchIndex);
  56. Octant* GetOctant() const;
  57. Zone* GetZone() const;
  58. Zone* GetLastZone() const;
  59. bool IsZoneDirty() const;
  60. float GetDistance() const;
  61. float GetLodDistance() const;
  62. float GetSortValue() const;
  63. bool IsInView(unsigned frameNumber) const;
  64. bool IsInView(const FrameInfo& frame, bool mainView = true) const;
  65. bool HasBasePass(unsigned batchIndex) const;
  66. Light* GetFirstLight() const;
  67. float GetMinZ() const;
  68. float GetMaxZ() const;
  69. tolua_readonly tolua_property__get_set BoundingBox& worldBoundingBox;
  70. tolua_readonly tolua_property__get_set unsigned char drawableFlags;
  71. tolua_property__get_set float drawDistance;
  72. tolua_property__get_set float shadowDistance;
  73. tolua_property__get_set float lodBias;
  74. tolua_property__get_set unsigned viewMask;
  75. tolua_property__get_set unsigned lightMask;
  76. tolua_property__get_set unsigned shadowMask;
  77. tolua_property__get_set unsigned zoneMask;
  78. tolua_property__get_set unsigned maxLights;
  79. tolua_property__get_set bool castShadows;
  80. tolua_property__is_set bool occluder;
  81. tolua_property__is_set bool occludee;
  82. tolua_readonly tolua_property__get_set Octant* octant;
  83. tolua_property__get_set Zone* zone;
  84. tolua_readonly tolua_property__get_set Zone* lastZone;
  85. tolua_readonly tolua_property__is_set bool zoneDirty;
  86. tolua_readonly tolua_property__get_set float distance;
  87. tolua_readonly tolua_property__get_set float lodDistance;
  88. tolua_property__get_set float sortValue;
  89. tolua_readonly tolua_property__get_set Light* firstLight;
  90. tolua_readonly tolua_property__get_set float minZ;
  91. tolua_readonly tolua_property__get_set float maxZ;
  92. };