| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="NavigationMeshSourceGeometryData2D" inherits="Resource" experimental="" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Container for parsed source geometry data used in navigation mesh baking. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | Container for parsed source geometry data used in navigation mesh baking. |
| 8 | </description> |
| 9 | <tutorials> |
| 10 | </tutorials> |
| 11 | <methods> |
| 12 | <method name="add_obstruction_outline"> |
| 13 | <return type="void" /> |
| 14 | <param index="0" name="shape_outline" type="PackedVector2Array" /> |
| 15 | <description> |
| 16 | Adds the outline points of a shape as obstructed area. |
| 17 | </description> |
| 18 | </method> |
| 19 | <method name="add_projected_obstruction"> |
| 20 | <return type="void" /> |
| 21 | <param index="0" name="vertices" type="PackedVector2Array" /> |
| 22 | <param index="1" name="carve" type="bool" /> |
| 23 | <description> |
| 24 | Adds a projected obstruction shape to the source geometry. If [param carve] is [code]true[/code] the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. |
| 25 | </description> |
| 26 | </method> |
| 27 | <method name="add_traversable_outline"> |
| 28 | <return type="void" /> |
| 29 | <param index="0" name="shape_outline" type="PackedVector2Array" /> |
| 30 | <description> |
| 31 | Adds the outline points of a shape as traversable area. |
| 32 | </description> |
| 33 | </method> |
| 34 | <method name="append_obstruction_outlines"> |
| 35 | <return type="void" /> |
| 36 | <param index="0" name="obstruction_outlines" type="PackedVector2Array[]" /> |
| 37 | <description> |
| 38 | Appends another array of [param obstruction_outlines] at the end of the existing obstruction outlines array. |
| 39 | </description> |
| 40 | </method> |
| 41 | <method name="append_traversable_outlines"> |
| 42 | <return type="void" /> |
| 43 | <param index="0" name="traversable_outlines" type="PackedVector2Array[]" /> |
| 44 | <description> |
| 45 | Appends another array of [param traversable_outlines] at the end of the existing traversable outlines array. |
| 46 | </description> |
| 47 | </method> |
| 48 | <method name="clear"> |
| 49 | <return type="void" /> |
| 50 | <description> |
| 51 | Clears the internal data. |
| 52 | </description> |
| 53 | </method> |
| 54 | <method name="clear_projected_obstructions"> |
| 55 | <return type="void" /> |
| 56 | <description> |
| 57 | Clears all projected obstructions. |
| 58 | </description> |
| 59 | </method> |
| 60 | <method name="get_bounds"> |
| 61 | <return type="Rect2" /> |
| 62 | <description> |
| 63 | Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made. |
| 64 | </description> |
| 65 | </method> |
| 66 | <method name="get_obstruction_outlines" qualifiers="const"> |
| 67 | <return type="PackedVector2Array[]" /> |
| 68 | <description> |
| 69 | Returns all the obstructed area outlines arrays. |
| 70 | </description> |
| 71 | </method> |
| 72 | <method name="get_projected_obstructions" qualifiers="const"> |
| 73 | <return type="Array" /> |
| 74 | <description> |
| 75 | Returns the projected obstructions as an [Array] of dictionaries. Each [Dictionary] contains the following entries: |
| 76 | - [code]vertices[/code] - A [PackedFloat32Array] that defines the outline points of the projected shape. |
| 77 | - [code]carve[/code] - A [bool] that defines how the projected shape affects the navigation mesh baking. If [code]true[/code] the projected shape will not be affected by addition offsets, e.g. agent radius. |
| 78 | </description> |
| 79 | </method> |
| 80 | <method name="get_traversable_outlines" qualifiers="const"> |
| 81 | <return type="PackedVector2Array[]" /> |
| 82 | <description> |
| 83 | Returns all the traversable area outlines arrays. |
| 84 | </description> |
| 85 | </method> |
| 86 | <method name="has_data"> |
| 87 | <return type="bool" /> |
| 88 | <description> |
| 89 | Returns [code]true[/code] when parsed source geometry data exists. |
| 90 | </description> |
| 91 | </method> |
| 92 | <method name="merge"> |
| 93 | <return type="void" /> |
| 94 | <param index="0" name="other_geometry" type="NavigationMeshSourceGeometryData2D" /> |
| 95 | <description> |
| 96 | Adds the geometry data of another [NavigationMeshSourceGeometryData2D] to the navigation mesh baking data. |
| 97 | </description> |
| 98 | </method> |
| 99 | <method name="set_obstruction_outlines"> |
| 100 | <return type="void" /> |
| 101 | <param index="0" name="obstruction_outlines" type="PackedVector2Array[]" /> |
| 102 | <description> |
| 103 | Sets all the obstructed area outlines arrays. |
| 104 | </description> |
| 105 | </method> |
| 106 | <method name="set_projected_obstructions"> |
| 107 | <return type="void" /> |
| 108 | <param index="0" name="projected_obstructions" type="Array" /> |
| 109 | <description> |
| 110 | Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: |
| 111 | [codeblocks] |
| 112 | [gdscript] |
| 113 | "vertices" : PackedFloat32Array |
| 114 | "carve" : bool |
| 115 | [/gdscript] |
| 116 | [/codeblocks] |
| 117 | </description> |
| 118 | </method> |
| 119 | <method name="set_traversable_outlines"> |
| 120 | <return type="void" /> |
| 121 | <param index="0" name="traversable_outlines" type="PackedVector2Array[]" /> |
| 122 | <description> |
| 123 | Sets all the traversable area outlines arrays. |
| 124 | </description> |
| 125 | </method> |
| 126 | </methods> |
| 127 | </class> |