Search Results for

    Show / Hide Table of Contents

    Class ShapeUtility

    Helper class for finding intersection between 2d geometry shapes.

    Inheritance
    System.Object
    ShapeUtility
    Inherited Members
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: ProjectDawn.Geometry3D
    Assembly: ProjectDawn.Geometry.dll
    Syntax
    public static class ShapeUtility

    Methods

    | Improve this Doc View Source

    IntersectionLineAndTriangle(Line, Triangle, out float3)

    Returns true if line intersects triangle.

    Declaration
    public static bool IntersectionLineAndTriangle(Line line, Triangle triangle, out float3 point)
    Parameters
    Type Name Description
    Line line

    Line.

    Triangle triangle

    Triangle.

    Unity.Mathematics.float3 point

    Intersection point.

    Returns
    Type Description
    System.Boolean

    Returns true if line intersects triangle.

    | Improve this Doc View Source

    IntersectionRayAndTriangle(Ray, Triangle, out Single)

    Returns true if ray intersects triangle. Based on https://en.wikipedia.org/wiki/M%C3%B6ller%E2%80%93Trumbore_intersection_algorithm.

    Declaration
    public static bool IntersectionRayAndTriangle(Ray ray, Triangle triangle, out float t)
    Parameters
    Type Name Description
    Ray ray

    Ray.

    Triangle triangle

    Triangle.

    System.Single t

    Intersection time.

    Returns
    Type Description
    System.Boolean

    Returns true if ray intersects triangle.

    | Improve this Doc View Source

    IntersectionRayAndTriangularSurface<T>(Ray, TriangularSurface<T>, out SurfacePointIntersection)

    Returns true if ray intersects surface.

    Declaration
    public static bool IntersectionRayAndTriangularSurface<T>(Ray ray, TriangularSurface<T> surface, out SurfacePointIntersection intersection)
        where T : struct, ITransformFloat3
    Parameters
    Type Name Description
    Ray ray

    Ray.

    TriangularSurface<T> surface

    Surface.

    SurfacePointIntersection intersection

    Intersection data.

    Returns
    Type Description
    System.Boolean

    Returns true if ray intersects surface.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    IntersectionTriangleAndTriangle(Triangle, Triangle, out Line)

    Returns true if triangles intersect.

    Declaration
    public static bool IntersectionTriangleAndTriangle(Triangle a, Triangle b, out Line line)
    Parameters
    Type Name Description
    Triangle a

    First triangle.

    Triangle b

    Second triangle.

    Line line

    Intersection line.

    Returns
    Type Description
    System.Boolean

    Returns true if triangles intersect.

    | Improve this Doc View Source

    IntersectionTriangularSurfaceAndTriangularSurface<T>(TriangularSurface<T>, TriangularSurface<T>, NativeList<SurfaceLineIntersection>)

    Returns surfaces intersections.

    Declaration
    public static void IntersectionTriangularSurfaceAndTriangularSurface<T>(TriangularSurface<T> a, TriangularSurface<T> b, NativeList<SurfaceLineIntersection> intersections)
        where T : struct, ITransformFloat3
    Parameters
    Type Name Description
    TriangularSurface<T> a

    TriangularSurface A.

    TriangularSurface<T> b

    TriangularSurface B.

    Unity.Collections.NativeList<SurfaceLineIntersection> intersections

    Intersection data.

    Type Parameters
    Name Description
    T
    | Improve this Doc View Source

    OverlapBoxAndBox(Box, Box)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapBoxAndBox(Box a, Box b)
    Parameters
    Type Name Description
    Box a
    Box b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapBoxAndBox(Box, Box, float4x4)

    Declaration
    public static bool OverlapBoxAndBox(Box boxA, Box boxB, float4x4 boxBTransform)
    Parameters
    Type Name Description
    Box boxA
    Box boxB
    Unity.Mathematics.float4x4 boxBTransform
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapBoxAndPoint(Box, float3)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapBoxAndPoint(Box box, float3 point)
    Parameters
    Type Name Description
    Box box
    Unity.Mathematics.float3 point
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapBoxAndSphere(Box, Sphere)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapBoxAndSphere(Box box, Sphere sphere)
    Parameters
    Type Name Description
    Box box
    Sphere sphere
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapBoxAndTriangle(Box, Triangle)

    Declaration
    public static bool OverlapBoxAndTriangle(Box box, Triangle triangle)
    Parameters
    Type Name Description
    Box box
    Triangle triangle
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapCapsuleAndBox(Capsule, Box)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapCapsuleAndBox(Capsule a, Box b)
    Parameters
    Type Name Description
    Capsule a
    Box b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapCapsuleAndCapsule(Capsule, Capsule)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapCapsuleAndCapsule(Capsule a, Capsule b)
    Parameters
    Type Name Description
    Capsule a
    Capsule b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapCapsuleAndLine(Capsule, Line)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapCapsuleAndLine(Capsule a, Line b)
    Parameters
    Type Name Description
    Capsule a
    Line b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapCapsuleAndPoint(Capsule, float3)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapCapsuleAndPoint(Capsule a, float3 b)
    Parameters
    Type Name Description
    Capsule a
    Unity.Mathematics.float3 b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapCapsuleAndSphere(Capsule, Sphere)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapCapsuleAndSphere(Capsule a, Sphere b)
    Parameters
    Type Name Description
    Capsule a
    Sphere b
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapPlaneAndBox(Plane, Box)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapPlaneAndBox(Plane plane, Box box)
    Parameters
    Type Name Description
    Plane plane
    Box box
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapSphereAndPoint(Sphere, float3)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapSphereAndPoint(Sphere sphere, float3 point)
    Parameters
    Type Name Description
    Sphere sphere
    Unity.Mathematics.float3 point
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    OverlapSphereAndSphere(Sphere, Sphere)

    Returns true if shapes surfaces overlap.

    Declaration
    public static bool OverlapSphereAndSphere(Sphere a, Sphere b)
    Parameters
    Type Name Description
    Sphere a
    Sphere b
    Returns
    Type Description
    System.Boolean
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © ProjectDawn.
    Generated by DocFX