: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/../../GodotApplePlugins/doc_classes/ARAnchor.xml. .. _class_ARAnchor: ARAnchor ======== **Inherits:** :ref:`RefCounted` **<** :ref:`Object` A positioned anchor in AR space. .. rst-class:: classref-introduction-group Description ----------- Base wrapper for ARKit anchors. Use it for generic anchor inspection or create anchors to place custom content in the session with :ref:`ARSession.add_anchor()`. More specific anchor types such as :ref:`ARPlaneAnchor`, :ref:`ARImageAnchor`, and :ref:`ARMeshAnchor` expose additional data. .. rst-class:: classref-reftable-group Properties ---------- .. table:: :widths: auto +---------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`String` | :ref:`identifier` | ``"E3D0EC7D-9791-4D31-9EC4-121EF17FE2DB"`` | +---------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`String` | :ref:`name` | ``""`` | +---------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`String` | :ref:`session_identifier` | ``""`` | +---------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ | :ref:`Transform3D` | :ref:`transform` | ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` | +---------------------------------------+-----------------------------------------------------------------------+-----------------------------------------------------+ .. rst-class:: classref-reftable-group Methods ------- .. table:: :widths: auto +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARAnchor` | :ref:`copy_anchor`\ (\ ) | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARAnchor` | :ref:`create`\ (\ transform\: :ref:`Transform3D`\ ) |static| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ARAnchor` | :ref:`create_named`\ (\ name\: :ref:`String`, transform\: :ref:`Transform3D`\ ) |static| | +---------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Property Descriptions --------------------- .. _class_ARAnchor_property_identifier: .. rst-class:: classref-property :ref:`String` **identifier** = ``"E3D0EC7D-9791-4D31-9EC4-121EF17FE2DB"`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_identifier**\ (\ ) A unique identifier for this anchor instance. .. rst-class:: classref-item-separator ---- .. _class_ARAnchor_property_name: .. rst-class:: classref-property :ref:`String` **name** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_name**\ (\ ) The optional name assigned to this anchor. .. rst-class:: classref-item-separator ---- .. _class_ARAnchor_property_session_identifier: .. rst-class:: classref-property :ref:`String` **session_identifier** = ``""`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`String` **get_session_identifier**\ (\ ) The identifier of the AR session that produced this anchor, when available. .. rst-class:: classref-item-separator ---- .. _class_ARAnchor_property_transform: .. rst-class:: classref-property :ref:`Transform3D` **transform** = ``Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)`` :ref:`🔗` .. rst-class:: classref-property-setget - :ref:`Transform3D` **get_transform**\ (\ ) The anchor transform in world space. .. rst-class:: classref-section-separator ---- .. rst-class:: classref-descriptions-group Method Descriptions ------------------- .. _class_ARAnchor_method_copy_anchor: .. rst-class:: classref-method :ref:`ARAnchor` **copy_anchor**\ (\ ) :ref:`🔗` Returns a copy of this anchor when the underlying platform supports cloning. Returns ``null`` if the anchor cannot be copied. .. rst-class:: classref-item-separator ---- .. _class_ARAnchor_method_create: .. rst-class:: classref-method :ref:`ARAnchor` **create**\ (\ transform\: :ref:`Transform3D`\ ) |static| :ref:`🔗` Creates a new unnamed anchor at ``transform``. Use the result with :ref:`ARSession.add_anchor()`. .. rst-class:: classref-item-separator ---- .. _class_ARAnchor_method_create_named: .. rst-class:: classref-method :ref:`ARAnchor` **create_named**\ (\ name\: :ref:`String`, transform\: :ref:`Transform3D`\ ) |static| :ref:`🔗` Creates a new anchor with ``name`` at ``transform``. The name is useful for identifying custom anchors when they are reported back through session signals. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)`