Table of Contents

Struct Rect

Namespace
FlowGraph.Core.Routing
Assembly
FlowGraph.Core.dll

Represents a rectangle for collision detection.

public readonly struct Rect
Inherited Members

Constructors

Rect(double, double, double, double)

public Rect(double x, double y, double width, double height)

Parameters

x double
y double
width double
height double

Properties

Bottom

public double Bottom { get; }

Property Value

double

Center

public Point Center { get; }

Property Value

Point

Height

public double Height { get; }

Property Value

double

Left

public double Left { get; }

Property Value

double

Right

public double Right { get; }

Property Value

double

Top

public double Top { get; }

Property Value

double

Width

public double Width { get; }

Property Value

double

X

public double X { get; }

Property Value

double

Y

public double Y { get; }

Property Value

double

Methods

Contains(Point)

Checks if this rectangle contains a point.

public bool Contains(Point point)

Parameters

point Point

Returns

bool

Inflate(double)

Returns an inflated copy of this rectangle.

public Rect Inflate(double amount)

Parameters

amount double

Returns

Rect

Intersects(Rect)

Checks if this rectangle intersects with another.

public bool Intersects(Rect other)

Parameters

other Rect

Returns

bool

IntersectsLine(Point, Point)

Checks if a line segment intersects this rectangle.

public bool IntersectsLine(Point start, Point end)

Parameters

start Point
end Point

Returns

bool