C# Class VelocityDb.Collection.Spatial.Rectangle

Afficher le fichier Open project: VelocityDB/VelocityDB Class Usage Examples

Méthodes publiques

Méthode Description
Add ( Rectangle r ) : void

Computes the union of this rectangle and the passed rectangle, storing the result in this rectangle.

CompareTo ( object o ) : int
Contains ( Rectangle r ) : bool

Determine whether this rectangle contains the passed rectangle

Distance ( System.Point p ) : double

Return the distance between this rectangle and the passed point. If the rectangle contains the point, the distance is zero.

Distance ( Rectangle r ) : double

Return the distance between this rectangle and the passed rectangle. If the rectangles overlap, the distance is zero.

Enlargement ( Rectangle &r ) : double

Calculate the area by which this rectangle would be enlarged if added to the passed rectangle. Neither rectangle is altered.

Equals ( Rectangle r ) : bool
GetHashCode ( ) : int

Customized hash code using the coordinates of the rectangle 37 * minX * minY * maxX * maxY

Intersects ( Rectangle &r ) : bool

Determine whether this rectangle intersects the passed rectangle

Rectangle ( double x1, double y1, double x2, double y2 ) : System

ToString ( ) : string

Return a string representation of this rectangle, in the form: (1.2, 3.4), (5.6, 7.8)

add ( System.Point p ) : void

Computes the union of this rectangle and the passed point, storing the result in this rectangle.

containedBy ( Rectangle r ) : bool

Determine whether this rectangle is contained by the passed rectangle

distance ( double pX, double pY ) : double

Return the distance between a rectangle and a point. If the rectangle contains the point, the distance is zero.

distanceSq ( double pX, double pY ) : double

Get the square of the distance between two points.

edgeOverlaps ( Rectangle r ) : bool

Determine whether an edge of this rectangle overlies the equivalent edge of the passed rectangle

enlargement ( Rectangle r1, Rectangle r2 ) : double

Calculate the area by which a rectangle would be enlarged if added to the passed rectangle

sameObject ( object o ) : bool

Determine whether this rectangle is the same as another object. Note that two rectangles can be equal but not the same object, if they both have the same bounds.

set ( Rectangle r ) : void

Sets the size of this rectangle to equal the passed rectangle.

union ( Rectangle r ) : Rectangle

Find the the union of this rectangle and the passed rectangle.Neither rectangle is altered

Private Methods

Méthode Description
Rectangle ( bool s ) : System

Method Details

Add() public méthode

Computes the union of this rectangle and the passed rectangle, storing the result in this rectangle.
public Add ( Rectangle r ) : void
r Rectangle Rectangle to add to this rectangle
Résultat void

CompareTo() public méthode

public CompareTo ( object o ) : int
o object
Résultat int

Contains() public méthode

Determine whether this rectangle contains the passed rectangle
public Contains ( Rectangle r ) : bool
r Rectangle The rectangle that might be contained by this rectangle
Résultat bool

Distance() public méthode

Return the distance between this rectangle and the passed point. If the rectangle contains the point, the distance is zero.
public Distance ( System.Point p ) : double
p System.Point Point to find the distance to
Résultat double

Distance() public méthode

Return the distance between this rectangle and the passed rectangle. If the rectangles overlap, the distance is zero.
public Distance ( Rectangle r ) : double
r Rectangle Rectangle to find the distance to
Résultat double

Enlargement() public méthode

Calculate the area by which this rectangle would be enlarged if added to the passed rectangle. Neither rectangle is altered.
public Enlargement ( Rectangle &r ) : double
r Rectangle Rectangle to union with this rectangle, in order to compute the difference in area of the union and the original rectangle
Résultat double

Equals() public méthode

public Equals ( Rectangle r ) : bool
r Rectangle
Résultat bool

GetHashCode() public méthode

Customized hash code using the coordinates of the rectangle 37 * minX * minY * maxX * maxY
public GetHashCode ( ) : int
Résultat int

Intersects() public méthode

Determine whether this rectangle intersects the passed rectangle
public Intersects ( Rectangle &r ) : bool
r Rectangle The rectangle that might intersect this rectangle
Résultat bool

Rectangle() public méthode

public Rectangle ( double x1, double y1, double x2, double y2 ) : System
x1 double coordinate of any corner of the rectangle
y1 double (see x1)
x2 double coordinate of the opposite corner
y2 double (see x2)
Résultat System

ToString() public méthode

Return a string representation of this rectangle, in the form: (1.2, 3.4), (5.6, 7.8)
public ToString ( ) : string
Résultat string

add() public méthode

Computes the union of this rectangle and the passed point, storing the result in this rectangle.
public add ( System.Point p ) : void
p System.Point Point to add to this rectangle
Résultat void

containedBy() public méthode

Determine whether this rectangle is contained by the passed rectangle
public containedBy ( Rectangle r ) : bool
r Rectangle The rectangle that might contain this rectangle
Résultat bool

distance() public méthode

Return the distance between a rectangle and a point. If the rectangle contains the point, the distance is zero.
public distance ( double pX, double pY ) : double
pX double X coordinate of point
pY double Y coordinate of point
Résultat double

distanceSq() public méthode

Get the square of the distance between two points.
public distanceSq ( double pX, double pY ) : double
pX double the x coordinate of point
pY double the y coordinate of point
Résultat double

edgeOverlaps() public méthode

Determine whether an edge of this rectangle overlies the equivalent edge of the passed rectangle
public edgeOverlaps ( Rectangle r ) : bool
r Rectangle
Résultat bool

enlargement() public static méthode

Calculate the area by which a rectangle would be enlarged if added to the passed rectangle
public static enlargement ( Rectangle r1, Rectangle r2 ) : double
r1 Rectangle minimum X coordinate of rectangle 1
r2 Rectangle minimum X coordinate of rectangle 2
Résultat double

sameObject() public méthode

Determine whether this rectangle is the same as another object. Note that two rectangles can be equal but not the same object, if they both have the same bounds.
public sameObject ( object o ) : bool
o object The object to compare with this rectangle
Résultat bool

set() public méthode

Sets the size of this rectangle to equal the passed rectangle.
public set ( Rectangle r ) : void
r Rectangle
Résultat void

union() public méthode

Find the the union of this rectangle and the passed rectangle.Neither rectangle is altered
public union ( Rectangle r ) : Rectangle
r Rectangle The rectangle to union with this rectangle
Résultat Rectangle