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()
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)
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
Returns
| Type |
Description |
| System.Boolean |
Returns true if ray intersects surface.
|
Type Parameters
|
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 Parameters
|
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
Returns
| Type |
Description |
| System.Boolean |
|
|
Improve this Doc
View Source
OverlapBoxAndTriangle(Box, Triangle)
Declaration
public static bool OverlapBoxAndTriangle(Box box, Triangle triangle)
Parameters
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
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
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
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
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
Returns
| Type |
Description |
| System.Boolean |
|