A* Pathfinding Project
4.1.7
The A* Pathfinding Project for Unity 3D
|
Holds a coordinate in integers. More...
Holds a coordinate in integers.
Public Member Functions | |
Int3 (Vector3 position) | |
Int3 (int _x, int _y, int _z) | |
override bool | Equals (System.Object obj) |
bool | Equals (Int3 other) |
override int | GetHashCode () |
Int3 | Normal2D () |
Normal in 2D space (XZ). More... | |
override string | ToString () |
Returns a nicely formatted string representing the vector. More... | |
Static Public Member Functions | |
static float | Angle (Int3 lhs, Int3 rhs) |
Angle between the vectors in radians. More... | |
static int | Dot (Int3 lhs, Int3 rhs) |
static long | DotLong (Int3 lhs, Int3 rhs) |
static | operator Int3 (Vector3 ob) |
static implicit | operator string (Int3 obj) |
static | operator Vector3 (Int3 ob) |
static bool | operator!= (Int3 lhs, Int3 rhs) |
static Int3 | operator* (Int3 lhs, int rhs) |
static Int3 | operator* (Int3 lhs, float rhs) |
static Int3 | operator* (Int3 lhs, double rhs) |
static Int3 | operator+ (Int3 lhs, Int3 rhs) |
static Int3 | operator- (Int3 lhs, Int3 rhs) |
static Int3 | operator- (Int3 lhs) |
static Int3 | operator/ (Int3 lhs, float rhs) |
static bool | operator== (Int3 lhs, Int3 rhs) |
Public Attributes | |
const float | FloatPrecision = 1000F |
Precision as a float More... | |
const int | Precision = 1000 |
Precision for the integer coordinates. More... | |
const float | PrecisionFactor = 0.001F |
1 divided by Precision More... | |
int | x |
int | y |
int | z |
Properties | |
int | costMagnitude [get] |
Magnitude used for the cost between two nodes. More... | |
float | magnitude [get] |
Returns the magnitude of the vector. More... | |
float | sqrMagnitude [get] |
The squared magnitude of the vector. More... | |
long | sqrMagnitudeLong [get] |
The squared magnitude of the vector. More... | |
int | this[int i] [get, set] |
float | worldMagnitude [get] |
The magnitude in world units. More... | |
static Int3 | zero [get] |
Int3 | ( | Vector3 | position | ) |
Int3 | ( | int | _x, |
int | _y, | ||
int | _z | ||
) |
override bool Equals | ( | System.Object | obj | ) |
bool Equals | ( | Int3 | other | ) |
override int GetHashCode | ( | ) |
Int3 Normal2D | ( | ) |
Normal in 2D space (XZ).
Equivalent to Cross(this, Int3(0,1,0) ) except that the Y coordinate is left unchanged with this operation.
|
explicitstatic |
|
static |
|
explicitstatic |
override string ToString | ( | ) |
Returns a nicely formatted string representing the vector.
const float FloatPrecision = 1000F |
Precision as a float
const int Precision = 1000 |
Precision for the integer coordinates.
One world unit is divided into [value] pieces. A value of 1000 would mean millimeter precision, a value of 1 would mean meter precision (assuming 1 world unit = 1 meter). This value affects the maximum coordinates for nodes as well as how large the cost values are for moving between two nodes. A higher value means that you also have to set all penalty values to a higher value to compensate since the normal cost of moving will be higher.
const float PrecisionFactor = 0.001F |
1 divided by Precision
int x |
int y |
int z |
|
get |
Magnitude used for the cost between two nodes.
The default cost between two nodes can be calculated like this:
This is simply the magnitude, rounded to the nearest integer
|
get |
|
get |
The squared magnitude of the vector.
|
get |
The squared magnitude of the vector.
|
getset |
|
get |
The magnitude in world units.
|
staticget |