C# Класс VelocityDb.Collection.Spatial.Rectangle

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
Rectangle ( bool s ) : System

Описание методов

Add() публичный Метод

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
Результат void

CompareTo() публичный Метод

public CompareTo ( object o ) : int
o object
Результат int

Contains() публичный Метод

Determine whether this rectangle contains the passed rectangle
public Contains ( Rectangle r ) : bool
r Rectangle The rectangle that might be contained by this rectangle
Результат bool

Distance() публичный Метод

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
Результат double

Distance() публичный Метод

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
Результат double

Enlargement() публичный Метод

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
Результат double

Equals() публичный Метод

public Equals ( Rectangle r ) : bool
r Rectangle
Результат bool

GetHashCode() публичный Метод

Customized hash code using the coordinates of the rectangle 37 * minX * minY * maxX * maxY
public GetHashCode ( ) : int
Результат int

Intersects() публичный Метод

Determine whether this rectangle intersects the passed rectangle
public Intersects ( Rectangle &r ) : bool
r Rectangle The rectangle that might intersect this rectangle
Результат bool

Rectangle() публичный Метод

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)
Результат System

ToString() публичный Метод

Return a string representation of this rectangle, in the form: (1.2, 3.4), (5.6, 7.8)
public ToString ( ) : string
Результат string

add() публичный Метод

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
Результат void

containedBy() публичный Метод

Determine whether this rectangle is contained by the passed rectangle
public containedBy ( Rectangle r ) : bool
r Rectangle The rectangle that might contain this rectangle
Результат bool

distance() публичный Метод

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
Результат double

distanceSq() публичный Метод

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
Результат double

edgeOverlaps() публичный Метод

Determine whether an edge of this rectangle overlies the equivalent edge of the passed rectangle
public edgeOverlaps ( Rectangle r ) : bool
r Rectangle
Результат bool

enlargement() публичный статический Метод

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
Результат double

sameObject() публичный Метод

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
Результат bool

set() публичный Метод

Sets the size of this rectangle to equal the passed rectangle.
public set ( Rectangle r ) : void
r Rectangle
Результат void

union() публичный Метод

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
Результат Rectangle