메소드 | 설명 | |
---|---|---|
boundsFromPolygonPoints ( Vector2 points ) : |
given the points of a polygon calculates the bounds
|
|
calculateBounds ( |
||
clone ( this rect ) : |
clones and returns a new Rectangle with the same data as the current rectangle
|
|
collisionCheck ( |
returns true if the boxes are colliding moveX and moveY will return the movement that b1 must move to avoid the collision
|
|
contract ( |
||
expandSide ( |
||
fromFloats ( float x, float y, float width, float height ) : |
returns a rectangle from the passed in floats
|
|
fromMinMaxPoints ( Point min, Point max ) : |
creates a Rectangle given min/max points (top-left, bottom-right points)
|
|
getCenter ( |
gets the center point of the rectangle as a Vector2
|
|
getCenter ( this rect ) : Vector2 |
gets the center point of the rectangle as a Vector2
|
|
getClosestPointOnBoundsToOrigin ( |
||
getClosestPointOnRectangleBorderToPoint ( |
gets the closest point that is on the rectangle border to the given point
|
|
getClosestPointOnRectangleToPoint ( |
returns the closest point that is in or on the Rectangle to the given point
|
|
getHalfRect ( this rect, System.Edge edge ) : |
||
getHalfSize ( this rect ) : Vector2 |
gets the half size of the rect
|
|
getIntersectionDepth ( |
Calculates the signed depth of intersection between two rectangles.
|
|
getMax ( |
gets the max point of the rectangle, the bottom-right corner
|
|
getPosition ( |
gets the position of the rectangle as a Vector2
|
|
getRectEdgePortion ( this rect, System.Edge edge, int size = 1 ) : |
gets a portion of the Rectangle with a width/height of size that is on the Edge of the Rectangle but still contained within it.
|
|
getSide ( this rect, System.Edge edge ) : int |
gets the position of the specified side
|
|
getSweptBroadphaseBounds ( |
returns a Bounds the spans the current bounds and the provided delta positions
|
|
getSweptBroadphaseBounds ( |
returns a Bounds the spans the current bounds and the provided delta positions
|
|
intersect ( |
returns true if rect1 intersects rect2
|
|
rayIntersects ( |
||
rayIntersects ( this rectangle, Microsoft.Xna.Framework.Ray ray ) : float? | ||
scale ( |
scales the rect
|
|
translate ( |
||
union ( |
Update first to be the union of first and point
|
|
union ( |
calculates the union of the two Rectangles. The result will be a rectangle that encompasses the other two.
|
public static boundsFromPolygonPoints ( Vector2 points ) : |
||
points | Vector2 | Points. |
리턴 |
public static calculateBounds ( |
||
rect | ||
parentPosition | Vector2 | |
position | Vector2 | |
origin | Vector2 | |
scale | Vector2 | |
rotation | float | |
width | float | |
height | float | |
리턴 | void |
public static clone ( this rect ) : |
||
rect | this | Rect. |
리턴 |
public static collisionCheck ( |
||
rect | ||
other | Other. | |
moveX | float | Move x. |
moveY | float | Move y. |
리턴 | bool |
public static contract ( |
||
rect | ||
horizontalAmount | int | |
verticalAmount | int | |
리턴 | void |
public static expandSide ( |
||
rect | ||
edge | System.Edge | |
amount | int | |
리턴 | void |
public static fromFloats ( float x, float y, float width, float height ) : |
||
x | float | The x coordinate. |
y | float | The y coordinate. |
width | float | Width. |
height | float | Height. |
리턴 |
public static fromMinMaxPoints ( Point min, Point max ) : |
||
min | Point | Minimum. |
max | Point | Max. |
리턴 |
public static getCenter ( |
||
rect | Rect. | |
리턴 | Vector2 |
public static getClosestPointOnBoundsToOrigin ( |
||
rect | ||
리턴 | Vector2 |
public static getClosestPointOnRectangleBorderToPoint ( |
||
rect | Rect. | |
point | Vector2 | Point. |
리턴 | Point |
public static getClosestPointOnRectangleToPoint ( |
||
rect | Rect. | |
point | Vector2 | Point. |
리턴 | Vector2 |
public static getHalfRect ( this rect, System.Edge edge ) : |
||
rect | this | |
edge | System.Edge | |
리턴 |
public static getHalfSize ( this rect ) : Vector2 | ||
rect | this | Rect. |
리턴 | Vector2 |
public static getIntersectionDepth ( |
||
rectA | ||
rectB | ||
리턴 | Vector2 |
public static getMax ( |
||
rect | Rect. | |
리턴 | Point |
public static getPosition ( |
||
rect | Rect. | |
리턴 | Vector2 |
public static getRectEdgePortion ( this rect, System.Edge edge, int size = 1 ) : |
||
rect | this | Rect. |
edge | System.Edge | Edge. |
size | int | Size. |
리턴 |
public static getSide ( this rect, System.Edge edge ) : int | ||
rect | this | |
edge | System.Edge | Side. |
리턴 | int |
public static getSweptBroadphaseBounds ( |
||
rect | ||
deltaX | float | |
deltaY | float | |
리턴 |
public static getSweptBroadphaseBounds ( |
||
rect | ||
deltaX | int | |
deltaY | int | |
리턴 |
public static intersect ( |
||
rect1 | ||
rect2 | ||
리턴 | bool |
public static rayIntersects ( |
||
rect | ||
ray | ||
distance | float | |
리턴 | bool |
public static rayIntersects ( this rectangle, Microsoft.Xna.Framework.Ray ray ) : float? | ||
rectangle | this | |
ray | Microsoft.Xna.Framework.Ray | |
리턴 | float? |
public static scale ( |
||
rect | Rect. | |
scale | Vector2 | Scale. |
리턴 | void |
public static translate ( |
||
rect | ||
vec | Vector2 | |
리턴 | void |
public static union ( |
||
first | First. | |
point | Point | Point. |
result | Result. | |
리턴 | void |
public static union ( |
||
value1 | ||
value2 | ||
result | Result. | |
리턴 | void |