search API (or start typing anywhere)
Collision
differ.Collision
class
Methods
pointInPolystatic
pointInPoly(x:Float, y:Float, poly:differ.shapes.Polygon) : Bool
Test if a given point lands inside the given polygon. Returns true if it does, false otherwise. rayWithRaystatic
rayWithRay(ray1:differ.shapes.Ray, ray2:differ.shapes.Ray, into:differ.data.RayIntersection) : differ.data.RayIntersection
Test a ray against another ray. When no collision is found, this function returns null. Returns a
RayIntersection
if a collision is found.
rayWithRaysstatic
rayWithRays(ray:differ.shapes.Ray, rays:Array<differ.shapes.Ray>, into:Null<differ.Results_differ_data_RayIntersection>) : differ.Results_differ_data_RayIntersection
Test a ray against a list of other rays. When no collision is found, this function returns an empty array, this function will never return null. Returns a list of
RayIntersection
information for each collision found.
for(result in results) { result... }
rayWithShapestatic
rayWithShape(ray:differ.shapes.Ray, shape:differ.shapes.Shape, into:differ.data.RayCollision) : differ.data.RayCollision
Test a line between two points against a list of shapes. When no collision is found, this function returns null. Returns a
RayCollision
if a collision is found.
rayWithShapesstatic
rayWithShapes(ray:differ.shapes.Ray, shapes:Array<differ.shapes.Shape>, into:Null<differ.Results_differ_data_RayCollision>) : differ.Results_differ_data_RayCollision
Test a ray between two points against a list of shapes. When no collision is found, this function returns an empty array, this function will never return null. Returns a list of
RayCollision
information for each collision found.
for(result in results) { result... }
shapeWithShapestatic
shapeWithShape(shape1:differ.shapes.Shape, shape2:differ.shapes.Shape, into:differ.data.ShapeCollision) : differ.data.ShapeCollision
Test a single shape against another shape. When no collision is found between them, this function returns null. Returns a
ShapeCollision
if a collision is found.
shapeWithShapesstatic
shapeWithShapes(shape1:differ.shapes.Shape, shapes:Array<differ.shapes.Shape>, into:Null<differ.Results_differ_data_ShapeCollision>) : differ.Results_differ_data_ShapeCollision
Test a single shape against multiple other shapes. When no collision is found, this function returns empty results, this function will never return null. Returns a list of
ShapeCollision
information for each collision found.
for(result in results) { result... }