Method | Description | |
---|---|---|
IsCCW ( Vector2 a, Vector2 b ) : bool |
is rotating from A to B Counter-clockwise?
|
|
LineIntersect ( Vector2 ptA, Vector2 ptB, Vector2 ptC, Vector2 ptD, Vector2 &hitPt ) : bool |
see if 2 line segments intersect. (line AB collides with line CD) - simplified version
|
|
LineIntersect ( Vector2 ptA, Vector2 ptB, Vector2 ptC, Vector2 ptD, Vector2 &hitPt, float &Ua, float &Ub ) : bool |
see if 2 line segments intersect. (line AB collides with line CD)
|
|
Perpendicular ( Vector2 vector ) : Vector2 |
get a vector perpendicular to this vector.
|
|
Perpendicular ( Vector2 &vector ) : void |
make this vector perpendicular to itself
|
|
Perpendicular ( Vector2 &vectorIn, Vector2 &vectorOut ) : void |
get a vector perpendicular to this vector (reference type version)
|
|
Rotate ( Vector2 vector, float radians ) : Vector2 |
rotate a vector by a given angle (in radians).
|
|
Rotate ( Vector2 &vector, float radians ) : void |
rotate a given vector by a given angle (reference type version)
|
|
Rotate ( Vector2 &vectorIn, float radians, Vector2 &vectorOut ) : void |
rotate a vector by a given angle (reference type version)
|
|
Vector3FromVector2 ( Vector2 vector ) : Vector3 |
turn a Vector2 into a Vector3 (sets Z component to zero)
|
|
Vector3FromVector2 ( Vector2 vector, float z ) : Vector3 |
turn a Vector2 into a Vector3, specifying the Z component to use.
|
public static IsCCW ( Vector2 a, Vector2 b ) : bool | ||
a | Vector2 | |
b | Vector2 | |
return | bool |
public static LineIntersect ( Vector2 ptA, Vector2 ptB, Vector2 ptC, Vector2 ptD, Vector2 &hitPt ) : bool | ||
ptA | Vector2 | first point on line AB |
ptB | Vector2 | second point on line AB |
ptC | Vector2 | first point on line CD |
ptD | Vector2 | second point on line CD |
hitPt | Vector2 | resulting point of intersection |
return | bool |
public static LineIntersect ( Vector2 ptA, Vector2 ptB, Vector2 ptC, Vector2 ptD, Vector2 &hitPt, float &Ua, float &Ub ) : bool | ||
ptA | Vector2 | first point on line AB |
ptB | Vector2 | second point on line AB |
ptC | Vector2 | first point on line CD |
ptD | Vector2 | second point on line CD |
hitPt | Vector2 | resulting point of intersection |
Ua | float | distance along AB to intersection [0,1] |
Ub | float | distance long CD to intersection [0,1] |
return | bool |
public static Perpendicular ( Vector2 vector ) : Vector2 | ||
vector | Vector2 | |
return | Vector2 |
public static Perpendicular ( Vector2 &vector ) : void | ||
vector | Vector2 | |
return | void |
public static Perpendicular ( Vector2 &vectorIn, Vector2 &vectorOut ) : void | ||
vectorIn | Vector2 | |
vectorOut | Vector2 | |
return | void |
public static Rotate ( Vector2 vector, float radians ) : Vector2 | ||
vector | Vector2 | |
radians | float | |
return | Vector2 |
public static Rotate ( Vector2 &vector, float radians ) : void | ||
vector | Vector2 | |
radians | float | |
return | void |
public static Rotate ( Vector2 &vectorIn, float radians, Vector2 &vectorOut ) : void | ||
vectorIn | Vector2 | |
radians | float | |
vectorOut | Vector2 | |
return | void |
public static Vector3FromVector2 ( Vector2 vector ) : Vector3 | ||
vector | Vector2 | |
return | Vector3 |
public static Vector3FromVector2 ( Vector2 vector, float z ) : Vector3 | ||
vector | Vector2 | |
z | float | |
return | Vector3 |