C# Класс Artemis.Engine.Maths.Geometry.VectorUtils

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

Открытые свойства

Свойство Тип Описание
Down Vector2
GameWorldDown Vector2
GameWorldUp Vector2
Left Vector2
Ones Vector2
Right Vector2
Up Vector2

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

Метод Описание
ComponentwiseProduct ( Vector2 a, Vector2 b ) : Vector2
Polar ( double angle, Vector2 origin, bool degrees = true ) : Vector2

Return the unit vector pointing at the given angle relative to the positive x-axis, centered at the given origin.

Polar ( double angle, bool degrees = true ) : Vector2

Return the unit vector pointing at the given angle relative to the positive x-axis.

Rotate ( Vector2 vec, double angle, Vector2 origin, bool degrees = true, bool absoluteOrigin = true ) : Vector2

Rotate a vector by the given amount relative to the given point, and return the result.

Scale ( Vector2 vec, double amount, Vector2 origin, bool absoluteOrigin = true ) : Vector2

Scale a vector by the given amount relative to the given point, and return the result.

ToNormalized ( Vector2 vec ) : Vector2

Return the normalization of a given vector.

ToVec ( Point p ) : Vector2
ToVec ( System p ) : Vector2

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

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

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

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

Return the unit vector pointing at the given angle relative to the positive x-axis, centered at the given origin.
public static Polar ( double angle, Vector2 origin, bool degrees = true ) : Vector2
angle double
origin Vector2
degrees bool
Результат Vector2

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

Return the unit vector pointing at the given angle relative to the positive x-axis.
public static Polar ( double angle, bool degrees = true ) : Vector2
angle double
degrees bool
Результат Vector2

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

Rotate a vector by the given amount relative to the given point, and return the result.
public static Rotate ( Vector2 vec, double angle, Vector2 origin, bool degrees = true, bool absoluteOrigin = true ) : Vector2
vec Vector2
angle double
origin Vector2
degrees bool
absoluteOrigin bool
Результат Vector2

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

Scale a vector by the given amount relative to the given point, and return the result.
public static Scale ( Vector2 vec, double amount, Vector2 origin, bool absoluteOrigin = true ) : Vector2
vec Vector2
amount double
origin Vector2
absoluteOrigin bool
Результат Vector2

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

Return the normalization of a given vector.
public static ToNormalized ( Vector2 vec ) : Vector2
vec Vector2
Результат Vector2

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

public static ToVec ( Point p ) : Vector2
p Point
Результат Vector2

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

public static ToVec ( System p ) : Vector2
p System
Результат Vector2

Описание свойств

Down публичное статическое свойство

The unit vector point down (<0, -1>).
public static Vector2 Down
Результат Vector2

GameWorldDown публичное статическое свойство

The down direction relative to the game world. Since the game coordinate space is flipped on it's y-axis, this corresponds to the vector <0, 1>.
public static Vector2 GameWorldDown
Результат Vector2

GameWorldUp публичное статическое свойство

The up direction relative to the game world. Since the game coordinate space is flipped on it's y-axis, this corresponds to the vector <0, -1>.
public static Vector2 GameWorldUp
Результат Vector2

Left публичное статическое свойство

The unit vector pointing left (<-1, 0>).
public static Vector2 Left
Результат Vector2

Ones публичное статическое свойство

public static Vector2 Ones
Результат Vector2

Right публичное статическое свойство

The unit vector pointing right (<1, 0>).
public static Vector2 Right
Результат Vector2

Up публичное статическое свойство

The unit vector pointing up (<0, 1>).
public static Vector2 Up
Результат Vector2