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