Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.Rectangle

Malware edited this page Dec 21, 2018 · 51 revisions

Index

Rectangle Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Defines a rectangle.

Fields

Member Description
int X Specifies the x-coordinate of the rectangle.
int Y Specifies the y-coordinate of the rectangle.
int Width Specifies the width of the rectangle.
int Height Specifies the height of the rectangle.

Properties

Member Description
int Left Returns the x-coordinate of the left side of the rectangle.
int Right Returns the x-coordinate of the right side of the rectangle.
int Top Returns the y-coordinate of the top of the rectangle.
int Bottom Returns the y-coordinate of the bottom of the rectangle.
VRageMath.Point Location Gets or sets the upper-left value of the Rectangle.
VRageMath.Point Center Gets the Point that specifies the center of the rectangle.

Methods

Member Description
void Offset(VRageMath.Point) Changes the position of the Rectangle.
void Offset(int, int) Changes the position of the Rectangle.
void Inflate(int, int) Pushes the edges of the Rectangle out by the horizontal and vertical values specified.
bool Contains(int, int) Determines whether this Rectangle contains a specified point represented by its x- and y-coordinates.
bool Contains(VRageMath.Point) Determines whether this Rectangle contains a specified Point.
void Contains(ref VRageMath.Point, ref bool) Determines whether this Rectangle contains a specified Point.
bool Contains(VRageMath.Rectangle) Determines whether this Rectangle entirely contains a specified Rectangle.
void Contains(ref VRageMath.Rectangle, ref bool) Determines whether this Rectangle entirely contains a specified Rectangle.
bool Intersects(VRageMath.Rectangle) Determines whether a specified Rectangle intersects with this Rectangle.
void Intersects(ref VRageMath.Rectangle, ref bool) Determines whether a specified Rectangle intersects with this Rectangle.
static VRageMath.Rectangle Intersect(VRageMath.Rectangle, VRageMath.Rectangle) Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.
static void Intersect(ref VRageMath.Rectangle, ref VRageMath.Rectangle, ref VRageMath.Rectangle) Creates a Rectangle defining the area where one rectangle overlaps with another rectangle.
static VRageMath.Rectangle Union(VRageMath.Rectangle, VRageMath.Rectangle) Creates a new Rectangle that exactly contains two other rectangles.
static void Union(ref VRageMath.Rectangle, ref VRageMath.Rectangle, ref VRageMath.Rectangle) Creates a new Rectangle that exactly contains two other rectangles.
bool Equals(VRageMath.Rectangle) Determines whether the specified Object is equal to the Rectangle.
bool Equals(System.Object) Returns a value that indicates whether the current instance is equal to a specified object.
string ToString() Retrieves a string representation of the current object.
int GetHashCode() Gets the hash code for this object.

Clone this wiki locally