C# Класс Blink.Utilities.VectorMath

Показать файл Открыть проект

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

Метод Описание
angleBetweenVectors ( Vector2 a, Vector2 b ) : float
axisCollision ( Vector2 aVerts, Vector2 bVerts, Vector2 axis ) : bool
convexCollision ( Vector2 aVerts, Vector2 aOrigin, Vector2 bVerts, Vector2 bOrigin, bool closed = true, int vertNum = -1 ) : bool
rectCollision ( Rectangle a, float aRot, Rectangle b, float bRot ) : bool
rectCollision ( Rectangle a, float aRot, Rectangle b, float bRot, Point origin ) : bool
rectVerts ( Rectangle r, float rRot ) : Vector2[]
rectVerts ( Rectangle r, float rRot, Point origin ) : Vector2[]

Returns the corners of the rectangle in XY pairs after rotating by rRot radians

rotationFromVector ( Vector2 vect ) : float
vectorTo ( Vector2 from, Vector2 to ) : Vector2

Returns a unit vector pointing from point "from" to point "to"

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

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

public static angleBetweenVectors ( Vector2 a, Vector2 b ) : float
a Vector2
b Vector2
Результат float

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

public static axisCollision ( Vector2 aVerts, Vector2 bVerts, Vector2 axis ) : bool
aVerts Vector2
bVerts Vector2
axis Vector2
Результат bool

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

public static convexCollision ( Vector2 aVerts, Vector2 aOrigin, Vector2 bVerts, Vector2 bOrigin, bool closed = true, int vertNum = -1 ) : bool
aVerts Vector2
aOrigin Vector2
bVerts Vector2
bOrigin Vector2
closed bool
vertNum int
Результат bool

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

public static rectCollision ( Rectangle a, float aRot, Rectangle b, float bRot ) : bool
a Microsoft.Xna.Framework.Rectangle
aRot float
b Microsoft.Xna.Framework.Rectangle
bRot float
Результат bool

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

public static rectCollision ( Rectangle a, float aRot, Rectangle b, float bRot, Point origin ) : bool
a Microsoft.Xna.Framework.Rectangle
aRot float
b Microsoft.Xna.Framework.Rectangle
bRot float
origin Point
Результат bool

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

public static rectVerts ( Rectangle r, float rRot ) : Vector2[]
r Microsoft.Xna.Framework.Rectangle
rRot float
Результат Vector2[]

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

Returns the corners of the rectangle in XY pairs after rotating by rRot radians
public static rectVerts ( Rectangle r, float rRot, Point origin ) : Vector2[]
r Microsoft.Xna.Framework.Rectangle Rectangle to be rotated
rRot float Rotation in radians
origin Point
Результат Vector2[]

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

public static rotationFromVector ( Vector2 vect ) : float
vect Vector2
Результат float

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

Returns a unit vector pointing from point "from" to point "to"
public static vectorTo ( Vector2 from, Vector2 to ) : Vector2
from Vector2
to Vector2
Результат Vector2