Class containing data describing an Intersection between a Line and a Shape.

Static methods

@:value({ inverse_normal : false })staticinlineget(distance:Float, overlap:Float, x:Float, y:Float, normal_x:Float, normal_y:Float, inverse_normal:Bool = false):IntersectionData

Variables

@:value(0.)distance:Float = 0.

The distance between the start of the line and the hit position.

@:value(Vector2.zero)finalhit:Vector2 = Vector2.zero

The position along the line where the line hit the shape.

@:value(false)inverse_normal:Bool = false

Indicates if normal was inversed and usually occurs when Line penetrates into the Shape from the inside.

line2:Null<Line>

The second Line in the Intersection. This is only set when intersecting two Lines.

@:value(Vector2.zero)finalnormal:Vector2 = Vector2.zero

The normal vector (direction) of the Line's penetration into the Shape.

@:value(0.)overlap:Float = 0.

The length of the line that has overlapped the shape.

@:value(false)read onlypooled:Bool = false

Methods

@:value({ inverse_normal : false })inlineset(distance:Float, overlap:Float, x:Float, y:Float, normal_x:Float, normal_y:Float, inverse_normal:Bool = false):Void