Browse Source

Update Lua bindings.

Eugene Kozlov 8 years ago
parent
commit
e110998f70

+ 1 - 0
Source/Urho3D/LuaScript/pkgs/Math/BoundingBox.pkg

@@ -42,6 +42,7 @@ class BoundingBox
     BoundingBox Transformed(const Matrix3& transform) const;
     BoundingBox Transformed(const Matrix3x4& transform) const;
     Rect Projected(const Matrix4& projection) const;
+    float DistanceToPoint(const Vector3& point) const;
 
     Intersection IsInside(const Vector3& point) const;
     Intersection IsInside(const BoundingBox& box) const;

+ 1 - 0
Source/Urho3D/LuaScript/pkgs/Math/MathDefs.pkg

@@ -65,6 +65,7 @@ bool IsPowerOfTwo(unsigned value);
 unsigned NextPowerOfTwo(unsigned value);
 
 unsigned CountSetBits(unsigned value);
+unsigned IntegerLog2(unsigned value);
 
 unsigned SDBMHash(unsigned hash, unsigned char c);
 float Random();

+ 9 - 0
Source/Urho3D/LuaScript/pkgs/Navigation/NavigationMesh.pkg

@@ -31,8 +31,17 @@ class NavigationMesh : public Component
     void SetDetailSampleMaxError(float error);
     void SetPadding(const Vector3& padding);
     void SetAreaCost(unsigned areaID, float cost);
+    bool Allocate(const BoundingBox& boundingBox, unsigned maxTiles);
     bool Build();
     bool Build(const BoundingBox& boundingBox);
+    bool Build(const IntVector2& from, const IntVector2& to);
+    const PODVector<unsigned char>& GetTileData(const IntVector2& tile) const;
+    bool AddTile(const PODVector<unsigned char>& tileData);
+    void RemoveTile(const IntVector2& tile);
+    void RemoveAllTiles();
+    bool HasTile(const IntVector2& tile) const;
+    BoundingBox GetTileBoudningBox(const IntVector2& tile) const;
+    IntVector2 GetTileIndex(const Vector3& position) const;
     void SetPartitionType(NavmeshPartitionType aType);
     void SetDrawOffMeshConnections(bool enable);
     void SetDrawNavAreas(bool enable);