Krig Game Engine Lua Scripting API - Vector Library.
More...
|
float | scalar (Vector3, Vector3) |
|
Vector3 | normalize (Vector3) |
|
float | dot_product (Vector3, Vector3) |
|
Vector3 | cross_product (Vector3, Vector3) |
|
Vector3 | average (Vector3, Vector3) |
|
Vector3 | add (Vector3, Vector3) |
|
Vector3 | subtract (Vector3, Vector3) |
|
Vector3 | scale (Vector3, float) |
|
Vector3 | copy (Vector3) |
|
float | distance (Vector3, Vector3) |
|
float | sum (Vector3) |
|
int | luaopen_krigVector (lua_State *L) |
|
Krig Game Engine Lua Scripting API - Vector Library.
3-D Vector math API functionality.
◆ add()
Vector3 add |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Add two vectors.
- Parameters
-
- Returns
- Vector3
◆ average()
Vector3 average |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Calculate average of two vectors.
- Parameters
-
- Returns
- Vector3
◆ copy()
Copy a vector.
- Parameters
-
- Returns
- Vector3
◆ cross_product()
Vector3 cross_product |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Calculate cross product between two vectors.
- Parameters
-
- Returns
- Vector3
◆ distance()
float distance |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Calculate distance between two vectors.
- Parameters
-
- Returns
- float
◆ dot_product()
float dot_product |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Calculate dot product between two vectors.
- Parameters
-
- Returns
- float
◆ normalize()
Vector3 normalize |
( |
Vector3 |
| ) |
|
Normalize the vector.
- Parameters
-
- Returns
- Vector3
◆ scalar()
float scalar |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Calculate scalar value between two vectors.
- Parameters
-
- Returns
- float
◆ scale()
Vector3 scale |
( |
Vector3 |
, |
|
|
float |
|
|
) |
| |
Scale a vector.
- Parameters
-
- Returns
- Vector3
◆ subtract()
Vector3 subtract |
( |
Vector3 |
, |
|
|
Vector3 |
|
|
) |
| |
Subtract two vectors.
- Parameters
-
- Returns
- Vector3
◆ sum()
Add vector components.
- Parameters
-
- Returns
- float