Struct Vector3F
An immutable single-precision 3-D vector used for positions and link lengths
in body-segment kinematics.
Assembly: MOSAIC.dll
Syntax
public readonly struct Vector3F : IEquatable<Vector3F>
Remarks
Constructors
Vector3F(float, float, float)
Initialises a new 3-D vector with the specified components.
Declaration
public Vector3F(float x, float y, float z)
Parameters
Fields
Zero
The zero vector (0, 0, 0).
Declaration
public static readonly Vector3F Zero
Field Value
Properties
this[int]
Indexer: 0 → X, 1 → Y, 2 → Z.
Declaration
public float this[int index] { get; }
Parameters
| Type |
Name |
Description |
| int |
index |
|
Property Value
Exceptions
X
Declaration
Property Value
Y
Declaration
Property Value
Z
Declaration
Property Value
Methods
Cross(Vector3F, Vector3F)
Cross product of two vectors.
Declaration
public static Vector3F Cross(Vector3F a, Vector3F b)
Parameters
Returns
Dot(Vector3F, Vector3F)
Dot product of two vectors.
Declaration
public static float Dot(Vector3F a, Vector3F b)
Parameters
Returns
Equals(Vector3F)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(Vector3F other)
Parameters
| Type |
Name |
Description |
| Vector3F |
other |
An object to compare with this object.
|
Returns
| Type |
Description |
| bool |
true if the current object is equal to the other parameter; otherwise, false.
|
Equals(object?)
Indicates whether this instance and a specified object are equal.
Declaration
public override bool Equals(object? obj)
Parameters
| Type |
Name |
Description |
| object |
obj |
The object to compare with the current instance.
|
Returns
| Type |
Description |
| bool |
true if obj and this instance are the same type and represent the same value; otherwise, false.
|
Overrides
GetHashCode()
Returns the hash code for this instance.
Declaration
public override int GetHashCode()
Returns
| Type |
Description |
| int |
A 32-bit signed integer that is the hash code for this instance.
|
Overrides
Magnitude()
Returns the Euclidean length (L2 norm).
Declaration
Returns
Normalized()
Returns a unit-length vector in the same direction.
Declaration
public Vector3F Normalized()
Returns
ToString()
Returns the fully qualified type name of this instance.
Declaration
public override string ToString()
Returns
| Type |
Description |
| string |
The fully qualified type name.
|
Overrides
Operators
operator +(Vector3F, Vector3F)
Declaration
public static Vector3F operator +(Vector3F a, Vector3F b)
Parameters
Returns
operator /(Vector3F, float)
Declaration
public static Vector3F operator /(Vector3F v, float s)
Parameters
Returns
operator ==(Vector3F, Vector3F)
Declaration
public static bool operator ==(Vector3F a, Vector3F b)
Parameters
Returns
operator !=(Vector3F, Vector3F)
Declaration
public static bool operator !=(Vector3F a, Vector3F b)
Parameters
Returns
operator *(Vector3F, float)
Declaration
public static Vector3F operator *(Vector3F v, float s)
Parameters
Returns
operator *(float, Vector3F)
Scalar multiplication (scalar on the left).
Declaration
public static Vector3F operator *(float s, Vector3F v)
Parameters
Returns
operator -(Vector3F, Vector3F)
Component-wise subtraction.
Declaration
public static Vector3F operator -(Vector3F a, Vector3F b)
Parameters
Returns
operator -(Vector3F)
Declaration
public static Vector3F operator -(Vector3F v)
Parameters
Returns
Implements