DOTS Geometry
 
Loading...
Searching...
No Matches
ShapeOverlap Class Reference

Static Public Member Functions

static bool CapsuleSphereOverlap (Capsule capsule, float3 center, float radiusSq)
 returns true if the capsule and the sphere overlap - does not calculate intersection points or shapes
 
static bool CircleCircleOverlap (float2 circleCenter0, float radiusSq0, float2 circleCenter1, float radiusSq1)
 Returns true if the circles overlap each other.
 
static bool CircleContainsCircle (float2 circleCenter0, float radiusSq0, float2 circleCenter1, float radiusSq1)
 Returns true, if the second circle is completely contained within the first circle (used for Ball*-Tree 2D)
 
static bool CircleContainsRectangle (float2 circleCenter, float radiusSq, Rect rectangle)
 Returns true if the rectangle is inside the circle (used for KD-Tree)
 
static bool CuboidContainsSphere (Bounds bounds, float3 sphereCenter, float radiusSq)
 Returns true if the sphere is inside the cuboid (used for Ball*-Tree)
 
static bool CuboidSphereOverlap (Bounds bounds, float3 sphereCenter, float radiusSq)
 Returns true if the cuboid / bounds and the sphere are overlapping (used for KD-Trees, Ball*-Trees and R*-Trees)
 
static bool CuboidSphereOverlap (float3 min, float3 max, float3 sphereCenter, float radiusSq)
 Returns true if the cuboid / bounds and the sphere are overlapping (used for KD-Trees, Ball*-Trees and R*-Trees)
 
static bool LineSegmentCircleOverlap (LineSegment2D line, float2 center, float radiusSq)
 Returns true if the line segment and the circle overlap - does not calculate intersection points.
 
static bool LineSegmentCuboidOverlap (LineSegment3D line, Bounds bounds)
 Returns true if the line segment and the cuboid overlap - does not calculate the intersection points.
 
static bool LineSegmentRectangleOverlap (LineSegment2D line, Rect rect)
 Returns true if the line segment and the rectangle overlap - does not calculate intersection points.
 
static bool LineSegmentSphereOverlap (LineSegment3D line, float3 center, float radiusSq)
 Returns true if the line segment and the sphere overlap - does not calculate the intersection points.
 
static bool RectangleCircleOverlap (Rect rectangle, float2 circleCenter, float radiusSq)
 Returns true if the rectangle and the circle are overlapping (used for KD-Trees, Ball*-Trees and R* Trees).
 
static bool RectangleContainsCircle (Rect rectangle, float2 circleCenter, float radiusSq)
 Returns true if the circle is inside the rectangle (used for Ball*-Tree)
 
static bool SphereContainsCuboid (float3 sphereCenter, float radiusSq, Bounds bounds)
 Returns true if the bounds (cuboid) are completely inside a sphere.
 
static bool SphereContainsCuboid (float3 sphereCenter, float radiusSq, float3 min, float3 max)
 Returns true if the bounds (cuboid) are completely inside a sphere.
 
static bool SphereContainsSphere (float3 sphereCenter0, float radiusSq0, float3 sphereCenter1, float radiusSq1)
 Returns true, if the second sphere is completely bounded by the first sphere (used for Ball*-Tree 3D)
 
static bool SphereSphereOverlap (float3 sphereCenter0, float radiusSq0, float3 sphereCenter1, float radiusSq1)
 Returns true if the spheres overlap each other.
 

Member Function Documentation

◆ CapsuleSphereOverlap()

static bool CapsuleSphereOverlap ( Capsule capsule,
float3 center,
float radiusSq )
static

returns true if the capsule and the sphere overlap - does not calculate intersection points or shapes

Parameters
capsule
center
radiusSq
Returns

◆ CircleCircleOverlap()

static bool CircleCircleOverlap ( float2 circleCenter0,
float radiusSq0,
float2 circleCenter1,
float radiusSq1 )
static

Returns true if the circles overlap each other.

Parameters
circleCenter0
radiusSq0
circleCenter1
radiusSq1
Returns

◆ CircleContainsCircle()

static bool CircleContainsCircle ( float2 circleCenter0,
float radiusSq0,
float2 circleCenter1,
float radiusSq1 )
static

Returns true, if the second circle is completely contained within the first circle (used for Ball*-Tree 2D)

Parameters
circleCenter0
radiusSq0
circleCenter1
radiusSq1
Returns

