C# Class Spatial4n.Core.Shapes.Impl.RectangleImpl

A simple Rectangle implementation that also supports a longitudinal wrap-around. When minX > maxX, this will assume it is world coordinates that cross the date line using degrees. Immutable & threadsafe.
Inheritance: Rectangle
显示文件 Open project: synhershko/Spatial4n Class Usage Examples

Public Methods

Method Description
Equals ( Rectangle thiz, Object o ) : bool

All {@link Rectangle} implementations should use this definition of {@link Object#equals(Object)}.

Equals ( object obj ) : bool
GetArea ( SpatialContext ctx ) : double
GetBoundingBox ( ) : Rectangle
GetCenter ( ) : System.Point
GetCrossesDateLine ( ) : bool
GetHashCode ( ) : int
GetHashCode ( Rectangle thiz ) : int
GetHeight ( ) : double
GetMaxX ( ) : double
GetMaxY ( ) : double
GetMinX ( ) : double
GetMinY ( ) : double
GetWidth ( ) : double
HasArea ( ) : bool
RectangleImpl ( System.Point lowerLeft, System.Point upperRight, SpatialContext ctx ) : System
RectangleImpl ( Rectangle r, SpatialContext ctx ) : System
RectangleImpl ( double minX, double maxX, double minY, double maxY, SpatialContext ctx ) : System
Relate ( System.Point point ) : SpatialRelation
Relate ( Rectangle rect ) : SpatialRelation
Relate ( Shape other ) : SpatialRelation
RelateXRange ( double ext_minX, double ext_maxX ) : SpatialRelation
RelateYRange ( double ext_minY, double ext_maxY ) : SpatialRelation
Reset ( double minX, double maxX, double minY, double maxY ) : void
ToString ( ) : string

Private Methods

Method Description
Relate_Range ( double int_min, double int_max, double ext_min, double ext_max ) : SpatialRelation

Method Details

Equals() public static method

All {@link Rectangle} implementations should use this definition of {@link Object#equals(Object)}.
public static Equals ( Rectangle thiz, Object o ) : bool
thiz Rectangle
o Object
return bool

Equals() public method

public Equals ( object obj ) : bool
obj object
return bool

GetArea() public method

public GetArea ( SpatialContext ctx ) : double
ctx Spatial4n.Core.Context.SpatialContext
return double

GetBoundingBox() public method

public GetBoundingBox ( ) : Rectangle
return Rectangle

GetCenter() public method

public GetCenter ( ) : System.Point
return System.Point

GetCrossesDateLine() public method

public GetCrossesDateLine ( ) : bool
return bool

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetHashCode() public static method

public static GetHashCode ( Rectangle thiz ) : int
thiz Rectangle
return int

GetHeight() public method

public GetHeight ( ) : double
return double

GetMaxX() public method

public GetMaxX ( ) : double
return double

GetMaxY() public method

public GetMaxY ( ) : double
return double

GetMinX() public method

public GetMinX ( ) : double
return double

GetMinY() public method

public GetMinY ( ) : double
return double

GetWidth() public method

public GetWidth ( ) : double
return double

HasArea() public method

public HasArea ( ) : bool
return bool

RectangleImpl() public method

public RectangleImpl ( System.Point lowerLeft, System.Point upperRight, SpatialContext ctx ) : System
lowerLeft System.Point
upperRight System.Point
ctx Spatial4n.Core.Context.SpatialContext
return System

RectangleImpl() public method

public RectangleImpl ( Rectangle r, SpatialContext ctx ) : System
r Rectangle
ctx Spatial4n.Core.Context.SpatialContext
return System

RectangleImpl() public method

public RectangleImpl ( double minX, double maxX, double minY, double maxY, SpatialContext ctx ) : System
minX double
maxX double
minY double
maxY double
ctx Spatial4n.Core.Context.SpatialContext
return System

Relate() public method

public Relate ( System.Point point ) : SpatialRelation
point System.Point
return SpatialRelation

Relate() public method

public Relate ( Rectangle rect ) : SpatialRelation
rect Rectangle
return SpatialRelation

Relate() public method

public Relate ( Shape other ) : SpatialRelation
other Shape
return SpatialRelation

RelateXRange() public method

public RelateXRange ( double ext_minX, double ext_maxX ) : SpatialRelation
ext_minX double
ext_maxX double
return SpatialRelation

RelateYRange() public method

public RelateYRange ( double ext_minY, double ext_maxY ) : SpatialRelation
ext_minY double
ext_maxY double
return SpatialRelation

Reset() public method

public Reset ( double minX, double maxX, double minY, double maxY ) : void
minX double
maxX double
minY double
maxY double
return void

ToString() public method

public ToString ( ) : string
return string