Click or drag to resize

Vector4 Structure

Defines a four component vector.

A default constructed one is Zero.

Namespace:  Microsoft.DirectX
Assembly:  Demo3D.Common (in Demo3D.Common.dll) Version: 15.0.2.11458
Syntax
C#
[SerializableAttribute]
public struct Vector4 : IEquatable<Vector4>

The Vector4 type exposes the following members.

Constructors
  NameDescription
Public methodVector4(Vector3)
Initializes a new instance of the Vector4 struct.
Public methodVector4(Vector4)
Initializes a new instance of the Vector4 class.
Public methodVector4(Vector3, Double)
Initializes a new instance of the Vector4 struct.
Public methodVector4(Double, Double, Double, Double)
Initializes a new instance of the Vector4 struct.
Public methodVector4(Single, Single, Single, Single)
Initializes a new instance of the Vector4 struct.
Top
Properties
  NameDescription
Public propertyNormalized
Vector4 normalization - make its length be 1
Public propertyW
Gets or sets the W component of the Vector4 as a Single.
Public propertyWD
Gets or sets the W component of the Vector4 as a Double.
Public propertyX
Gets or sets the X component of the Vector4 as a Single.
Public propertyXD
Gets or sets the X component of the Vector4 as a Double.
Public propertyY
Gets or sets the Y component of the Vector4 as a Single.
Public propertyYD
Gets or sets the Y component of the Vector4 as a Double.
Public propertyZ
Gets or sets the Z component of the Vector4 as a Single.
Public propertyZD
Gets or sets the Z component of the Vector4 as a Double.
Top
Methods
  NameDescription
Public methodAdd(Vector4)
Vector4 addition
Public methodStatic memberAdd(Vector4, Vector4)
Vector4 addition
Public methodDot(Vector4)
Dot product of two Vector4s
Public methodStatic memberDot(Vector4, Vector4)
Dot product of two Vector4s
Public methodDotD(Vector4)
Dot product of two Vector4s
Public methodStatic memberDotD(Vector4, Vector4)
Dot product of two Vector4s
Public methodEquals(Object)
Vector4 exact equality - see EQ(Vector4, Vector4) for alternative
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector4)
Vector4 exact equality - see EQ(Vector4, Vector4) for alternative
Public methodGetHashCode
Returns the hash code for the current Vector4.
(Overrides ValueTypeGetHashCode.)
Public methodLength
Length of Vector4
Public methodStatic memberLength(Vector4)
Length of Vector4
Public methodLengthD
Length of Vector4
Public methodStatic memberLengthD(Vector4)
Length of Vector4
Public methodLengthSq
Length squared of Vector4
Public methodStatic memberLengthSq(Vector4)
Length squared of Vector4
Public methodLengthSqD
Length squared of Vector4
Public methodStatic memberLengthSqD(Vector4)
Length squared of Vector4
Public methodLerp(Vector4, Double)
Linear interpolation between this Vector4 and another Vector4

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns this. When t = 1 returns b. When t = 0.5 returns the point midway between this and b.

Public methodStatic memberLerp(Vector4, Vector4, Double)
Linear interpolation between two Vector4s

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

Public methodStatic memberLerp(Vector4, Vector4, Single)
Linear interpolation between two Vector4s

This is most commonly used to find a point some fraction of the way along a line between two endpoints When t = 0 returns a. When t = 1 returns b. When t = 0.5 returns the point midway between a and b.

Public methodMaximize(Vector4)
Vector4 maximization - combination of the largest components
Public methodStatic memberMaximize(Vector4, Vector4)
Vector4 maximization - combination of the largest components
Public methodMinimize(Vector4)
Vector4 minimization - combination of the smallest components
Public methodStatic memberMinimize(Vector4, Vector4)
Vector4 minimization - combination of the smallest components
Public methodMultiply(Double)
Scale the X, Y, Z and W components of Vector4
Public methodMultiply(Single)
Scale the X, Y, Z and W components of Vector4
Public methodMultiply(Vector4)
Scale the X, Y, Z and W components of Vector4.
Public methodStatic memberMultiply(Vector4, Vector4)
Scale the X, Y, and Z components of Vector4 .
Public methodStatic memberMultiply(Vector4, Double)
Scale the X, Y, Z and W components of Vector4
Public methodStatic memberMultiply(Vector4, Single)
Scale the X, Y, Z and W components of Vector4
Public methodStatic memberMultiplyAdd
Combined multiplication and addition
Public methodNegate
Vector4 in-place negation.
Public methodNormalize
Vector4 normalization - make its length be 1
Public methodStatic memberNormalize(Vector4)
Vector4 normalization - make its length be 1
Public methodScale(Double)
Scale the X, Y, Z and W components of Vector4
Public methodScale(Single)
Scale the X, Y, Z and W components of Vector4
Public methodScale(Vector4)
Scale the X, Y, Z and W components of Vector4.
Public methodStatic memberScale(Vector4, Vector4)
Scale the X, Y, Z and W components of Vector4 .
Public methodStatic memberScale(Vector4, Double)
Scale the X, Y, Z and W components of Vector4
Public methodStatic memberScale(Vector4, Single)
Scale the X, Y, Z and W components of Vector4
Public methodSubtract(Vector4)
Vector4 subtraction
Public methodStatic memberSubtract(Vector4, Vector4)
Vector4 subtraction
Public methodToString
Returns a string that represents the current Vector4.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform
Transforms a Vector4 by the given Matrix
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Vector4 addition
Public operatorStatic memberEquality
Vector4 exact equality - see EQ(Vector4, Vector4) for alternative
Public operatorStatic memberInequality
Vector4 exact inequality - see EQ(Vector4, Vector4) for alternative
Public operatorStatic memberMultiply(Double, Vector4)
Scale the X, Y, Z and W components of Vector4
Public operatorStatic memberMultiply(Single, Vector4)
Scale the X, Y, Z and W components of Vector4
Public operatorStatic memberMultiply(Vector4, Double)
Scale the X, Y, Z and W components of Vector4
Public operatorStatic memberMultiply(Vector4, Single)
Scale the X, Y, Z and W components of Vector4
Public operatorStatic memberSubtraction
Vector4 subtraction
Public operatorStatic memberUnaryNegation
Vector4 unary negation
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
A Vector4 with all of its components set to zero.
Public fieldStatic memberMaxValue
A Vector4 with the maximum value
Public fieldStatic memberMinValue
A Vector4 with the minimum value
Public fieldStatic memberOne
A Vector4 with all of its components set to one.
Public fieldStatic memberOrigin
A Vector4 with all of its components set to zero.
Public fieldStatic memberWAxis
A Vector4 representing the unit W-Axis
Public fieldStatic memberXAxis
A Vector4 representing the unit X-Axis
Public fieldStatic memberYAxis
A Vector4 representing the unit Y-Axis
Public fieldStatic memberZAxis
A Vector4 representing the unit Z-Axis
Public fieldStatic memberZero
A Vector4 with all of its components set to zero.
Top
See Also