Public Member Functions | |
| ksVector3 (float x, float y) | |
| Constructor that takes x and y values and set z to 0. More... | |
| ksVector3 (float x, float y, float z) | |
| Constructor. More... | |
| float | Magnitude () |
| Returns the magnitude. More... | |
| float | MagnitudeSquared () |
| Returns the magnitude squared. More... | |
| ksVector3 | Normalized () |
| Returns the a normalized copy of this vector. More... | |
| bool | Normalize () |
| Normalizes this vector. More... | |
| ksVector3 | Clamped (float maxMagnitude) |
| Returns a copy of this vector with its magnitude clamped to maxLength. More... | |
| void | Clamp (float maxMagnitude) |
| Clamps the magnitude of this vector. More... | |
| ksVector3 | Abs () |
| Absolute value vector. More... | |
| float | MaxValue (bool absolute=false) |
| Gets the maximum component in the vector. More... | |
| float | MinValue (bool absolute=false) |
| Gets the minimum component in the vector. More... | |
| bool | ReplaceNaNs (float value=0.0f) |
| Replaces NaN values in the vector. More... | |
| override string | ToString () |
| Returns a string that represents the current ksVector3. More... | |
| string | ToString (string format) |
| Returns a string respresentation of the vector. More... | |
| string | ToString (IFormatProvider provider) |
| Returns a string respresentation of the vector. More... | |
| override bool | Equals (object obj) |
| Checks if this vector is equal to an object. More... | |
| bool | Equals (ksVector3 other) |
| Checks if this vector is equal to another. More... | |
| override int | GetHashCode () |
| Gets the hash code for this vector. More... | |
Static Public Member Functions | |
| static implicit | operator float[] (ksVector3 value) |
| Implicit conversion from ksVector3 to float[3]. More... | |
| static implicit | operator ksVector3 (float[] value) |
| Implicit conversion from float[] to ksVector3. More... | |
| static float | DeltaDegrees (ksVector3 from, ksVector3 to) |
| Returns the angle in degrees between to vectors. More... | |
| static float | DeltaRadians (ksVector3 from, ksVector3 to) |
| Returns the angle in degrees between to vectors. More... | |
| static float | Dot (ksVector3 lhs, ksVector3 rhs) |
| Computes the dot product of two vectors. More... | |
| static ksVector3 | Cross (ksVector3 lhs, ksVector3 rhs) |
| Computes the cross product of two vectors. More... | |
| static ksVector3 | Max (ksVector3 lhs, ksVector3 rhs) |
| Returns a vector that is made from the largest components of two vectors. More... | |
| static ksVector3 | Min (ksVector3 lhs, ksVector3 rhs) |
| Returns a vector that is made from the smallest components of two vectors More... | |
| static void | OrthoNormalize (ref ksVector3 normal, ref ksVector3 tangent) |
| Normalizes vectors and makes tangent orthoganol to normal. More... | |
| static ksVector3 | Project (ksVector3 vector, ksVector3 target) |
| Projects a vector onto another vector. More... | |
| static ksVector3 | Reflect (ksVector3 direction, ksVector3 normal) |
| Reflects a vector off the plane defined by a normal. More... | |
| static ksVector3 | Lerp (ksVector3 from, ksVector3 to, float t) |
| Linearly Interpolates between two vectors. More... | |
| static ksVector3 | Slerp (ksVector3 from, ksVector3 to, float t, bool lerpMagnitude=false) |
| Spherically interpolates between from and to by t. More... | |
| static ksVector3 | MoveTowards (ksVector3 start, ksVector3 target, float delta) |
| Moves a point towards a target point. More... | |
| static ksVector3 | RotateTowards (ksVector3 vector, ksVector3 direction, float deltaDegrees) |
| Rotates a vector towards a direction. More... | |
| static ksVector3 | RotateTowardsRadians (ksVector3 vector, ksVector3 direction, float deltaRadians) |
| Rotates a vector towards a direction. More... | |
| static ksVector3 | Scale (ksVector3 a, ksVector3 b) |
| Multiplies two vectors component-wise. More... | |
| static ksVector3 | operator- (ksVector3 lhs, ksVector3 rhs) |
| Subtracts one vector from another. More... | |
| static ksVector3 | operator- (ksVector3 v) |
| Multiplies the vector by -1. More... | |
| static ksVector3 | operator* (ksVector3 vector, float scale) |
| Multiplies a ksVector3 by a number. More... | |
| static ksVector3 | operator* (float scale, ksVector3 vector) |
| Multiplies a ksVector3 by a number. More... | |
| static ksVector3 | operator/ (ksVector3 vector, float scale) |
| Divides a ksVector3 by a number. More... | |
| static ksVector3 | operator/ (float number, ksVector3 vector) |
| Dives a number by a ksVector3. More... | |
| static ksVector3 | operator+ (ksVector3 lhs, ksVector3 rhs) |
| Adds two KSVector3s. More... | |
| static bool | operator== (ksVector3 lhs, ksVector3 rhs) |
| Checks if two vectors are equal. More... | |
| static bool | operator!= (ksVector3 lhs, ksVector3 rhs) |
| Checks if two vectors are not equal. More... | |
| static implicit | operator Vector3 (ksVector3 value) |
| Implicit conversion from ksVector3 to Unity Vector3. More... | |
| static implicit | operator ksVector3 (Vector3 value) |
| Implicit conversion from Unity Vector3 to ksVector3. More... | |
| static ksVector3 | operator+ (ksVector3 lhs, Vector3 rhs) |
| Vector addition with ksVector3 and Unity Vector3. More... | |
| static Vector3 | operator+ (Vector3 rhs, ksVector3 lhs) |
| Vector addition with Unity Vector3 and ksVector3. More... | |
| static ksVector3 | operator- (ksVector3 lhs, Vector3 rhs) |
| Vector subtraction with ksVector3 and Unity Vector3. More... | |
| static Vector3 | operator- (Vector3 lhs, ksVector3 rhs) |
| Vector subtraction with Unity Vector3 and ksVector3. More... | |
| static bool | operator== (ksVector3 lhs, Vector3 rhs) |
| Equality comparison with with ksVector3 and Unity Vector3. More... | |
| static bool | operator== (Vector3 lhs, ksVector3 rhs) |
| Equality comparison with Unity Vector3 and ksVector3. More... | |
| static bool | operator!= (ksVector3 lhs, Vector3 rhs) |
| Inequality comparison with with ksVector3 and Unity Vector3. More... | |
| static bool | operator!= (Vector3 lhs, ksVector3 rhs) |
| Inequality comparison with Unity Vector3 and ksVector3. More... | |
Static Public Attributes | |
| static ksVector3 | m_right = new ksVector3(1f, 0f, 0f) |
Properties | |
| static ksVector3 | One [get] |
| One. More... | |
| static ksVector3 | Zero [get] |
| Zero. More... | |
| static ksVector3 | Forward [get] |
| World forward direction. More... | |
| static ksVector3 | Up [get] |
| World up direction. More... | |
| static ksVector3 | Right [get] |
| World right direction. More... | |
| static ksVector3 | Backwards [get] |
| World backwards direction. More... | |
| static ksVector3 | Down [get] |
| World down direction. More... | |
| static ksVector3 | Left [get] |
| World left direction. More... | |
| float | X [get, set] |
| X value. More... | |
| float | Y [get, set] |
| Y value. More... | |
| float | Z [get, set] |
| Z value. More... | |
| ksVector2 | XY [get, set] |
| X and Y values as a ksVector2 More... | |
| ksVector2 | XZ [get, set] |
| X and Z values as a ksVector2 More... | |
| ksVector2 | YZ [get, set] |
| Y and Z values as a ksVector2 More... | |
| float | this[int index] [get, set] |
| Indexer. More... | |
ksVector3 struct.
Vector struct
| KS.Reactor.ksVector3.ksVector3 | ( | float | x, |
| float | y | ||
| ) |
Constructor that takes x and y values and set z to 0.
| x | X value. |
| y | Y value. |
| KS.Reactor.ksVector3.ksVector3 | ( | float | x, |
| float | y, | ||
| float | z | ||
| ) |
Constructor.
| x | X value. |
| y | Y value. |
| z | Z value. |
| ksVector3 KS.Reactor.ksVector3.Abs | ( | ) |
Absolute value vector.
| void KS.Reactor.ksVector3.Clamp | ( | float | maxMagnitude | ) |
Clamps the magnitude of this vector.
| maxMagnitude | Max magnitude to clamp magnitude to. |
| ksVector3 KS.Reactor.ksVector3.Clamped | ( | float | maxMagnitude | ) |
Returns a copy of this vector with its magnitude clamped to maxLength.
| maxMagnitude | Max magnitude to clamp magnitude to. |
Computes the cross product of two vectors.
| lhs | |
| rhs |
Returns the angle in degrees between to vectors.
| from | The angle extends round from this vector. |
| to | The angle extends round to this vector. |
Returns the angle in degrees between to vectors.
| from | The angle extends round from this vector. |
| to | The angle extends round to this vector. |
Computes the dot product of two vectors.
| lhs | |
| rhs |
| bool KS.Reactor.ksVector3.Equals | ( | ksVector3 | other | ) |
Checks if this vector is equal to another.
| other | Other vector to compare with. |
| override bool KS.Reactor.ksVector3.Equals | ( | object | obj | ) |
Checks if this vector is equal to an object.
| obj | Object to compare with this vector. |
| override int KS.Reactor.ksVector3.GetHashCode | ( | ) |
Gets the hash code for this vector.
Linearly Interpolates between two vectors.
| from | Vector to interpolate from. |
| to | Vector to interpolate to. |
| t | Value between 0 and 1 that determines the amount of interpolation. |
| float KS.Reactor.ksVector3.Magnitude | ( | ) |
Returns the magnitude.
| float KS.Reactor.ksVector3.MagnitudeSquared | ( | ) |
Returns the magnitude squared.
Returns a vector that is made from the largest components of two vectors.
| lhs | |
| rhs |
| float KS.Reactor.ksVector3.MaxValue | ( | bool | absolute = false | ) |
Gets the maximum component in the vector.
| absolute | If ture, returns the max absolute value. |
Returns a vector that is made from the smallest components of two vectors
| lhs | |
| rhs | Min vector. |
| float KS.Reactor.ksVector3.MinValue | ( | bool | absolute = false | ) |
Gets the minimum component in the vector.
| absolute | If true, return sthe min absolute value. |
|
static |
Moves a point towards a target point.
| start | Start point. |
| target | Target to move towards. |
| delta | delta distance to move. It will not overshoot the target. Negative values will move away from the target. |
| bool KS.Reactor.ksVector3.Normalize | ( | ) |
Normalizes this vector.
| ksVector3 KS.Reactor.ksVector3.Normalized | ( | ) |
Returns the a normalized copy of this vector.
|
static |
Implicit conversion from ksVector3 to float[3].
| value |
|
static |
Implicit conversion from float[] to ksVector3.
| value |
|
static |
|
static |
Checks if two vectors are not equal.
| lhs | |
| rhs |
|
static |
|
static |
Adds two KSVector3s.
| lhs | |
| rhs |
|
static |
Subtracts one vector from another.
| lhs | |
| rhs |
Multiplies the vector by -1.
| v |
|
static |
Checks if two vectors are equal.
| lhs | |
| rhs |
|
static |
|
static |
|
static |
Normalizes vectors and makes tangent orthoganol to normal.
| normal | |
| tangent |
Projects a vector onto another vector.
| vector | Vector to project. |
| target | Target to project onto. |
Reflects a vector off the plane defined by a normal.
| direction | Direction to reflect. |
| normal | Normal of plane to reflect off of. |
| bool KS.Reactor.ksVector3.ReplaceNaNs | ( | float | value = 0.0f | ) |
Replaces NaN values in the vector.
| value | Replacement value. |
|
static |
Rotates a vector towards a direction.
| vector | Vector to rotate. |
| direction | Direction to rotate towards. |
| deltaDegrees | Max amount in degrees to rotate the vector. |
|
static |
Rotates a vector towards a direction.
| vector | Vector to rotate. |
| direction | Direction to rotate towards. |
| deltaRadians | Max amount in radians to rotate the vector. |
Multiplies two vectors component-wise.
| a | |
| b |
|
static |
Spherically interpolates between from and to by t.
| from | Vector to interpolate from. |
| to | Vector to interpolate to. |
| t | Value between 0 and 1 that determines the amount of interpolation. |
| lerpMagnitude | If false, magnitude won't be interpolated. |
| override string KS.Reactor.ksVector3.ToString | ( | ) |
| string KS.Reactor.ksVector3.ToString | ( | IFormatProvider | provider | ) |
Returns a string respresentation of the vector.
| provider |
| string KS.Reactor.ksVector3.ToString | ( | string | format | ) |
Returns a string respresentation of the vector.
| format |
|
staticget |
World backwards direction.
|
staticget |
World down direction.
|
staticget |
World forward direction.
|
staticget |
World left direction.
|
staticget |
One.
|
staticget |
World right direction.
|
getset |
Indexer.
| index |
|
staticget |
World up direction.
|
getset |
X value.
|
getset |
Y value.
|
getset |
Z value.
|
staticget |
Zero.