C# Class Artemis.Engine.Maths.Geometry.VectorUtils

Afficher le fichier Open project: ArtemisEngine/Artemis-Engine

Méthodes publiques

Свойство Type Description
Down Vector2
GameWorldDown Vector2
GameWorldUp Vector2
Left Vector2
Ones Vector2
Right Vector2
Up Vector2

Méthodes publiques

Méthode Description
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

Method Details

ComponentwiseProduct() public static méthode

public static ComponentwiseProduct ( Vector2 a, Vector2 b ) : Vector2
a Vector2
b Vector2
Résultat Vector2

Polar() public static méthode

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
Résultat Vector2

Polar() public static méthode

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
Résultat Vector2

Rotate() public static méthode

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
Résultat Vector2

Scale() public static méthode

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
Résultat Vector2

ToNormalized() public static méthode

Return the normalization of a given vector.
public static ToNormalized ( Vector2 vec ) : Vector2
vec Vector2
Résultat Vector2

ToVec() public static méthode

public static ToVec ( Point p ) : Vector2
p Point
Résultat Vector2

ToVec() public static méthode

public static ToVec ( System p ) : Vector2
p System
Résultat Vector2

Property Details

Down public_oe static_oe property

The unit vector point down (<0, -1>).
public static Vector2 Down
Résultat Vector2

GameWorldDown public_oe static_oe property

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
Résultat Vector2

GameWorldUp public_oe static_oe property

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
Résultat Vector2

Left public_oe static_oe property

The unit vector pointing left (<-1, 0>).
public static Vector2 Left
Résultat Vector2

Ones public_oe static_oe property

public static Vector2 Ones
Résultat Vector2

Right public_oe static_oe property

The unit vector pointing right (<1, 0>).
public static Vector2 Right
Résultat Vector2

Up public_oe static_oe property

The unit vector pointing up (<0, 1>).
public static Vector2 Up
Résultat Vector2