C# Class Artemis.Engine.Maths.Geometry.RectUtils

显示文件 Open project: ArtemisEngine/Artemis-Engine

Public Methods

Method Description
Collision ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool

Check if two rectangles are overlapping.

Contains ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool

Check if the first rectangle entirely encloses the second rectangle.

Crosses ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool

Check if the two given rectangles form a cross pattern.

Method Details

Collision() public static method

Check if two rectangles are overlapping.
public static Collision ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool
x1 double
y1 double
w1 double
h1 double
x2 double
y2 double
w2 double
h2 double
return bool

Contains() public static method

Check if the first rectangle entirely encloses the second rectangle.
public static Contains ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool
x1 double
y1 double
w1 double
h1 double
x2 double
y2 double
w2 double
h2 double
return bool

Crosses() public static method

Check if the two given rectangles form a cross pattern.
public static Crosses ( double x1, double y1, double w1, double h1, double x2, double y2, double w2, double h2 ) : bool
x1 double
y1 double
w1 double
h1 double
x2 double
y2 double
w2 double
h2 double
return bool