• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Vim.Math3d
    • AABox
    • AABox2D
    • AABox4D
    • AngularMotion
    • AxisAngle
    • Byte2
    • Byte3
    • Byte4
    • ColorHDR
    • ColorRGB
    • ColorRGBA
    • Complex
    • Constants
    • ContainmentType
    • CylindricalCoordinate
    • DAABox
    • DAABox2D
    • DAABox4D
    • DInterval
    • DPlane
    • DQuaternion
    • DRay
    • DSphere
    • DVector2
    • DVector3
    • DVector4
    • Euler
    • GeoCoordinate
    • Hash
    • HorizontalCoordinate
    • IMappable<TContainer, TPart>
    • Int2
    • Int3
    • Int4
    • Interval
    • IPoints
    • IPoints2D
    • ITransformable3D<TSelf>
    • Line
    • Line2D
    • LinearMotion
    • LinqUtil
    • LogPolarCoordinate
    • MathOps
    • Matrix4x4
    • Motion
    • MovementExtensions
    • Plane
    • PlaneIntersectionType
    • PolarCoordinate
    • Quad
    • Quad2D
    • Quaternion
    • Ray
    • Sphere
    • SphericalCoordinate
    • StatelessRandom
    • Stats<T>
    • Transform
    • Transformable3D
    • Triangle
    • Triangle2D
    • Vector2
    • Vector3
    • Vector4

Struct Vector4

Implements
System.IEquatable<Vector4>
System.IComparable<Vector4>
ITransformable3D<Vector4>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Vim.Math3d
Assembly: Vim.Math3D.dll
[DataContract]
public readonly struct Vector4 : IEquatable<Vector4>, IComparable<Vector4>, ITransformable3D<Vector4>

Constructors

View Source

Vector4(Single)

public Vector4(float value)
View Source

Vector4(Single, Single, Single, Single)

public Vector4(float x, float y, float z, float w)
View Source

Vector4((Single x, Single y, Single z, Single w))

public Vector4((float x, float y, float z, float w) tuple)
View Source

Vector4(Vector2, Single, Single)

public Vector4(Vector2 v, float z, float w)
View Source

Vector4(Vector3, Single)

public Vector4(Vector3 v, float w)

Fields

View Source

MaxValue

public static Vector4 MaxValue
View Source

MinValue

public static Vector4 MinValue
View Source

NumComponents

public const int NumComponents = 4
View Source

One

public static Vector4 One
View Source

UnitW

public static Vector4 UnitW
View Source

UnitX

public static Vector4 UnitX
View Source

UnitY

public static Vector4 UnitY
View Source

UnitZ

public static Vector4 UnitZ
View Source

W

[DataMember]
public readonly float W
View Source

X

[DataMember]
public readonly float X
View Source

Y

[DataMember]
public readonly float Y
View Source

Z

[DataMember]
public readonly float Z
View Source

Zero

public static Vector4 Zero

Properties

View Source

XY

public readonly Vector2 XY { get; }
View Source

XYZ

public readonly Vector3 XYZ { get; }

Methods

View Source

AlmostEquals(Vector4, Single)

public readonly bool AlmostEquals(Vector4 x, float tolerance = 1E-07F)
View Source

AlmostZero(Single)

public readonly bool AlmostZero(float tolerance = 1E-07F)
View Source

AnyComponentNegative()

public readonly bool AnyComponentNegative()
View Source

CompareTo(Vector4)

public readonly int CompareTo(Vector4 x)
View Source

Create(Single, Single, Single, Single)

public static Vector4 Create(float x, float y, float z, float w)
View Source

Create((Single x, Single y, Single z, Single w))

public static Vector4 Create((float x, float y, float z, float w) tuple)
View Source

Deconstruct(out Single, out Single, out Single, out Single)

public readonly void Deconstruct(out float x, out float y, out float z, out float w)
View Source

Dot(Vector4)

public readonly float Dot(Vector4 value)
View Source

