diff --git a/demos/3d/polygon_path_finder/engine.cfg b/demos/3d/polygon_path_finder/engine.cfg deleted file mode 100644 index 47450408af8..00000000000 --- a/demos/3d/polygon_path_finder/engine.cfg +++ /dev/null @@ -1,5 +0,0 @@ -[application] - -name="Polygon Pathfinder" -main_scene="res://poly_with_holes.scn" -icon="res://icon.png" diff --git a/demos/3d/polygon_path_finder/icon.png b/demos/3d/polygon_path_finder/icon.png deleted file mode 100644 index 643f5595ee6..00000000000 Binary files a/demos/3d/polygon_path_finder/icon.png and /dev/null differ diff --git a/demos/3d/polygon_path_finder/poly_with_holes.scn b/demos/3d/polygon_path_finder/poly_with_holes.scn deleted file mode 100644 index 6b340377b7b..00000000000 Binary files a/demos/3d/polygon_path_finder/poly_with_holes.scn and /dev/null differ diff --git a/demos/3d/polygon_path_finder/polygonpathfinder.gd b/demos/3d/polygon_path_finder/polygonpathfinder.gd deleted file mode 100644 index 1e843043da7..00000000000 --- a/demos/3d/polygon_path_finder/polygonpathfinder.gd +++ /dev/null @@ -1,77 +0,0 @@ - -extends Spatial - - -func _ready(): - var pf = PolygonPathFinder.new() - - var points = Vector2Array() - var connections = IntArray() - - # Poly 1 - points.push_back(Vector2(0, 0)) # 0 - points.push_back(Vector2(10, 0)) # 1 - points.push_back(Vector2(10, 10)) # 2 - points.push_back(Vector2(0, 10)) # 3 - - connections.push_back(0) # Connect vertex 0... - connections.push_back(1) # ... to 1 - drawLine(points[0], points[1], get_node("/root/Spatial/Polys")) - connections.push_back(1) # Connect vertex 1... - connections.push_back(2) # ... to 2 - drawLine(points[1], points[2], get_node("/root/Spatial/Polys")) - connections.push_back(2) # Etc. - connections.push_back(3) - drawLine(points[2], points[3], get_node("/root/Spatial/Polys")) - connections.push_back(3) # Connect vertex 3... - connections.push_back(0) # ... back to vertex 0, to close the polygon - drawLine(points[3], points[0], get_node("/root/Spatial/Polys")) - - # Poly 2, as obstacle inside poly 1 - points.push_back(Vector2(2, 0.5)) # 4 - points.push_back(Vector2(4, 0.5)) # 5 - points.push_back(Vector2(4, 9.5)) # 6 - points.push_back(Vector2(2, 9.5)) # 7 - - connections.push_back(4) - connections.push_back(5) - drawLine(points[4], points[5], get_node("/root/Spatial/Polys")) - connections.push_back(5) - connections.push_back(6) - drawLine(points[5], points[6], get_node("/root/Spatial/Polys")) - connections.push_back(6) - connections.push_back(7) - drawLine(points[6], points[7], get_node("/root/Spatial/Polys")) - connections.push_back(7) - connections.push_back(4) - drawLine(points[7], points[4], get_node("/root/Spatial/Polys")) - - print("points: ", points) - print("connections: ", connections) - - pf.setup(points, connections) - - var path = pf.find_path(Vector2(1, 5), Vector2(8, 5)) - - var lastStep = null - print("path: ", path) - for step in path: - print("step: ", step) - if (lastStep != null): - var currPathSegment = Vector2Array() - drawLine(lastStep, step, get_node("/root/Spatial/Path")) - lastStep = step - - -func drawLine(pointA, pointB, immediateGeo): - var drawPosY = 0.1 - var im = immediateGeo - - im.begin(Mesh.PRIMITIVE_POINTS, null) - im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y)) - im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y)) - im.end() - im.begin(Mesh.PRIMITIVE_LINE_STRIP, null) - im.add_vertex(Vector3(pointA.x, drawPosY, pointA.y)) - im.add_vertex(Vector3(pointB.x, drawPosY, pointB.y)) - im.end() diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 1dff3079593..164557578d0 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -9608,7 +9608,8 @@ This approximation makes straight segments between each point, then subdivides t Directory type. - Directory type. Is used to manage directories and their content (not restricted to the project folder). + + Directory type. Is used to manage directories and their content (not restricted to the project folder). How to iterate through the files of a directory example: @@ -9633,21 +9634,21 @@ func dir(path): -Opens a directory to work with. Needs a path, example "res://folder" + Opens a directory to work with. Needs a path, example "res://folder" -Loads all file names of the current directory (prepares the get_next() function). + Loads all file names of the current directory (prepares the get_next() function). -Is used to iterate through the files of the current directory. Returns the name(no path) of the current file/directory, it also contains "." and ".." . + Is used to iterate through the files of the current directory. Returns the name(no path) of the current file/directory, it also contains "." and ".." . Returns an empty String "" at the end of the list. @@ -9655,12 +9656,12 @@ Returns an empty String "" at the end of the list. -Returns true if the current file you are looking at with get_next() is a directory or "." or ".." otherwise false. + Returns true if the current file you are looking at with get_next() is a directory or "." or ".." otherwise false. -Run this to empty the list of remaining files in get_next(). You can use it to end the iteration, as soon as your goal is reached. + Run this to empty the list of remaining files in get_next(). You can use it to end the iteration, as soon as your goal is reached. @@ -9683,14 +9684,14 @@ Run this to empty the list of remaining files in get_next(). You can use it to e -Needs a path or name to the next directory. When the target directory is in the current directory you can use "newfolder" otherwise you need the full path "res://currentfolder/newfolder" + Needs a path or name to the next directory. When the target directory is in the current directory you can use "newfolder" otherwise you need the full path "res://currentfolder/newfolder" -Returns a path to the current directory, example: "res://folder" + Returns a path to the current directory, example: "res://folder" @@ -9723,7 +9724,7 @@ Returns a path to the current directory, example: "res://folder" -Returns true if directory exists otherwise false. Needs a path, example: "res://folder" + Returns true if directory exists otherwise false. Needs a path, example: "res://folder" @@ -18475,13 +18476,13 @@ verify_host will check the SSL identity of the host if set to true. - + - + @@ -36428,7 +36429,7 @@ This method controls whether the position between two cached points is interpola - Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector). + Return whether the referenced cell is transposed, i.e. the X and Y axes are swapped (mirroring with regard to the (1,1) vector). diff --git a/scene/2d/navigation_polygon.cpp b/scene/2d/navigation_polygon.cpp index 4c00d8cec9d..376aeb2d850 100644 --- a/scene/2d/navigation_polygon.cpp +++ b/scene/2d/navigation_polygon.cpp @@ -429,8 +429,8 @@ void NavigationPolygonInstance::_navpoly_changed() { void NavigationPolygonInstance::_bind_methods() { - ObjectTypeDB::bind_method(_MD("set_navigation_polygon","navpoly"),&NavigationPolygonInstance::set_navigation_polygon); - ObjectTypeDB::bind_method(_MD("get_navigation_polygon"),&NavigationPolygonInstance::get_navigation_polygon); + ObjectTypeDB::bind_method(_MD("set_navigation_polygon","navpoly:NavigationPolygon"),&NavigationPolygonInstance::set_navigation_polygon); + ObjectTypeDB::bind_method(_MD("get_navigation_polygon:NavigationPolygon"),&NavigationPolygonInstance::get_navigation_polygon); ObjectTypeDB::bind_method(_MD("set_enabled","enabled"),&NavigationPolygonInstance::set_enabled); ObjectTypeDB::bind_method(_MD("is_enabled"),&NavigationPolygonInstance::is_enabled);