Alpha Engine
|
Header file for the 2D vector library. More...
Go to the source code of this file.
Classes | |
struct | AEVec2 |
Typedefs | |
typedef struct AEVec2 | AEVec2 |
Functions | |
s32 | AEVec2Test (s32 i1, s32 i2) |
void | AEVec2Zero (AEVec2 *pResult) |
Set pResult to zero. More... | |
void | AEVec2Set (AEVec2 *pResult, f32 x, f32 y) |
Set pResult to (x, y). More... | |
void | AEVec2Neg (AEVec2 *pResult, AEVec2 *pVec0) |
Set pResult to the negative of pVec0. More... | |
void | AEVec2Add (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1) |
Set pResult to (pVec0 + pVec1). More... | |
void | AEVec2Sub (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1) |
Set pResult to (pVec0 - pVec1). More... | |
void | AEVec2Normalize (AEVec2 *pResult, AEVec2 *pVec0) |
Set pResult to the normalized of pVec0. More... | |
void | AEVec2Scale (AEVec2 *pResult, AEVec2 *pVec0, f32 s) |
Set pResult to (pVec0 * s). More... | |
void | AEVec2ScaleAdd (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1, f32 s) |
Set pResult to ((pVec0 + pVec1) * s). More... | |
void | AEVec2ScaleSub (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1, f32 s) |
Set pResult to ((pVec0 - pVec1) * s). More... | |
void | AEVec2Project (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1) |
Set pResult to the projection of pVec1 onto pVec0. More... | |
void | AEVec2ProjectPerp (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1) |
Set pResult to the perpendicular projection (rejection) of pVec0 onto pVec1. More... | |
void | AEVec2Lerp (AEVec2 *pResult, AEVec2 *pVec0, AEVec2 *pVec1, f32 t) |
Set pResult to the linear interpolation between pVec0 and pVec1 at time interval t. More... | |
f32 | AEVec2Length (AEVec2 *pVec0) |
Calculate the length of pVec0. More... | |
f32 | AEVec2SquareLength (AEVec2 *pVec0) |
Calculate the squared length of pVec0. More... | |
f32 | AEVec2Distance (AEVec2 *pVec0, AEVec2 *pVec1) |
Calculate the distance between 2 points. More... | |
f32 | AEVec2SquareDistance (AEVec2 *pVec0, AEVec2 *pVec1) |
Calculate the squared distance between 2 points. More... | |
f32 | AEVec2DotProduct (AEVec2 *pVec0, AEVec2 *pVec1) |
Calculate the dot product of 2 vectors. More... | |
f32 | AEVec2CrossProductMag (AEVec2 *pVec0, AEVec2 *pVec1) |
Calculate the magnitude of the cross product of 2 vectors. More... | |
void | AEVec2FromAngle (AEVec2 *pResult, f32 angle) |
Set pResult to unit vector of angle. More... | |
Detailed Description
Header file for the 2D vector library.
- Project: Alpha Engine
- Author
- Sun Tjen Fam
- Date
- January 31, 2008
- Copyright
- Copyright (C) 2013 DigiPen Institute of Technology. Reproduction or disclosure of this file or its contents without the prior written consent of DigiPen Institute of Technology is prohibited.
Definition in file AEVec2.h.
Typedef Documentation
Function Documentation
Set pResult to unit vector of angle.
- Parameters
-
[out] pResult Pointer to AEVec2 to be set. [in] angle Angle of the unit vector.
- Return values
-
void No return.
Calculate the length of pVec0.
- Parameters
-
[in] pVec0 Pointer to AEVec2 for input
- Return values
-
f32 Returns the length of pVec0.
Set pResult to the linear interpolation between pVec0 and pVec1 at time interval t.
- Warning
- t should be between 0.0f to 1.0f.
- Parameters
-
[out] pResult Pointer to AEVec2 to be set. [in] pVec0 Pointer to AEVec2 for input. [in] pVec1 Pointer to AEVec2 for input. [in] t The time interval to calculate the linear interpolation at. At t = 0.0f, the result will be pVec0. At t = 1.0f, the result will be pVec1.
- Return values
-
void No return.
Set pResult to (x, y).
- Parameters
-
[out] pResult Pointer to AEVec2 to be set. [in] x X value to set with. [in] y Y value to set with.
- Return values
-
void No return.
Calculate the squared length of pVec0.
- Parameters
-
[in] pVec0 Pointer to AEVec2 for input
- Return values
-
f32 Returns the squared length of pVec0.
Generated on Sat Jan 4 2014 02:06:22 for Alpha Engine by