Dot(Vector4, Vector4)

public static float Dot(Vector4 value1, Vector4 value2)
View Source

Equals(Object)

public override readonly bool Equals(object obj)
Overrides
System.ValueType.Equals(System.Object)
View Source

Equals(Vector4)

public readonly bool Equals(Vector4 x)
View Source

GetComponent(Int32)

public readonly float GetComponent(int n)
View Source

GetHashCode()

public override readonly int GetHashCode()
Overrides
System.ValueType.GetHashCode()
View Source

IsInfinity()

public readonly bool IsInfinity()
View Source

IsNaN()

public readonly bool IsNaN()
View Source

Magnitude()

public readonly double Magnitude()
View Source

MagnitudeSquared()

public readonly double MagnitudeSquared()
View Source

MaxComponent()

public readonly float MaxComponent()
View Source

MinComponent()

public readonly float MinComponent()
View Source

ProductComponents()

public readonly float ProductComponents()
View Source

SetW(Single)

public readonly Vector4 SetW(float x)
View Source

SetX(Single)

public readonly Vector4 SetX(float x)
View Source

SetY(Single)

public readonly Vector4 SetY(float x)
View Source

SetZ(Single)

public readonly Vector4 SetZ(float x)
View Source

SumComponents()

public readonly float SumComponents()
View Source

SumSqrComponents()

public readonly float SumSqrComponents()
View Source

ToString()

public override readonly string ToString()
Overrides
System.ValueType.ToString()
View Source

Transform(Matrix4x4)

Transforms a vector by the given matrix.

public readonly Vector4 Transform(Matrix4x4 matrix)

Operators

View Source

Addition(Single, Vector4)

public static Vector4 operator +(float value1, Vector4 value2)
View Source

Addition(Vector4, Single)

public static Vector4 operator +(Vector4 value1, float value2)
View Source

Addition(Vector4, Vector4)

public static Vector4 operator +(Vector4 value1, Vector4 value2)
View Source

Division(Single, Vector4)

public static Vector4 operator /(float value1, Vector4 value2)
View Source

Division(Vector4, Single)

public static Vector4 operator /(Vector4 value1, float value2)
View Source

Division(Vector4, Vector4)

public static Vector4 operator /(Vector4 value1, Vector4 value2)
View Source

Equality(Vector4, Vector4)

public static bool operator ==(Vector4 x0, Vector4 x1)
View Source

GreaterThan(Vector4, Vector4)

public static bool operator>(Vector4 x0, Vector4 x1)
View Source

GreaterThanOrEqual(Vector4, Vector4)

public static bool operator >=(Vector4 x0, Vector4 x1)
View Source

Implicit((Single x, Single y, Single z, Single w) to Vector4)

public static implicit operator Vector4((float x, float y, float z, float w) tuple)
View Source

Implicit(Vector4 to (Single x, Single y, Single z, Single w))

public static implicit operator (float x, float y, float z, float w)(Vector4 self)
View Source

Inequality(Vector4, Vector4)

public static bool operator !=(Vector4 x0, Vector4 x1)
View Source

LessThan(Vector4, Vector4)

public static bool operator <(Vector4 x0, Vector4 x1)
View Source

LessThanOrEqual(Vector4, Vector4)

public static bool operator <=(Vector4 x0, Vector4 x1)
View Source

Multiply(Single, Vector4)

public static Vector4 operator *(float value1, Vector4 value2)
View Source

Multiply(Vector4, Single)

public static Vector4 operator *(Vector4 value1, float value2)
View Source

Multiply(Vector4, Vector4)

public static Vector4 operator *(Vector4 value1, Vector4 value2)
View Source

Subtraction(Single, Vector4)

public static Vector4 operator -(float value1, Vector4 value2)
View Source

Subtraction(Vector4, Single)

public static Vector4 operator -(Vector4 value1, float value2)
View Source

Subtraction(Vector4, Vector4)

public static Vector4 operator -(Vector4 value1, Vector4 value2)
View Source

