C# Class Volante.RectangleR2

R2 rectangle class. This class is used in spatial index.
Mostra file Open project: kjk/volante Class Usage Examples

Public Methods

Method Description
Area ( ) : double

Rectangle area

Contains ( RectangleR2 r ) : bool

Checks if this rectangle contains the specified rectangle

EqualsTo ( RectangleR2 other ) : bool
Intersects ( RectangleR2 r ) : bool

Checks if this rectangle intersects with specified rectangle

IsEmpty ( ) : bool

Check if rectanlge is empty

Join ( RectangleR2 a, RectangleR2 b ) : RectangleR2

Non destructive join of two rectangles.

Join ( RectangleR2 r ) : void

Join two rectangles. This rectangle is updates to contain cover of this and specified rectangle.

JoinArea ( RectangleR2 a, RectangleR2 b ) : double

Area of covered rectangle for two sepcified rectangles

RectangleR2 ( RectangleR2 r ) : System

Create copy of the rectangle

RectangleR2 ( double top, double left, double bottom, double right ) : System

Construct rectangle with specified coordinates

Method Details

Area() public method

Rectangle area
public Area ( ) : double
return double

Contains() public method

Checks if this rectangle contains the specified rectangle
public Contains ( RectangleR2 r ) : bool
r RectangleR2
return bool

EqualsTo() public method

public EqualsTo ( RectangleR2 other ) : bool
other RectangleR2
return bool

Intersects() public method

Checks if this rectangle intersects with specified rectangle
public Intersects ( RectangleR2 r ) : bool
r RectangleR2
return bool

IsEmpty() public method

Check if rectanlge is empty
public IsEmpty ( ) : bool
return bool

Join() public static method

Non destructive join of two rectangles.
public static Join ( RectangleR2 a, RectangleR2 b ) : RectangleR2
a RectangleR2 first joined rectangle ///
b RectangleR2 second joined rectangle ///
return RectangleR2

Join() public method

Join two rectangles. This rectangle is updates to contain cover of this and specified rectangle.
public Join ( RectangleR2 r ) : void
r RectangleR2 rectangle to be joined with this rectangle ///
return void

JoinArea() public static method

Area of covered rectangle for two sepcified rectangles
public static JoinArea ( RectangleR2 a, RectangleR2 b ) : double
a RectangleR2
b RectangleR2
return double

RectangleR2() public method

Create copy of the rectangle
public RectangleR2 ( RectangleR2 r ) : System
r RectangleR2
return System

RectangleR2() public method

Construct rectangle with specified coordinates
public RectangleR2 ( double top, double left, double bottom, double right ) : System
top double
left double
bottom double
right double
return System