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

A circle, also known as a point-radius, based on a {@link com.spatial4j.core.distance.DistanceCalculator} which does all the work. This implementation implementation should work for both cartesian 2D and geodetic sphere surfaces.
Inheritance: Circle
Show file Open project: synhershko/Spatial4n

Protected Properties

Property Type Description
ctx Spatial4n.Core.Context.SpatialContext
enclosingBox Rectangle
point System.Point
radiusDEG double

Public Methods

Method Description
CircleImpl ( System.Point p, double radiusDEG, SpatialContext ctx ) : System
Contains ( double x, double y ) : bool
Equals ( Circle thiz, Object o ) : bool
Equals ( object obj ) : bool
GetArea ( SpatialContext ctx ) : double
GetBoundingBox ( ) : Rectangle
GetCenter ( ) : System.Point
GetHashCode ( ) : int
GetHashCode ( Circle thiz ) : int

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

GetRadius ( ) : double
HasArea ( ) : bool
Relate ( Circle circle ) : SpatialRelation
Relate ( System.Point point ) : SpatialRelation
Relate ( Rectangle r ) : SpatialRelation
Relate ( Shape other ) : SpatialRelation
Reset ( double x, double y, double radiusDEG ) : void
ToString ( ) : string

Protected Methods

Method Description
GetXAxis ( ) : double

The X coordinate of where the circle axis intersect.

GetYAxis ( ) : double

The Y coordinate of where the circle axis intersect.

RelateRectanglePhase2 ( Rectangle r, SpatialRelation bboxSect ) : SpatialRelation

Method Details

CircleImpl() public method

public CircleImpl ( System.Point p, double radiusDEG, SpatialContext ctx ) : System
p System.Point
radiusDEG double
ctx Spatial4n.Core.Context.SpatialContext
return System

Contains() public method

public Contains ( double x, double y ) : bool
x double
y double
return bool

Equals() public static method

public static Equals ( Circle thiz, Object o ) : bool
thiz Circle
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

GetHashCode() public method

public GetHashCode ( ) : int
return int

GetHashCode() public static method

All {@link Circle} implementations should use this definition of {@link Object#hashCode()}.
public static GetHashCode ( Circle thiz ) : int
thiz Circle
return int

GetRadius() public method

public GetRadius ( ) : double
return double

GetXAxis() protected method

The X coordinate of where the circle axis intersect.
protected GetXAxis ( ) : double
return double

GetYAxis() protected method

The Y coordinate of where the circle axis intersect.
protected GetYAxis ( ) : double
return double

HasArea() public method

public HasArea ( ) : bool
return bool

Relate() public method

public Relate ( Circle circle ) : SpatialRelation
circle Circle
return SpatialRelation

Relate() public method

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

Relate() public method

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

Relate() public method

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

RelateRectanglePhase2() protected method

protected RelateRectanglePhase2 ( Rectangle r, SpatialRelation bboxSect ) : SpatialRelation
r Rectangle
bboxSect SpatialRelation
return SpatialRelation

Reset() public method

public Reset ( double x, double y, double radiusDEG ) : void
x double
y double
radiusDEG double
return void

ToString() public method

public ToString ( ) : string
return string

Property Details

ctx protected property

protected SpatialContext,Spatial4n.Core.Context ctx
return Spatial4n.Core.Context.SpatialContext

enclosingBox protected property

protected Rectangle enclosingBox
return Rectangle

point protected property

protected Point,System point
return System.Point

radiusDEG protected property

protected double radiusDEG
return double