![]() |
SystemEX
Lacking
Additional generic collection types missing in .net
|
Public Member Functions | |
| Vec3i () | |
| Initializes a zero vector (0,0). | |
| Vec3i (int _x, int _y, int _z) | |
| Initializes a vector with explicit X and Y values. | |
| Vec3i (int _f) | |
| Initializes both components with the same value. | |
| Vec3i (Vec3i vec) | |
| Copy constructor. | |
| Vec3i (int[] lpvec) | |
| Initializes the vector from a int array. | |
| int | Get (int index) |
| Gets a component by index (0 = X, 1 = Y). | |
| override int | GetHashCode () |
| Computes a hash code for this vector. | |
| int | CompareTo (object? obj) |
| Compares this vector to another object. | |
| CompareResult | CompareTo (Vec3i a) |
| Compares two vectors lexicographically. | |
| bool | Equals (Vec3i other) |
| Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec3i,Vec3i). | |
| override bool | Equals (object? obj) |
| Determines whether this instance is equal to another object. | |
| int IComparable< Vec3i >. | CompareTo (Vec3i other) |
| FixedVector< byte > | ToBytes () |
| Converts the vector into a deterministic byte sequence. | |
| Public Member Functions inherited from SystemEx.IComparableEx< T > | |
| CompareResult | CompareTo (T a) |
| Compares this instance with the specified value and returns a CompareResult describing the relationship between them. | |
Static Public Member Functions | |
| static int | Lenght (Vec3i v) |
| Computes the squared length of the vector. | |
| static int | LenghtSqrt (Vec3i v) |
| Computes the Euclidean length of the vector. | |
| static int | Dot (Vec3i v1, Vec3i v2) |
| Computes the dot product of two vectors. | |
| static int | Angle (Vec3i v1, Vec3i v2) |
| Computes the angle between two vectors. | |
| static Vec3i | InterpolateCoords (Vec3i v1, Vec3i v2, int p) |
| Linearly interpolates between two vectors. | |
| static Vec3i | InterpolateNormal (Vec3i v1, Vec3i v2, int p) |
| Interpolates and normalizes the result. | |
| static bool | NearEqual (Vec3i v1, Vec3i v2, int epsilon) |
| Checks whether two vectors are approximately equal. | |
| static Vec3i | Normalize (Vec3i v, bool ex=false) |
| Normalizes the integer vector by dividing each component by its length. Integer normalization is discrete and does not apply floating‑point stability offsets. | |
| static Vec3i | operator+ (Vec3i a, Vec3i b) |
| Adds two vectors component‑wise. | |
| static Vec3i | operator- (Vec3i a, Vec3i b) |
| Subtracts two vectors component‑wise. | |
| static Vec3i | operator/ (Vec3i a, Vec3i b) |
| Divides two vectors component‑wise. | |
| static Vec3i | operator* (Vec3i a, Vec3i b) |
| Multiplies two vectors component‑wise. | |
| static Vec3i | operator+ (Vec3i a, int b) |
| Adds a scalar to both components of the vector. | |
| static Vec3i | operator- (Vec3i a, int b) |
| Subtracts a scalar from both components of the vector. | |
| static Vec3i | operator/ (Vec3i a, int b) |
| Divides both components of the vector by a scalar. | |
| static Vec3i | operator* (Vec3i a, int b) |
| static Vec3i | operator- (int a, Vec3i b) |
| Subtracts each component of the vector from a scalar. | |
| static Vec3i | operator/ (int a, Vec3i b) |
| static Vec3i | operator* (int a, Vec3i b) |
| Multiplies a scalar with each component of the vector. | |
| static Vec3i | operator+ (int a, Vec3i b) |
| Adds a scalar to each component of the vector. | |
| static bool | operator== (Vec3i a, Vec3i b) |
| Determines whether two vectors are equal component‑wise. | |
| static bool | operator!= (Vec3i a, Vec3i b) |
| Determines whether two vectors differ in any component. | |
| static bool | operator<= (Vec3i a, Vec3i b) |
| Determines whether all components of a are less than or equal to those of b . | |
| static bool | operator>= (Vec3i a, Vec3i b) |
| Determines whether all components of a are greater than or equal to those of b . | |
| static bool | operator< (Vec3i a, Vec3i b) |
| Determines whether all components of a are strictly less than those of b . | |
| static bool | operator> (Vec3i a, Vec3i b) |
| Determines whether all components of a are strictly greater than those of b . | |
| static bool | operator== (int a, Vec3i b) |
| Determines whether a scalar equals both components of the vector. | |
| static bool | operator!= (int a, Vec3i b) |
| Determines whether a scalar differs from any component of the vector. | |
| static bool | operator<= (int a, Vec3i b) |
| Determines whether a scalar is less than or equal to both vector components. | |
| static bool | operator>= (int a, Vec3i b) |
| Determines whether a scalar is greater than or equal to both vector components. | |
| static bool | operator< (int a, Vec3i b) |
| Determines whether a scalar is strictly less than both vector components. | |
| static bool | operator> (int a, Vec3i b) |
| Determines whether a scalar is strictly greater than both vector components. | |
| static bool | operator== (Vec3i a, int b) |
| Determines whether both vector components equal the scalar. | |
| static bool | operator!= (Vec3i a, int b) |
| Determines whether any vector component differs from the scalar. | |
| static bool | operator<= (Vec3i a, int b) |
| Determines whether both vector components are less than or equal to the scalar. | |
| static bool | operator>= (Vec3i a, int b) |
| Determines whether both vector components are greater than or equal to the scalar. | |
| static bool | operator< (Vec3i a, int b) |
| Determines whether both vector components are strictly less than the scalar. | |
| static bool | operator> (Vec3i a, int b) |
| Determines whether both vector components are strictly greater than the scalar. | |
Static Public Attributes | |
| static readonly Vec3i | Zero = new Vec3i(0,0,0) |
| Represents Vector(0,0,0). | |
| static readonly Vec3i | One = new Vec3i(1, 1, 1) |
| Represents Vector(1,1,1). | |
| static readonly Vec3i | NegativeOne = new Vec3i(-1, -1, -1) |
| Represents Vector(-1,-1,-1). | |
| static readonly Vec3i | Min = new Vec3i(int.MinValue, int.MinValue, int.MinValue) |
| Represents Vector(MIN,MIN,MIN). | |
| static readonly Vec3i | Max = new Vec3i(int.MaxValue, int.MaxValue, int.MaxValue) |
| Represents Vector(MAX,MAX,MAX). | |
Properties | |
| int | Count [get] |
| Gets the number of components in this vector (always 3). | |
| int | X [get, set] |
| Gets or sets the X component. | |
| int | Y [get, set] |
| Gets or sets the Y component. | |
| int | Z [get, set] |
| Gets or sets the Z component. | |
| SystemEx.Numeric.Vec3i.Vec3i | ( | ) |
Initializes a zero vector (0,0).
| SystemEx.Numeric.Vec3i.Vec3i | ( | int | _x, |
| int | _y, | ||
| int | _z ) |
Initializes a vector with explicit X and Y values.
| SystemEx.Numeric.Vec3i.Vec3i | ( | int | _f | ) |
Initializes both components with the same value.
| SystemEx.Numeric.Vec3i.Vec3i | ( | Vec3i | vec | ) |
Copy constructor.
| SystemEx.Numeric.Vec3i.Vec3i | ( | int[] | lpvec | ) |
Initializes the vector from a int array.
Computes the angle between two vectors.
| int SystemEx.Numeric.Vec3i.CompareTo | ( | object? | obj | ) |
Compares this vector to another object.
| CompareResult SystemEx.Numeric.Vec3i.CompareTo | ( | Vec3i | a | ) |
Compares two vectors lexicographically.
Computes the dot product of two vectors.
| override bool SystemEx.Numeric.Vec3i.Equals | ( | object? | obj | ) |
Determines whether this instance is equal to another object.
The object is considered equal if it is a Vec3i and compares equal using Equals(Vec3i).
| obj | The object to compare with. |
true if obj is a Vec3i and equal to this instance; otherwise false. | bool SystemEx.Numeric.Vec3i.Equals | ( | Vec3i | other | ) |
Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec3i,Vec3i).
| other | The value to compare with. |
true if the values are equal; otherwise false. | int SystemEx.Numeric.Vec3i.Get | ( | int | index | ) |
Gets a component by index (0 = X, 1 = Y).
| override int SystemEx.Numeric.Vec3i.GetHashCode | ( | ) |
Computes a hash code for this vector.
The primary hash is generated using HashFactory and the HashAlgorithmAttribute applied to this struct.
If hashing fails (rare), a fallback XOR‑based hash is used.
Linearly interpolates between two vectors.
Interpolates and normalizes the result.
|
static |
Computes the squared length of the vector.
|
static |
Computes the Euclidean length of the vector.
Normalizes the integer vector by dividing each component by its length. Integer normalization is discrete and does not apply floating‑point stability offsets.
|
static |
Determines whether a scalar differs from any component of the vector.
|
static |
Determines whether any vector component differs from the scalar.
Determines whether two vectors differ in any component.
Multiplies a scalar with each component of the vector.
Multiplies both components of the vector by a scalar.
Multiplies two vectors component‑wise.
Adds a scalar to each component of the vector.
Adds a scalar to both components of the vector.
Adds two vectors component‑wise.
Subtracts each component of the vector from a scalar.
Subtracts a scalar from both components of the vector.
Subtracts two vectors component‑wise.
Divides a scalar by each component of the vector.
Divides both components of the vector by a scalar.
Divides two vectors component‑wise.
|
static |
Determines whether a scalar is strictly less than both vector components.
|
static |
Determines whether both vector components are strictly less than the scalar.
Determines whether all components of a are strictly less than those of b .
|
static |
Determines whether a scalar is less than or equal to both vector components.
|
static |
Determines whether both vector components are less than or equal to the scalar.
Determines whether all components of a are less than or equal to those of b .
|
static |
Determines whether a scalar equals both components of the vector.
|
static |
Determines whether both vector components equal the scalar.
Determines whether two vectors are equal component‑wise.
|
static |
Determines whether a scalar is strictly greater than both vector components.
|
static |
Determines whether both vector components are strictly greater than the scalar.
Determines whether all components of a are strictly greater than those of b .
|
static |
Determines whether a scalar is greater than or equal to both vector components.
|
static |
Determines whether both vector components are greater than or equal to the scalar.
Determines whether all components of a are greater than or equal to those of b .
| FixedVector< byte > SystemEx.Numeric.Vec3i.ToBytes | ( | ) |
Converts the vector into a deterministic byte sequence.
This method is used by HashFactory to compute attribute‑driven hashes. The byte layout is stable and platform‑safe, ensuring consistent hashing across devices and backends.
Implements SystemEx.Hash.IHashable< T >.
|
static |
Represents Vector(MAX,MAX,MAX).
|
static |
Represents Vector(MIN,MIN,MIN).
Represents Vector(-1,-1,-1).
|
get |
Gets the number of components in this vector (always 3).
|
getset |
Gets or sets the X component.
|
getset |
Gets or sets the Y component.
|
getset |
Gets or sets the Z component.