C# Class UnityPlatformer.PolygonCollider2DExtension

UnityEngine.PolygonCollider2D
Mostrar archivo Open project: llafuente/unity-platformer

Public Methods

Method Description
Contains ( this poly, Bounds b ) : bool

check if the bounds is completely inside, check all four points

Contains ( this poly, Vector2 p ) : bool

check if the point is inside

Contains ( this poly, Vector2 pmin, Vector2 pmax ) : bool

check if the bounds is completely inside, check all four points

GetWorldPoints ( this poly ) : Vector2[]

Get all points in the collider as Vector2

GetWorldPoints3 ( this poly, bool close = false ) : Vector3[]

Get all points in the collider as Vector3

Intersects ( this poly, Vector2 a, Vector2 b, Vector2 &intersection ) : bool

helper

IntersectsTop ( this poly, Bounds bounds, Vector2 &intersection ) : bool

helper

Private Methods

Method Description
Intersection ( Vector2 p1, Vector2 q1, Vector2 p2, Vector2 q2, Vector2 &res ) : bool

helper

Method Details

Contains() static public method

check if the bounds is completely inside, check all four points
static public Contains ( this poly, Bounds b ) : bool
poly this
b UnityEngine.Bounds
return bool

Contains() static public method

check if the point is inside
static public Contains ( this poly, Vector2 p ) : bool
poly this
p UnityEngine.Vector2
return bool

Contains() static public method

check if the bounds is completely inside, check all four points
static public Contains ( this poly, Vector2 pmin, Vector2 pmax ) : bool
poly this
pmin Vector2
pmax Vector2
return bool

GetWorldPoints() static public method

Get all points in the collider as Vector2
static public GetWorldPoints ( this poly ) : Vector2[]
poly this
return Vector2[]

GetWorldPoints3() static public method

Get all points in the collider as Vector3
static public GetWorldPoints3 ( this poly, bool close = false ) : Vector3[]
poly this
close bool
return Vector3[]

Intersects() static public method

helper
static public Intersects ( this poly, Vector2 a, Vector2 b, Vector2 &intersection ) : bool
poly this
a Vector2
b Vector2
intersection Vector2
return bool

IntersectsTop() static public method

helper
static public IntersectsTop ( this poly, Bounds bounds, Vector2 &intersection ) : bool
poly this
bounds Bounds
intersection Vector2
return bool