:github_url: hide .. _class_NavigationPathQueryResult2D: NavigationPathQueryResult2D =========================== **Sperimentale:** This class may be changed or removed in future versions. **Eredita:** :ref:`RefCounted` **<** :ref:`Object` Rappresenta il risultato di una richiesta di ricerca del percorso 2D. .. rst-class:: classref-introduction-group Descrizione ---------------------- Questa classe memorizza il risultato di una richiesta di percorso di navigazione 2D dal :ref:`NavigationServer2D`. .. rst-class:: classref-introduction-group Tutorial ---------------- - :doc:`Utilizzo di NavigationPathQueryObject <../tutorials/navigation/navigation_using_navigationpathqueryobjects>` .. rst-class:: classref-reftable-group Proprietà ------------------ .. table:: :widths: auto +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedVector2Array` | :ref:`path` | ``PackedVector2Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`float` | :ref:`path_length` | ``0.0`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt64Array` | :ref:`path_owner_ids` | ``PackedInt64Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`Array`\[:ref:`RID`\] | :ref:`path_rids` | ``[]`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ | :ref:`PackedInt32Array` | :ref:`path_types` | ``PackedInt32Array()`` | +-----------------------------------------------------+----------------------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-reftable-group Metodi ------------ .. table:: :widths: auto +--------+--------------------------------------------------------------------+ | |void| | :ref:`reset`\ (\ ) | +--------+--------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Enumerazioni ------------------------ .. _enum_NavigationPathQueryResult2D_PathSegmentType: .. rst-class:: classref-enumeration enum **PathSegmentType**: :ref:`🔗` .. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_REGION: .. rst-class:: classref-enumeration-constant :ref:`PathSegmentType` **PATH_SEGMENT_TYPE_REGION** = ``0`` Questo segmento del percorso attraversa una regione. .. _class_NavigationPathQueryResult2D_constant_PATH_SEGMENT_TYPE_LINK: .. rst-class:: classref-enumeration-constant :ref:`PathSegmentType` **PATH_SEGMENT_TYPE_LINK** = ``1`` Questo segmento del percorso attraversa un collegamento. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni delle proprietà ------------------------------------------------------ .. _class_NavigationPathQueryResult2D_property_path: .. rst-class:: classref-property :ref:`PackedVector2Array` **path** = ``PackedVector2Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_path**\ (\ value\: :ref:`PackedVector2Array`\ ) - :ref:`PackedVector2Array` **get_path**\ (\ ) L'array del percorso risultante dalla ricerca di navigazione. Tutte le posizioni dell'array del percorso sono in coordinate globali. Senza parametri di ricerca personalizzati, questo è lo stesso percorso restituito da :ref:`NavigationServer2D.map_get_path()`. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_NavigationPathQueryResult2D_property_path_length: .. rst-class:: classref-property :ref:`float` **path_length** = ``0.0`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_path_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_path_length**\ (\ ) Restituisce la lunghezza del percorso. .. rst-class:: classref-item-separator ---- .. _class_NavigationPathQueryResult2D_property_path_owner_ids: .. rst-class:: classref-property :ref:`PackedInt64Array` **path_owner_ids** = ``PackedInt64Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_path_owner_ids**\ (\ value\: :ref:`PackedInt64Array`\ ) - :ref:`PackedInt64Array` **get_path_owner_ids**\ (\ ) Gli ``ObjectID`` degli :ref:`Object` che gestiscono le regioni e collegano ogni punto del percorso. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt64Array` for more details. .. rst-class:: classref-item-separator ---- .. _class_NavigationPathQueryResult2D_property_path_rids: .. rst-class:: classref-property :ref:`Array`\[:ref:`RID`\] **path_rids** = ``[]`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_path_rids**\ (\ value\: :ref:`Array`\[:ref:`RID`\]\ ) - :ref:`Array`\[:ref:`RID`\] **get_path_rids**\ (\ ) I :ref:`RID` delle regioni e dei collegamenti attraversati da ogni punto del percorso. .. rst-class:: classref-item-separator ---- .. _class_NavigationPathQueryResult2D_property_path_types: .. rst-class:: classref-property :ref:`PackedInt32Array` **path_types** = ``PackedInt32Array()`` :ref:`🔗` .. rst-class:: classref-property-setget - |void| **set_path_types**\ (\ value\: :ref:`PackedInt32Array`\ ) - :ref:`PackedInt32Array` **get_path_types**\ (\ ) Il tipo di primitiva di navigazione (regione o collegamento) che attraversa ogni punto del percorso. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Descrizioni dei metodi -------------------------------------------- .. _class_NavigationPathQueryResult2D_method_reset: .. rst-class:: classref-method |void| **reset**\ (\ ) :ref:`🔗` Ripristina l'oggetto risultato al suo stato iniziale. Ciò è utile per riutilizzare l'oggetto in più ricerche. .. |virtual| replace:: :abbr:`virtual (Questo metodo dovrebbe solitamente essere sovrascritto dall'utente per aver un effetto.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (Questo metodo non ha effetti collaterali. Non modifica alcuna variabile appartenente all'istanza.)` .. |vararg| replace:: :abbr:`vararg (Questo metodo accetta qualsiasi numero di argomenti oltre a quelli descritti qui.)` .. |constructor| replace:: :abbr:`constructor (Questo metodo è utilizzato per creare un tipo.)` .. |static| replace:: :abbr:`static (Questo metodo non necessita di alcun'istanza per essere chiamato, quindi può essere chiamato direttamente usando il nome della classe.)` .. |operator| replace:: :abbr:`operator (Questo metodo descrive un operatore valido da usare con questo tipo come operando di sinistra.)` .. |bitfield| replace:: :abbr:`BitField (Questo valore è un intero composto da una maschera di bit dei seguenti flag.)` .. |void| replace:: :abbr:`void (Nessun valore restituito.)`