docs.unity3d.com
    Show / Hide Table of Contents

    Struct CapsuleGeometry

    A capsule geometry.

    Inherited Members
    ValueType.Equals(Object)
    ValueType.ToString()
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: Unity.Physics
    Syntax
    public struct CapsuleGeometry : IEquatable<CapsuleGeometry>

    Properties

    Radius

    The radius of the capsule around the line segment.

    Declaration
    public float Radius { get; set; }
    Property Value
    Type Description
    Single

    The radius.

    Vertex0

    The start position of the capsule's inner line segment.

    Declaration
    public float3 Vertex0 { get; set; }
    Property Value
    Type Description
    float3

    The start position of the capsule's inner line segment.

    Vertex1

    The end position of the capsule's inner line segment.

    Declaration
    public float3 Vertex1 { get; set; }
    Property Value
    Type Description
    float3

    The end position of the capsule's inner line segment.

    Methods

    Equals(CapsuleGeometry)

    Tests if this CapsuleGeometry is considered equal to another.

    Declaration
    public bool Equals(CapsuleGeometry other)
    Parameters
    Type Name Description
    CapsuleGeometry other

    The capsule geometry to compare to this object.

    Returns
    Type Description
    Boolean

    True if the objects are considered equal, false if they are not.

    Implements
    IEquatable<T>.Equals(T)

    GetCenter()

    The center of the capsule.

    Declaration
    public float3 GetCenter()
    Returns
    Type Description
    float3

    The center.

    GetHashCode()

    Calculates a hash code for this object.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this object.

    Overrides
    ValueType.GetHashCode()

    GetHeight()

    The height of the capsule.

    Declaration
    public float GetHeight()
    Returns
    Type Description
    Single

    The height.

    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