C# Class Nez.Collisions

Mostra file Open project: prime31/Nez Class Usage Examples

Public Methods

Method Description
circleToCircle ( Vector2 circleCenter1, float circleRadius1, Vector2 circleCenter2, float circleRadius2 ) : bool
circleToLine ( Vector2 circleCenter, float radius, Vector2 lineFrom, Vector2 lineTo ) : bool
circleToPoint ( Vector2 circleCenter, float radius, Vector2 point ) : bool
closestPointOnLine ( Vector2 lineA, Vector2 lineB, Vector2 closestTo ) : Vector2
getSector ( RectangleF rect, Vector2 point ) : PointSectors
getSector ( float rX, float rY, float rW, float rH, Vector2 point ) : PointSectors
lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2 ) : bool
lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2, Vector2 &intersection ) : bool
rectToCircle ( RectangleF rect, Vector2 cPosition, float cRadius ) : bool
rectToCircle ( float rectX, float rectY, float rectWidth, float rectHeight, Vector2 circleCenter, float radius ) : bool
rectToLine ( RectangleF &rect, Vector2 lineFrom, Vector2 lineTo ) : bool
rectToLine ( float rectX, float rectY, float rectWidth, float rectHeight, Vector2 lineFrom, Vector2 lineTo ) : bool
rectToPoint ( RectangleF rect, Vector2 point ) : bool
rectToPoint ( float rX, float rY, float rW, float rH, Vector2 point ) : bool

Method Details

circleToCircle() static public method

static public circleToCircle ( Vector2 circleCenter1, float circleRadius1, Vector2 circleCenter2, float circleRadius2 ) : bool
circleCenter1 Vector2
circleRadius1 float
circleCenter2 Vector2
circleRadius2 float
return bool

circleToLine() static public method

static public circleToLine ( Vector2 circleCenter, float radius, Vector2 lineFrom, Vector2 lineTo ) : bool
circleCenter Vector2
radius float
lineFrom Vector2
lineTo Vector2
return bool

circleToPoint() static public method

static public circleToPoint ( Vector2 circleCenter, float radius, Vector2 point ) : bool
circleCenter Vector2
radius float
point Vector2
return bool

closestPointOnLine() static public method

static public closestPointOnLine ( Vector2 lineA, Vector2 lineB, Vector2 closestTo ) : Vector2
lineA Vector2
lineB Vector2
closestTo Vector2
return Vector2

getSector() static public method

static public getSector ( RectangleF rect, Vector2 point ) : PointSectors
rect RectangleF
point Vector2
return PointSectors

getSector() static public method

static public getSector ( float rX, float rY, float rW, float rH, Vector2 point ) : PointSectors
rX float
rY float
rW float
rH float
point Vector2
return PointSectors

lineToLine() static public method

static public lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2 ) : bool
a1 Vector2
a2 Vector2
b1 Vector2
b2 Vector2
return bool

lineToLine() static public method

static public lineToLine ( Vector2 a1, Vector2 a2, Vector2 b1, Vector2 b2, Vector2 &intersection ) : bool
a1 Vector2
a2 Vector2
b1 Vector2
b2 Vector2
intersection Vector2
return bool

rectToCircle() static public method

static public rectToCircle ( RectangleF rect, Vector2 cPosition, float cRadius ) : bool
rect RectangleF
cPosition Vector2
cRadius float
return bool

rectToCircle() static public method

static public rectToCircle ( float rectX, float rectY, float rectWidth, float rectHeight, Vector2 circleCenter, float radius ) : bool
rectX float
rectY float
rectWidth float
rectHeight float
circleCenter Vector2
radius float
return bool

rectToLine() static public method

static public rectToLine ( RectangleF &rect, Vector2 lineFrom, Vector2 lineTo ) : bool
rect RectangleF
lineFrom Vector2
lineTo Vector2
return bool

rectToLine() static public method

static public rectToLine ( float rectX, float rectY, float rectWidth, float rectHeight, Vector2 lineFrom, Vector2 lineTo ) : bool
rectX float
rectY float
rectWidth float
rectHeight float
lineFrom Vector2
lineTo Vector2
return bool

rectToPoint() static public method

static public rectToPoint ( RectangleF rect, Vector2 point ) : bool
rect RectangleF
point Vector2
return bool

rectToPoint() static public method

static public rectToPoint ( float rX, float rY, float rW, float rH, Vector2 point ) : bool
rX float
rY float
rW float
rH float
point Vector2
return bool