new CollisionChecker()
Collides objects, and returns just if they're colliding, returning
only a bollean giving no other information about the collision.
- Source:
Methods
-
aabbVsAabb(aabb1, aabb2) → {boolean}
-
Collides an AABB against another AABB.
Parameters:
Name Type Description aabb1
Grape2D.AABB An AABB. aabb2
Grape2D.AABB The other AABB. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
aabbVsCircle(aabb, circle) → {boolean}
-
Collides an AABB against a Circle.
Parameters:
Name Type Description aabb
Grape2D.AABB An AABB. circle
Grape2D.Circle A circle. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
aabbVsPoint(aabb, point) → {boolean}
-
Checks if a point is inside an AABB.
Parameters:
Name Type Description aabb
Grape2D.AABB An AABB. point
Grape2D.Vector A point. - Source:
Returns:
True if the point is inside the AABB.- Type
- boolean
-
aabbVsPolygon(aabb, polygon) → {boolean}
-
Collides an AABB against a Polygon.
Parameters:
Name Type Description aabb
Grape2D.AABB An AABB. polygon
Grape2D.Polygon A polygon. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
aabbVsRay(aabb, ray) → {boolean}
-
Checks if a ray intersects an AABB.
Parameters:
Name Type Description aabb
Grape2D.AABB An AABB. ray
Grape2D.Ray A ray. - Source:
Returns:
True if the ray intersects the polygon.- Type
- boolean
-
circleVsAabb(circle, aabb) → {boolean}
-
Collides a Circle against an AABB.
Parameters:
Name Type Description circle
Grape2D.Circle A circle. aabb
Grape2D.AABB An AABB. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
circleVsCircle(circle1, circle2) → {boolean}
-
Collides a Circle against another Circle.
Parameters:
Name Type Description circle1
Grape2D.Circle A circle. circle2
Grape2D.Circle Another cicle. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
circleVsPoint(circle, point) → {boolean}
-
Checks if a point is inside an Circle.
Parameters:
Name Type Description circle
Grape2D.Circle A circle. point
Grape2D.Vector A point. - Source:
Returns:
True if the point is inside the circle.- Type
- boolean
-
circleVsPolygon(circle, polygon) → {boolean}
-
Collides a Circle against a polygon.
Parameters:
Name Type Description circle
Grape2D.Circle A circle. polygon
Grape2D.Polygon A polygon. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
circleVsRay(circle, ray) → {boolean}
-
Checks if a ray intersects a circle.
Parameters:
Name Type Description circle
Grape2D.Circle A polygon. ray
Grape2D.Ray A ray. - Source:
Returns:
True if the ray intersects the polygon.- Type
- boolean
-
polygonVsAabb(polygon, aabb) → {boolean}
-
Collides a Polygon against an AABB.
Parameters:
Name Type Description polygon
Grape2D.Polygon A polygon. aabb
Grape2D.AABB An AABB. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
polygonVsCircle(polygon, circle) → {boolean}
-
Collides a Polygon against a circle.
Parameters:
Name Type Description polygon
Grape2D.Polygon A polygon. circle
Grape2D.Circle A circle. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
polygonVsPoint(polygon, point) → {boolean}
-
Checks if a point is inside a polygon.
Parameters:
Name Type Description polygon
Grape2D.Polygon A polygon. point
Grape2D.Vector A point. - Source:
Returns:
True if the point is inside the polygon.- Type
- boolean
-
polygonVsPolygon(polygon1, polygon2) → {boolean}
-
Collides a Polygon against another Polygon.
Parameters:
Name Type Description polygon1
Grape2D.Polygon A polygon. polygon2
Grape2D.Polygon A polygon. - Source:
Returns:
True if they're colliding.- Type
- boolean
-
polygonVsRay(polygon, ray) → {boolean}
-
Checks if a ray intersects a polygon.
Parameters:
Name Type Description polygon
Grape2D.Polygon A polygon. ray
Grape2D.Ray A ray. - Source:
Returns:
True if the ray intersects the polygon.- Type
- boolean