Class HandleUtility | Package Manager UI website
docs.unity3d.com
    Show / Hide Table of Contents

    Class HandleUtility

    Static methods for working with ProBuilderMesh objects in an editor.

    Inheritance
    System.Object
    HandleUtility
    Namespace: UnityEngine.ProBuilder
    Syntax
    public static class HandleUtility

    Methods

    GetEdgeRotation(ProBuilderMesh, HandleOrientation, IEnumerable<Edge>)

    Get a rotation suitable for orienting a handle or gizmo relative to the element selection.

    Declaration
    public static Quaternion GetEdgeRotation(ProBuilderMesh mesh, HandleOrientation orientation, IEnumerable<Edge> edges)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    HandleOrientation orientation

    The type of HandleOrientation to calculate.

    System.Collections.Generic.IEnumerable<Edge> edges

    Edges to consider in the rotation calculations. Only used when HandleOrientation is ActiveElement.

    Returns
    Type Description
    Quaternion

    A rotation appropriate to the orientation and element selection.

    GetFaceRotation(ProBuilderMesh, HandleOrientation, IEnumerable<Face>)

    Get a rotation suitable for orienting a handle or gizmo relative to the element selection.

    Declaration
    public static Quaternion GetFaceRotation(ProBuilderMesh mesh, HandleOrientation orientation, IEnumerable<Face> faces)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    HandleOrientation orientation

    The type of HandleOrientation to calculate.

    System.Collections.Generic.IEnumerable<Face> faces

    Faces to consider in the rotation calculations. Only used when HandleOrientation is ActiveElement.

    Returns
    Type Description
    Quaternion

    A rotation appropriate to the orientation and element selection.

    GetRotation(ProBuilderMesh, IEnumerable<Int32>)

    Collects coincident vertices and returns a rotation calculated from the average normal and bitangent.

    Declaration
    public static Quaternion GetRotation(ProBuilderMesh mesh, IEnumerable<int> indices)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    System.Collections.Generic.IEnumerable<System.Int32> indices

    Vertex indices to consider in the rotation calculations.

    Returns
    Type Description
    Quaternion

    A rotation calculated from the average normal of each vertex.

    GetVertexRotation(ProBuilderMesh, HandleOrientation, IEnumerable<Int32>)

    Get a rotation suitable for orienting a handle or gizmo relative to the element selection.

    Declaration
    public static Quaternion GetVertexRotation(ProBuilderMesh mesh, HandleOrientation orientation, IEnumerable<int> vertices)
    Parameters
    Type Name Description
    ProBuilderMesh mesh

    The target mesh.

    HandleOrientation orientation

    The type of HandleOrientation to calculate.

    System.Collections.Generic.IEnumerable<System.Int32> vertices

    Edges to consider in the rotation calculations. Only used when HandleOrientation is ActiveElement.

    Returns
    Type Description
    Quaternion

    A rotation appropriate to the orientation and element selection.

    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