docs.unity3d.com
    显示 / 隐藏目录

    Interface IProvidesReferencePoints

    Defines the API for a Reference Point Provider This functionality provider is responsible for reference point tracking

    Inherited Members
    IFunctionalityProvider.LoadProvider()
    IFunctionalityProvider.ConnectSubscriber(Object)
    IFunctionalityProvider.UnloadProvider()
    Namespace: Unity.MARS
    Syntax
    public interface IProvidesReferencePoints : IFunctionalityProvider

    Methods

    GetAllReferencePoints(List<MRReferencePoint>)

    Get the full list of reference points we know about

    Declaration
    void GetAllReferencePoints(List<MRReferencePoint> referencePoints)
    Parameters
    Type Name Description
    List<MRReferencePoint> referencePoints

    A list of MRReferencePoint objects to which the currently tracked reference points will be added

    StartTrackingReferencePoints()

    Start tracking reference points. Reference point detection is enabled on initialization, so this is only necessary after calling StopDetecting.

    Declaration
    void StartTrackingReferencePoints()

    StopTrackingReferencePoints()

    Stop tracking reference points. This will happen automatically on destroying the session. It is only necessary to call this method to pause plane detection while maintaining camera tracking

    Declaration
    void StopTrackingReferencePoints()

    TryAddReferencePoint(Pose, out MarsTrackableId)

    Try to add a reference point

    Declaration
    bool TryAddReferencePoint(Pose pose, out MarsTrackableId referencePointId)
    Parameters
    Type Name Description
    Pose pose
    MarsTrackableId referencePointId
    Returns
    Type Description
    Boolean

    true if adding the point succeeded, false otherwise

    TryGetReferencePoint(MarsTrackableId, out MRReferencePoint)

    Try to get a reference point

    Declaration
    bool TryGetReferencePoint(MarsTrackableId id, out MRReferencePoint referencePoint)
    Parameters
    Type Name Description
    MarsTrackableId id
    MRReferencePoint referencePoint
    Returns
    Type Description
    Boolean

    true if getting the point succeeded, false otherwise

    TryRemoveReferencePoint(MarsTrackableId)

    Try to remove a reference point

    Declaration
    bool TryRemoveReferencePoint(MarsTrackableId id)
    Parameters
    Type Name Description
    MarsTrackableId id
    Returns
    Type Description
    Boolean

    true if removing the point succeeded, false otherwise

    Events

    pointAdded

    Called when a reference point is added the first time

    Declaration
    event Action<MRReferencePoint> pointAdded
    Event Type
    Type Description
    Action<MRReferencePoint>

    pointRemoved

    Called when a reference point is removed (lost)

    Declaration
    event Action<MRReferencePoint> pointRemoved
    Event Type
    Type Description
    Action<MRReferencePoint>

    pointUpdated

    Called when a reference point has updated data

    Declaration
    event Action<MRReferencePoint> pointUpdated
    Event Type
    Type Description
    Action<MRReferencePoint>
    返回到顶部
    Copyright © 2023 Unity Technologies — 商标和使用条款
    • 法律条款
    • 隐私政策
    • Cookie
    • 不要出售或分享我的个人信息
    • Your Privacy Choices (Cookie Settings)