UnaryNegation(Vector4)

public static Vector4 operator -(Vector4 value)

Implements

System.IEquatable<T>
System.IComparable<T>
ITransformable3D<TSelf>

Extension Methods

Transformable3D.Transform<T>(ITransformable3D<T>, Matrix4x4[])
Transformable3D.Translate<T>(ITransformable3D<T>, Vector3)
Transformable3D.Translate<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.Rotate<T>(ITransformable3D<T>, Quaternion)
Transformable3D.Scale<T>(ITransformable3D<T>, Single)
Transformable3D.Scale<T>(ITransformable3D<T>, Vector3)
Transformable3D.Scale<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.ScaleX<T>(ITransformable3D<T>, Single)
Transformable3D.ScaleY<T>(ITransformable3D<T>, Single)
Transformable3D.ScaleZ<T>(ITransformable3D<T>, Single)
Transformable3D.LookAt<T>(ITransformable3D<T>, Vector3, Vector3, Vector3)
Transformable3D.RotateAround<T>(ITransformable3D<T>, Vector3, Single)
Transformable3D.Rotate<T>(ITransformable3D<T>, Single, Single, Single)
Transformable3D.Reflect<T>(ITransformable3D<T>, Plane)
Transformable3D.RotateX<T>(ITransformable3D<T>, Single)
Transformable3D.RotateY<T>(ITransformable3D<T>, Single)
Transformable3D.RotateZ<T>(ITransformable3D<T>, Single)
Transformable3D.TranslateRotateScale<T>(ITransformable3D<T>, Vector3, Quaternion, Vector3)
MathOps.Add(Vector4, Vector4)
MathOps.Subtract(Vector4, Vector4)
MathOps.Multiply(Vector4, Vector4)
MathOps.Divide(Vector4, Vector4)
MathOps.Negate(Vector4)
MathOps.Lerp(Vector4, Vector4, Single)
MathOps.InverseLerp(Vector4, Vector4, Vector4)
MathOps.LerpPrecise(Vector4, Vector4, Single)
MathOps.ClampLower(Vector4, Vector4)
MathOps.ClampUpper(Vector4, Vector4)
MathOps.Clamp(Vector4, Vector4, Vector4)
MathOps.Average(Vector4, Vector4)
MathOps.Barycentric(Vector4, Vector4, Vector4, Single, Single)
MathOps.DistanceSquared(Vector4, Vector4)
MathOps.Distance(Vector4, Vector4)
MathOps.LengthSquared(Vector4)
MathOps.Length(Vector4)
MathOps.Normalize(Vector4)
MathOps.SafeNormalize(Vector4)
MathOps.Dot(Vector4, Vector4)
MathOps.Min(Vector4, Vector4)
MathOps.Max(Vector4, Vector4)
MathOps.SquareRoot(Vector4)
MathOps.Abs(Vector4)
MathOps.Acos(Vector4)
MathOps.Asin(Vector4)
MathOps.Atan(Vector4)
MathOps.Cos(Vector4)
MathOps.Cosh(Vector4)
MathOps.Exp(Vector4)
MathOps.Log(Vector4)
MathOps.Log10(Vector4)
MathOps.Sin(Vector4)
MathOps.Sinh(Vector4)
MathOps.Sqrt(Vector4)
MathOps.Tan(Vector4)
MathOps.Tanh(Vector4)
MathOps.Inverse(Vector4)
MathOps.Ceiling(Vector4)
MathOps.Floor(Vector4)
MathOps.Round(Vector4)
MathOps.Truncate(Vector4)
MathOps.Sqr(Vector4)
MathOps.Cube(Vector4)
MathOps.ToRadians(Vector4)
MathOps.ToDegrees(Vector4)
MathOps.Transform(Vector4, Matrix4x4)
MathOps.Transform(Vector4, Quaternion)
MathOps.ToVector2(Vector4)
MathOps.ToVector3(Vector4)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright VIM 2021, Generated by DocFX