Terrain.pkg 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. $#include "Graphics/Terrain.h"
  2. class Terrain : public Component
  3. {
  4. void SetPatchSize(int size);
  5. void SetSpacing(const Vector3& spacing);
  6. void SetMaxLodLevels(unsigned levels);
  7. void SetOcclusionLodLevel(unsigned level);
  8. void SetSmoothing(bool enable);
  9. bool SetHeightMap(Image* image);
  10. void SetMaterial(Material* material);
  11. void SetDrawDistance(float distance);
  12. void SetShadowDistance(float distance);
  13. void SetLodBias(float bias);
  14. void SetViewMask(unsigned mask);
  15. void SetLightMask(unsigned mask);
  16. void SetShadowMask(unsigned mask);
  17. void SetZoneMask(unsigned mask);
  18. void SetMaxLights(unsigned num);
  19. void SetCastShadows(bool enable);
  20. void SetOccluder(bool enable);
  21. void SetOccludee(bool enable);
  22. void ApplyHeightMap();
  23. int GetPatchSize() const;
  24. const Vector3& GetSpacing() const;
  25. const IntVector2& GetNumVertices() const;
  26. const IntVector2& GetNumPatches() const;
  27. unsigned GetMaxLodLevels() const;
  28. unsigned GetOcclusionLodLevel() const;
  29. bool GetSmoothing() const;
  30. Image* GetHeightMap() const;
  31. Material* GetMaterial() const;
  32. TerrainPatch* GetPatch(unsigned index) const;
  33. TerrainPatch* GetPatch(int x, int z) const;
  34. float GetHeight(const Vector3& worldPosition) const;
  35. Vector3 GetNormal(const Vector3& worldPosition) const;
  36. IntVector2 WorldToHeightMap(const Vector3& worldPosition) const;
  37. SharedArrayPtr<float> GetHeightData() const;
  38. float GetDrawDistance() const;
  39. float GetShadowDistance() const;
  40. float GetLodBias() const;
  41. unsigned GetViewMask() const;
  42. unsigned GetLightMask() const;
  43. unsigned GetShadowMask() const;
  44. unsigned GetZoneMask() const;
  45. unsigned GetMaxLights() const;
  46. bool IsVisible() const;
  47. bool GetCastShadows() const;
  48. bool IsOccluder() const;
  49. bool IsOccludee() const;
  50. tolua_property__get_set int patchSize;
  51. tolua_property__get_set Vector3& spacing;
  52. tolua_readonly tolua_property__get_set IntVector2& numVertices;
  53. tolua_readonly tolua_property__get_set IntVector2& numPatches;
  54. tolua_property__get_set unsigned maxLodLevels;
  55. tolua_property__get_set unsigned occlusionLodLevel;
  56. tolua_property__get_set bool smoothing;
  57. tolua_property__get_set Image* heightMap;
  58. tolua_property__get_set Material* material;
  59. tolua_property__get_set float drawDistance;
  60. tolua_property__get_set float shadowDistance;
  61. tolua_property__get_set float lodBias;
  62. tolua_property__get_set unsigned viewMask;
  63. tolua_property__get_set unsigned lightMask;
  64. tolua_property__get_set unsigned shadowMask;
  65. tolua_property__get_set unsigned zoneMask;
  66. tolua_property__get_set unsigned maxLights;
  67. tolua_readonly tolua_property__is_set bool visible;
  68. tolua_property__get_set bool castShadows;
  69. tolua_property__is_set bool occluder;
  70. tolua_property__is_set bool occludee;
  71. };