Terrain.pkg 3.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 SetNorthNeighbor(Terrain* north);
  12. void SetSouthNeighbor(Terrain* south);
  13. void SetWestNeighbor(Terrain* west);
  14. void SetEastNeighbor(Terrain* east);
  15. void SetNeighbors(Terrain* north, Terrain* south, Terrain* west, Terrain* east);
  16. void SetDrawDistance(float distance);
  17. void SetShadowDistance(float distance);
  18. void SetLodBias(float bias);
  19. void SetViewMask(unsigned mask);
  20. void SetLightMask(unsigned mask);
  21. void SetShadowMask(unsigned mask);
  22. void SetZoneMask(unsigned mask);
  23. void SetMaxLights(unsigned num);
  24. void SetCastShadows(bool enable);
  25. void SetOccluder(bool enable);
  26. void SetOccludee(bool enable);
  27. void ApplyHeightMap();
  28. int GetPatchSize() const;
  29. const Vector3& GetSpacing() const;
  30. const IntVector2& GetNumVertices() const;
  31. const IntVector2& GetNumPatches() const;
  32. unsigned GetMaxLodLevels() const;
  33. unsigned GetOcclusionLodLevel() const;
  34. bool GetSmoothing() const;
  35. Image* GetHeightMap() const;
  36. Material* GetMaterial() const;
  37. Terrain* GetNorthNeighbor() const;
  38. Terrain* GetSouthNeighbor() const;
  39. Terrain* GetWestNeighbor() const;
  40. Terrain* GetEastNeighbor() const;
  41. TerrainPatch* GetPatch(unsigned index) const;
  42. TerrainPatch* GetPatch(int x, int z) const;
  43. TerrainPatch* GetNeighborPatch(int x, int z) const;
  44. float GetHeight(const Vector3& worldPosition) const;
  45. Vector3 GetNormal(const Vector3& worldPosition) const;
  46. IntVector2 WorldToHeightMap(const Vector3& worldPosition) const;
  47. SharedArrayPtr<float> GetHeightData() const;
  48. float GetDrawDistance() const;
  49. float GetShadowDistance() const;
  50. float GetLodBias() const;
  51. unsigned GetViewMask() const;
  52. unsigned GetLightMask() const;
  53. unsigned GetShadowMask() const;
  54. unsigned GetZoneMask() const;
  55. unsigned GetMaxLights() const;
  56. bool IsVisible() const;
  57. bool GetCastShadows() const;
  58. bool IsOccluder() const;
  59. bool IsOccludee() const;
  60. tolua_property__get_set int patchSize;
  61. tolua_property__get_set Vector3& spacing;
  62. tolua_readonly tolua_property__get_set IntVector2& numVertices;
  63. tolua_readonly tolua_property__get_set IntVector2& numPatches;
  64. tolua_property__get_set unsigned maxLodLevels;
  65. tolua_property__get_set unsigned occlusionLodLevel;
  66. tolua_property__get_set bool smoothing;
  67. tolua_property__get_set Image* heightMap;
  68. tolua_property__get_set Material* material;
  69. tolua_property__get_set Terrain* northNeighbor;
  70. tolua_property__get_set Terrain* southNeighbor;
  71. tolua_property__get_set Terrain* westNeighbor;
  72. tolua_property__get_set Terrain* eastNeighbor;
  73. tolua_property__get_set float drawDistance;
  74. tolua_property__get_set float shadowDistance;
  75. tolua_property__get_set float lodBias;
  76. tolua_property__get_set unsigned viewMask;
  77. tolua_property__get_set unsigned lightMask;
  78. tolua_property__get_set unsigned shadowMask;
  79. tolua_property__get_set unsigned zoneMask;
  80. tolua_property__get_set unsigned maxLights;
  81. tolua_readonly tolua_property__is_set bool visible;
  82. tolua_property__get_set bool castShadows;
  83. tolua_property__is_set bool occluder;
  84. tolua_property__is_set bool occludee;
  85. };