docs.unity3d.com
    Show / Hide Table of Contents

    Interface IAdvancedLineRenderable

    An advanced interface for providing line data for rendering with additional functionality.

    Inherited Members
    ILineRenderable.GetLinePoints(Vector3[], Int32)
    ILineRenderable.TryGetHitInfo(Vector3, Vector3, Int32, Boolean)
    Namespace: UnityEngine.XR.Interaction.Toolkit
    Syntax
    public interface IAdvancedLineRenderable : ILineRenderable

    Methods

    GetLineOriginAndDirection(out Vector3, out Vector3)

    Gets the line origin and direction. Origin and Direction are in world space coordinates.

    Declaration
    void GetLineOriginAndDirection(out Vector3 origin, out Vector3 direction)
    Parameters
    Type Name Description
    Vector3 origin

    Point in space where the line originates from.

    Vector3 direction

    Direction vector used to draw line.

    GetLinePoints(ref NativeArray<Vector3>, out Int32, Nullable<Ray>)

    Gets the polygonal chain represented by a list of endpoints which form line segments to approximate the curve. Positions are in world space coordinates.

    Declaration
    bool GetLinePoints(ref NativeArray<Vector3> linePoints, out int numPoints, Ray? rayOriginOverride = null)
    Parameters
    Type Name Description
    NativeArray<Vector3> linePoints

    When this method returns, contains the sample points if successful.

    Int32 numPoints

    When this method returns, contains the number of sample points if successful.

    Nullable<Ray> rayOriginOverride

    Optional ray origin override used when re-computing the line.

    Returns
    Type Description
    Boolean

    Returns true if the sample points form a valid line, such as by having at least two points. Otherwise, returns false.

    See Also

    XRInteractorLineVisual
    XRRayInteractor
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023