![]() |
SystemEX
Lacking
Additional generic collection types missing in .net
|
Public Member Functions | |
| Vec4f () | |
| Initializes a zero vector (0,0). | |
| Vec4f (float _x, float _y, float _z, float _w) | |
| Initializes a vector with explicit X Y Z W values. | |
| Vec4f (float _f) | |
| Initializes both components with the same value. | |
| Vec4f (Vec4f vec) | |
| Copy constructor. | |
| Vec4f (float[] lpvec) | |
| Initializes the vector from a float array. | |
| float | 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 (Vec4f a) |
| Compares two vectors lexicographically. | |
| bool | Equals (Vec4f other) |
| Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec4f,Vec4f). | |
| override bool | Equals (object? obj) |
| Determines whether this instance is equal to another object. | |
| int IComparable< Vec4f >. | CompareTo (Vec4f 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 float | Lenght (Vec4f v) |
| Computes the squared length of the vector. | |
| static float | LenghtSqrt (Vec4f v) |
| Computes the Euclidean length of the vector. | |
| static float | Dot (Vec4f v1, Vec4f v2) |
| Computes the dot product of two vectors. | |
| static float | Angle (Vec4f v1, Vec4f v2) |
| Computes the angle between two vectors. | |
| static Vec4f | InterpolateCoords (Vec4f v1, Vec4f v2, float p) |
| Linearly interpolates between two vectors. | |
| static Vec4f | InterpolateNormal (Vec4f v1, Vec4f v2, float p) |
| Interpolates and normalizes the result. | |
| static bool | NearEqual (Vec4f v1, Vec4f v2, float epsilon) |
| Checks whether two vectors are approximately equal. | |
| static Vec4f | Normalize (Vec4f v, bool ex=false) |
| Normalizes the vector. | |
| static Vec4f | operator+ (Vec4f a, Vec4f b) |
| Adds two vectors component‑wise. | |
| static Vec4f | operator- (Vec4f a, Vec4f b) |
| Subtracts two vectors component‑wise. | |
| static Vec4f | operator/ (Vec4f a, Vec4f b) |
| Divides two vectors component‑wise. | |
| static Vec4f | operator* (Vec4f a, Vec4f b) |
| Multiplies two vectors component‑wise. | |
| static Vec4f | operator+ (Vec4f a, float b) |
| Adds a scalar to both components of the vector. | |
| static Vec4f | operator- (Vec4f a, float b) |
| Subtracts a scalar from both components of the vector. | |
| static Vec4f | operator/ (Vec4f a, float b) |
| Divides both components of the vector by a scalar. | |
| static Vec4f | operator* (Vec4f a, float b) |
| static Vec4f | operator- (float a, Vec4f b) |
| Subtracts each component of the vector from a scalar. | |
| static Vec4f | operator/ (float a, Vec4f b) |
| static Vec4f | operator* (float a, Vec4f b) |
| Multiplies a scalar with each component of the vector. | |
| static Vec4f | operator+ (float a, Vec4f b) |
| Adds a scalar to each component of the vector. | |
| static bool | operator== (Vec4f a, Vec4f b) |
| Determines whether two vectors are equal component‑wise. | |
| static bool | operator!= (Vec4f a, Vec4f b) |
| Determines whether two vectors differ in any component. | |
| static bool | operator<= (Vec4f a, Vec4f b) |
| Determines whether all components of a are less than or equal to those of b . | |
| static bool | operator>= (Vec4f a, Vec4f b) |
| Determines whether all components of a are greater than or equal to those of b . | |
| static bool | operator< (Vec4f a, Vec4f b) |
| Determines whether all components of a are strictly less than those of b . | |
| static bool | operator> (Vec4f a, Vec4f b) |
| Determines whether all components of a are strictly greater than those of b . | |
| static bool | operator== (float a, Vec4f b) |
| Determines whether a scalar equals both components of the vector. | |
| static bool | operator!= (float a, Vec4f b) |
| Determines whether a scalar differs from any component of the vector. | |
| static bool | operator<= (float a, Vec4f b) |
| Determines whether a scalar is less than or equal to both vector components. | |
| static bool | operator>= (float a, Vec4f b) |
| Determines whether a scalar is greater than or equal to both vector components. | |
| static bool | operator< (float a, Vec4f b) |
| Determines whether a scalar is strictly less than both vector components. | |
| static bool | operator> (float a, Vec4f b) |
| Determines whether a scalar is strictly greater than both vector components. | |
| static bool | operator== (Vec4f a, float b) |
| Determines whether both vector components equal the scalar. | |
| static bool | operator!= (Vec4f a, float b) |
| Determines whether any vector component differs from the scalar. | |
| static bool | operator<= (Vec4f a, float b) |
| Determines whether both vector components are less than or equal to the scalar. | |
| static bool | operator>= (Vec4f a, float b) |
| Determines whether both vector components are greater than or equal to the scalar. | |
| static bool | operator< (Vec4f a, float b) |
| Determines whether both vector components are strictly less than the scalar. | |
| static bool | operator> (Vec4f a, float b) |
| Determines whether both vector components are strictly greater than the scalar. | |
Static Public Attributes | |
| static readonly Vec4f | Zero = new Vec4f(0) |
| Represents Vector(0). | |
| static readonly Vec4f | One = new Vec4f(1f) |
| Represents Vector(1). | |
| static readonly Vec4f | NegativeOne = new Vec4f(-1f) |
| Represents Vector(-1). | |
| static readonly Vec4f | Min = new Vec4f(float.MinValue) |
| Represents Vector(MIN). | |
| static readonly Vec4f | Max = new Vec4f(float.MaxValue) |
| Represents Vector(MAX). | |
Properties | |
| int | Count [get] |
| Gets the number of components in this vector (always 4). | |
| float | X [get, set] |
| Gets or sets the X component. | |
| float | Y [get, set] |
| Gets or sets the Y component. | |
| float | Z [get, set] |
| Gets or sets the Z component. | |
| float | W [get, set] |
| Gets or sets the W component. | |
| SystemEx.Numeric.Vec4f.Vec4f | ( | ) |
Initializes a zero vector (0,0).
| SystemEx.Numeric.Vec4f.Vec4f | ( | float | _x, |
| float | _y, | ||
| float | _z, | ||
| float | _w ) |
Initializes a vector with explicit X Y Z W values.
| SystemEx.Numeric.Vec4f.Vec4f | ( | float | _f | ) |
Initializes both components with the same value.
| SystemEx.Numeric.Vec4f.Vec4f | ( | Vec4f | vec | ) |
Copy constructor.
| SystemEx.Numeric.Vec4f.Vec4f | ( | float[] | lpvec | ) |
Initializes the vector from a float array.
Computes the angle between two vectors.
| int SystemEx.Numeric.Vec4f.CompareTo | ( | object? | obj | ) |
Compares this vector to another object.
| CompareResult SystemEx.Numeric.Vec4f.CompareTo | ( | Vec4f | a | ) |
Compares two vectors lexicographically.
Computes the dot product of two vectors.
| override bool SystemEx.Numeric.Vec4f.Equals | ( | object? | obj | ) |
Determines whether this instance is equal to another object.
The object is considered equal if it is a Vec4f and compares equal using Equals(Vec4f).
| obj | The object to compare with. |
true if obj is a Vec4f and equal to this instance; otherwise false. | bool SystemEx.Numeric.Vec4f.Equals | ( | Vec4f | other | ) |
Determines whether this instance is equal to another Half16 value, using the same semantics as the operator ==(Vec4f,Vec4f).
| other | The value to compare with. |
true if the values are equal; otherwise false. | float SystemEx.Numeric.Vec4f.Get | ( | int | index | ) |
Gets a component by index (0 = X, 1 = Y).
| override int SystemEx.Numeric.Vec4f.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 vector.
|
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.Vec4f.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 >.
Represents Vector(MAX).
Represents Vector(MIN).
|
get |
Gets the number of components in this vector (always 4).
|
getset |
Gets or sets the W component.
|
getset |
Gets or sets the X component.
|
getset |
Gets or sets the Y component.
|
getset |
Gets or sets the Z component.