:github_url: hide .. DO NOT EDIT THIS FILE!!! .. Generated automatically from Godot engine sources. .. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/NavigationMeshSourceGeometryData2D.xml. .. _class_NavigationMeshSourceGeometryData2D: NavigationMeshSourceGeometryData2D ================================== **Experimental:** This class may be changed or removed in future versions. **Inherits:** :ref:`Resource` **<** :ref:`RefCounted` **<** :ref:`Object` Container for parsed source geometry data used in navigation mesh baking. .. rst-class:: classref-introduction-group Description ----------- Container for parsed source geometry data used in navigation mesh baking. .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_obstruction_outline`\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_projected_obstruction`\ (\ vertices\: :ref:`PackedVector2Array`, carve\: :ref:`bool`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_traversable_outline`\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`append_obstruction_outlines`\ (\ obstruction_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`append_traversable_outlines`\ (\ traversable_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`clear_projected_obstructions`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_bounds`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`get_obstruction_outlines`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_projected_obstructions`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`PackedVector2Array`\] | :ref:`get_traversable_outlines`\ (\ ) |const| | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_data`\ (\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`merge`\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_obstruction_outlines`\ (\ obstruction_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_projected_obstructions`\ (\ projected_obstructions\: :ref:`Array`\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_traversable_outlines`\ (\ traversable_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) | +----------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_NavigationMeshSourceGeometryData2D_method_add_obstruction_outline: .. rst-class:: classref-method |void| **add_obstruction_outline**\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) :ref:`🔗` Adds the outline points of a shape as obstructed area. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_add_projected_obstruction: .. rst-class:: classref-method |void| **add_projected_obstruction**\ (\ vertices\: :ref:`PackedVector2Array`, carve\: :ref:`bool`\ ) :ref:`🔗` Adds a projected obstruction shape to the source geometry. If ``carve`` is ``true`` the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_add_traversable_outline: .. rst-class:: classref-method |void| **add_traversable_outline**\ (\ shape_outline\: :ref:`PackedVector2Array`\ ) :ref:`🔗` Adds the outline points of a shape as traversable area. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_append_obstruction_outlines: .. rst-class:: classref-method |void| **append_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) :ref:`🔗` Appends another array of ``obstruction_outlines`` at the end of the existing obstruction outlines array. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_append_traversable_outlines: .. rst-class:: classref-method |void| **append_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) :ref:`🔗` Appends another array of ``traversable_outlines`` at the end of the existing traversable outlines array. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_clear: .. rst-class:: classref-method |void| **clear**\ (\ ) :ref:`🔗` Clears the internal data. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_clear_projected_obstructions: .. rst-class:: classref-method |void| **clear_projected_obstructions**\ (\ ) :ref:`🔗` Clears all projected obstructions. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_get_bounds: .. rst-class:: classref-method :ref:`Rect2` **get_bounds**\ (\ ) :ref:`🔗` 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. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_get_obstruction_outlines: .. rst-class:: classref-method :ref:`Array`\[:ref:`PackedVector2Array`\] **get_obstruction_outlines**\ (\ ) |const| :ref:`🔗` Returns all the obstructed area outlines arrays. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_get_projected_obstructions: .. rst-class:: classref-method :ref:`Array` **get_projected_obstructions**\ (\ ) |const| :ref:`🔗` Returns the projected obstructions as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` contains the following entries: - ``vertices`` - A :ref:`PackedFloat32Array` that defines the outline points of the projected shape. - ``carve`` - A :ref:`bool` that defines how the projected shape affects the navigation mesh baking. If ``true`` the projected shape will not be affected by addition offsets, e.g. agent radius. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_get_traversable_outlines: .. rst-class:: classref-method :ref:`Array`\[:ref:`PackedVector2Array`\] **get_traversable_outlines**\ (\ ) |const| :ref:`🔗` Returns all the traversable area outlines arrays. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_has_data: .. rst-class:: classref-method :ref:`bool` **has_data**\ (\ ) :ref:`🔗` Returns ``true`` when parsed source geometry data exists. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_merge: .. rst-class:: classref-method |void| **merge**\ (\ other_geometry\: :ref:`NavigationMeshSourceGeometryData2D`\ ) :ref:`🔗` Adds the geometry data of another **NavigationMeshSourceGeometryData2D** to the navigation mesh baking data. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_set_obstruction_outlines: .. rst-class:: classref-method |void| **set_obstruction_outlines**\ (\ obstruction_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) :ref:`🔗` Sets all the obstructed area outlines arrays. .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_set_projected_obstructions: .. rst-class:: classref-method |void| **set_projected_obstructions**\ (\ projected_obstructions\: :ref:`Array`\ ) :ref:`🔗` Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: .. tabs:: .. code-tab:: gdscript "vertices" : PackedFloat32Array "carve" : bool .. rst-class:: classref-item-separator ---- .. _class_NavigationMeshSourceGeometryData2D_method_set_traversable_outlines: .. rst-class:: classref-method |void| **set_traversable_outlines**\ (\ traversable_outlines\: :ref:`Array`\[:ref:`PackedVector2Array`\]\ ) :ref:`🔗` Sets all the traversable area outlines arrays. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` .. |void| replace:: :abbr:`void (No return value.)`