ShapeCollision class

Class responsible to verify collision of the Shapes. Code based from: https://github.com/hahafather007/collision_check

Constructors

ShapeCollision()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

circleToCircle(CircleShape a, CircleShape b) bool
circleToPolygon(CircleShape a, PolygonShape b) bool
getNearestDistance(Vector2 o1, Vector2 o2, Vector2 o) double
Get o point distance o1 and o2 line segment distance https://blog.csdn.net/yjukh/article/details/5213577
isCollision(Shape a, Shape b) bool
isLinesOver(Vector2 a, Vector2 b, Vector2 c, Vector2 d) bool
Straddle experiment Determine whether the line segment a~b and the line segment c~d https://www.rogoso.info/%E5%88%A4%E6%96%AD%E7%BA%BF%E6%AE%B5%E7%9B%B8%E4%BA%A4/
isLinesShadowOver(Vector2 a, Vector2 b, Vector2 c, Vector2 d) bool
Rapid rejection experiment Determine whether the projections of the line segment a~b and the line segment c~d on the x-axis and y-axis have a common area
polygonPoint(PolygonShape b, Vector2 point) bool
polygonToPolygon(PolygonShape a, PolygonShape b) bool
rectToCircle(RectangleShape a, CircleShape b) bool
rectToPolygon(RectangleShape a, PolygonShape b) bool
rectToRect(RectangleShape a, RectangleShape b) bool
vectorProduct(VectorVector a, VectorVector b) double