![]() |
Falco Engine 3.9.0.1 (beta)
|
Public Member Functions | |
Vector2 (float x, float y) | |
void | Set (float newX, float newY) |
void | Scale (Vector2 scale) |
void | Normalize () |
override string | ToString () |
string | ToString (string format) |
override int | GetHashCode () |
override bool | Equals (object other) |
bool | Equals (Vector2 other) |
float | SqrMagnitude () |
Static Public Member Functions | |
static Vector2 | Lerp (Vector2 a, Vector2 b, float t) |
static Vector2 | LerpUnclamped (Vector2 a, Vector2 b, float t) |
static Vector2 | MoveTowards (Vector2 current, Vector2 target, float maxDistanceDelta) |
static Vector2 | Scale (Vector2 a, Vector2 b) |
static Vector2 | Reflect (Vector2 inDirection, Vector2 inNormal) |
static Vector2 | Perpendicular (Vector2 inDirection) |
static float | Dot (Vector2 lhs, Vector2 rhs) |
static float | Angle (Vector2 from, Vector2 to) |
static float | SignedAngle (Vector2 from, Vector2 to) |
static float | Distance (Vector2 a, Vector2 b) |
static Vector2 | ClampMagnitude (Vector2 vector, float maxLength) |
static float | SqrMagnitude (Vector2 a) |
static Vector2 | Min (Vector2 lhs, Vector2 rhs) |
static Vector2 | Max (Vector2 lhs, Vector2 rhs) |
static Vector2 | SmoothDamp (Vector2 current, Vector2 target, ref Vector2 currentVelocity, float smoothTime, float maxSpeed) |
static Vector2 | SmoothDamp (Vector2 current, Vector2 target, ref Vector2 currentVelocity, float smoothTime) |
static Vector2 | SmoothDamp (Vector2 current, Vector2 target, ref Vector2 currentVelocity, float smoothTime, float maxSpeed, float deltaTime) |
static Vector2 | operator+ (Vector2 a, Vector2 b) |
static Vector2 | operator- (Vector2 a, Vector2 b) |
static Vector2 | operator* (Vector2 a, Vector2 b) |
static Vector2 | operator/ (Vector2 a, Vector2 b) |
static Vector2 | operator- (Vector2 a) |
static Vector2 | operator* (Vector2 a, float d) |
static Vector2 | operator* (float d, Vector2 a) |
static Vector2 | operator/ (Vector2 a, float d) |
static bool | operator== (Vector2 lhs, Vector2 rhs) |
static bool | operator!= (Vector2 lhs, Vector2 rhs) |
static implicit | operator Vector2 (Vector3 v) |
static implicit | operator Vector3 (Vector2 v) |
Public Attributes | |
float | x |
float | y |
Static Public Attributes | |
const float | kEpsilon = 1E-05f |
const float | kEpsilonNormalSqrt = 1E-15f |
Properties | |
float | this[int index] [getset] |
Vector2 | normalized [get] |
float | magnitude [get] |
float | sqrMagnitude [get] |
static Vector2 | zero [get] |
static Vector2 | one [get] |
static Vector2 | up [get] |
static Vector2 | down [get] |
static Vector2 | left [get] |
static Vector2 | right [get] |
static Vector2 | positiveInfinity [get] |
static Vector2 | negativeInfinity [get] |
Definition at line 10 of file Vector2.cs.
FalcoEngine.Vector2.Vector2 | ( | float | x, |
float | y | ||
) |
Constructs a new vector with given x, y components.
x | |
y |
Definition at line 140 of file Vector2.cs.
Returns the unsigned angle in degrees between from and to.
from | The vector from which the angular difference is measured. |
to | The vector to which the angular difference is measured. |
Definition at line 314 of file Vector2.cs.
Returns a copy of vector with its magnitude clamped to maxLength.
vector | |
maxLength |
Definition at line 354 of file Vector2.cs.
override bool FalcoEngine.Vector2.Equals | ( | object | other | ) |
Returns true if the given vector is exactly equal to this vector.
other |
Definition at line 262 of file Vector2.cs.
bool FalcoEngine.Vector2.Equals | ( | Vector2 | other | ) |
Definition at line 271 of file Vector2.cs.
override int FalcoEngine.Vector2.GetHashCode | ( | ) |
Definition at line 253 of file Vector2.cs.
Linearly interpolates between vectors a and b by t.
a | |
b | |
t |
Definition at line 163 of file Vector2.cs.
Linearly interpolates between vectors a and b by t.
a | |
b | |
t |
Definition at line 175 of file Vector2.cs.
Returns a vector that is made from the largest components of two vectors.
lhs | |
rhs |
Definition at line 392 of file Vector2.cs.
Returns a vector that is made from the smallest components of two vectors.
lhs | |
rhs |
Definition at line 382 of file Vector2.cs.
|
static |
Moves a point current towards target.
current | |
target | |
maxDistanceDelta |
Definition at line 186 of file Vector2.cs.
void FalcoEngine.Vector2.Normalize | ( | ) |
Makes this vector have a magnitude of 1.
Definition at line 222 of file Vector2.cs.
Definition at line 502 of file Vector2.cs.
Definition at line 507 of file Vector2.cs.
Definition at line 497 of file Vector2.cs.
Definition at line 480 of file Vector2.cs.
Definition at line 475 of file Vector2.cs.
Definition at line 460 of file Vector2.cs.
Definition at line 450 of file Vector2.cs.
Definition at line 470 of file Vector2.cs.
Definition at line 455 of file Vector2.cs.
Definition at line 485 of file Vector2.cs.
Definition at line 465 of file Vector2.cs.
Definition at line 490 of file Vector2.cs.
Returns the 2D vector perpendicular to this 2D vector. The result is always rotated 90-degrees in a counter-clockwise direction for a 2D coordinate system where the positive Y axis goes up.
inDirection | The input direction. |
Definition at line 294 of file Vector2.cs.
Reflects a vector off the vector defined by a normal.
inDirection | |
inNormal |
Definition at line 281 of file Vector2.cs.
void FalcoEngine.Vector2.Scale | ( | Vector2 | scale | ) |
Multiplies every component of this vector by the same component of scale.
scale |
Definition at line 213 of file Vector2.cs.
void FalcoEngine.Vector2.Set | ( | float | newX, |
float | newY | ||
) |
Set x and y components of an existing Vector2.
newX | |
newY |
Definition at line 151 of file Vector2.cs.
Returns the signed angle in degrees between from and to.
from | The vector from which the angular difference is measured. |
to | The vector to which the angular difference is measured. |
Definition at line 330 of file Vector2.cs.
|
static |
Definition at line 403 of file Vector2.cs.
|
static |
Definition at line 397 of file Vector2.cs.
|
static |
Definition at line 410 of file Vector2.cs.
float FalcoEngine.Vector2.SqrMagnitude | ( | ) |
Definition at line 372 of file Vector2.cs.
|
static |
Definition at line 367 of file Vector2.cs.
override string FalcoEngine.Vector2.ToString | ( | ) |
Returns a nicely formatted string for this vector.
format |
Definition at line 239 of file Vector2.cs.
string FalcoEngine.Vector2.ToString | ( | string | format | ) |
Returns a nicely formatted string for this vector.
format |
Definition at line 248 of file Vector2.cs.
|
static |
Definition at line 38 of file Vector2.cs.
|
static |
Definition at line 40 of file Vector2.cs.
float FalcoEngine.Vector2.x |
X component of the vector.
Definition at line 15 of file Vector2.cs.
float FalcoEngine.Vector2.y |
Y component of the vector.
Definition at line 20 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(0, -1).
Definition at line 113 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(-1, 0).
Definition at line 118 of file Vector2.cs.
|
get |
Returns the length of this vector (Read Only).
Definition at line 88 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(float.NegativeInfinity, float.NegativeInfinity).
Definition at line 133 of file Vector2.cs.
|
get |
Returns this vector with a magnitude of 1 (Read Only).
Definition at line 75 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(1, 1).
Definition at line 103 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(float.PositiveInfinity, float.PositiveInfinity).
Definition at line 128 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(1, 0).
Definition at line 123 of file Vector2.cs.
|
get |
Returns the squared length of this vector (Read Only).
Definition at line 93 of file Vector2.cs.
|
getset |
Definition at line 42 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(0, 1).
Definition at line 108 of file Vector2.cs.
|
staticget |
Shorthand for writing Vector2(0, 0).
Definition at line 98 of file Vector2.cs.