Terrain.pkg 2.5 KB

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