◆ CircleContainsRectangle()

static bool CircleContainsRectangle ( float2 circleCenter,
float radiusSq,
Rect rectangle )
static

Returns true if the rectangle is inside the circle (used for KD-Tree)

Parameters
circleCenter
radiusSq
rectangle
Returns

◆ CuboidContainsSphere()

static bool CuboidContainsSphere ( Bounds bounds,
float3 sphereCenter,
float radiusSq )
static

Returns true if the sphere is inside the cuboid (used for Ball*-Tree)

Parameters
bounds
sphereCenter
radiusSq
Returns

◆ CuboidSphereOverlap() [1/2]

static bool CuboidSphereOverlap ( Bounds bounds,
float3 sphereCenter,
float radiusSq )
static

Returns true if the cuboid / bounds and the sphere are overlapping (used for KD-Trees, Ball*-Trees and R*-Trees)

GPU: GGGOverlap

Parameters
bounds
sphereCenter
radiusSq
Returns

◆ CuboidSphereOverlap() [2/2]

static bool CuboidSphereOverlap ( float3 min,
float3 max,
float3 sphereCenter,
float radiusSq )
static

Returns true if the cuboid / bounds and the sphere are overlapping (used for KD-Trees, Ball*-Trees and R*-Trees)

GPU: GGGOverlap

Parameters
min
max
sphereCenter
radiusSq
Returns

◆ LineSegmentCircleOverlap()

static bool LineSegmentCircleOverlap ( LineSegment2D line,
float2 center,
float radiusSq )
static

Returns true if the line segment and the circle overlap - does not calculate intersection points.

Parameters
line
center
radiusSq
Returns

◆ LineSegmentCuboidOverlap()

static bool LineSegmentCuboidOverlap ( LineSegment3D line,
Bounds bounds )
static

Returns true if the line segment and the cuboid overlap - does not calculate the intersection points.

Parameters
line
bounds
Returns

◆ LineSegmentRectangleOverlap()

static bool LineSegmentRectangleOverlap ( LineSegment2D line,
Rect rect )
static

Returns true if the line segment and the rectangle overlap - does not calculate intersection points.

Parameters
line
rect
Returns

◆ LineSegmentSphereOverlap()

static bool LineSegmentSphereOverlap ( LineSegment3D line,
float3 center,
float radiusSq )
static

Returns true if the line segment and the sphere overlap - does not calculate the intersection points.

Parameters
line
center
radiusSq
Returns

◆ RectangleCircleOverlap()

static bool RectangleCircleOverlap ( Rect rectangle,
float2 circleCenter,
float radiusSq )
static

Returns true if the rectangle and the circle are overlapping (used for KD-Trees, Ball*-Trees and R* Trees).

GPU: GGGOverlap

Parameters
rectangle
circleCenter
radiusSq
Returns

◆ RectangleContainsCircle()

static bool RectangleContainsCircle ( Rect rectangle,
float2 circleCenter,
float radiusSq )
static

Returns true if the circle is inside the rectangle (used for Ball*-Tree)

Parameters
rectangle
circleCenter
radiusSq
Returns

◆ SphereContainsCuboid() [1/2]

static bool SphereContainsCuboid ( float3 sphereCenter,
float radiusSq,
Bounds bounds )
static

Returns true if the bounds (cuboid) are completely inside a sphere.

Parameters
sphereCenter
radiusSq
bounds
Returns

◆ SphereContainsCuboid() [2/2]

static bool SphereContainsCuboid ( float3 sphereCenter,
float radiusSq,
float3 min,
float3 max )
static

Returns true if the bounds (cuboid) are completely inside a sphere.

Parameters
sphereCenter
radiusSq
min
max
Returns

◆ SphereContainsSphere()

static bool SphereContainsSphere ( float3 sphereCenter0,
float radiusSq0,
float3 sphereCenter1,
float radiusSq1 )
static

Returns true, if the second sphere is completely bounded by the first sphere (used for Ball*-Tree 3D)

Parameters
sphereCenter0
radiusSq0
sphereCenter1
radiusSq1
Returns

◆ SphereSphereOverlap()

static bool SphereSphereOverlap ( float3 sphereCenter0,
float radiusSq0,
float3 sphereCenter1,
float radiusSq1 )
static

Returns true if the spheres overlap each other.

Parameters
sphereCenter0
radiusSq0
sphereCenter1
radiusSq1
Returns