Click or drag to resize

Vector3 Structure

Defines a three 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 Vector3 : IEquatable<Vector3>

The Vector3 type exposes the following members.

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

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(Vector3, Vector3, Double)
Linear interpolation between two Vector3s

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(Vector3, Vector3, Single)
Linear interpolation between two Vector3s

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(Vector3)
Vector3 maximization - combination of the largest components
Public methodStatic memberMaximize(Vector3, Vector3)
Vector3 maximization - combination of the largest components
Public methodMinimize(Vector3)
Vector3 minimization - combination of the smallest components
Public methodStatic memberMinimize(Vector3, Vector3)
Vector3 minimization - combination of the smallest components
Public methodMultiply(Double)
Scale the X, Y and Z components of Vector3
Public methodMultiply(Single)
Scale the X, Y and Z components of Vector3
Public methodMultiply(Vector3)
Scale the X, Y, and Z components of Vector3.
Public methodStatic memberMultiply(Vector3, Vector3)
Scale the X, Y, and Z components of Vector3 .
Public methodStatic memberMultiply(Vector3, Double)
Scale the X, Y and Z components of Vector3
Public methodStatic memberMultiply(Vector3, Single)
Scale the X, Y and Z components of Vector3
Public methodStatic memberMultiplyAdd
Combined multiplication and addition
Public methodNegate
Vector3 in-place negation.
Public methodNormalize
Vector3 normalization - make its length be 1
Public methodStatic memberNormalize(Vector3)
Vector3 normalization - make its length be 1
Public methodScalarTriple(Vector3, Vector3)
Scalar triple product of three Vector3s
Public methodStatic memberScalarTriple(Vector3, Vector3, Vector3)
Scalar triple product of three Vector3s
Public methodScale(Double)
Scale the X, Y, and Z components of Vector3
Public methodScale(Single)
Scale the X, Y, and Z components of Vector3
Public methodScale(Vector3)
Scale the X, Y, and Z components of Vector3.
Public methodStatic memberScale(Vector3, Vector3)
Scale the X, Y, and Z components of Vector3 .
Public methodStatic memberScale(Vector3, Double)
Scale the X, Y, and Z components of Vector3
Public methodStatic memberScale(Vector3, Single)
Scale the X, Y, and Z components of Vector3
Public methodSubtract(Vector3)
Vector3 subtraction
Public methodStatic memberSubtract(Vector3, Vector3)
Vector3 subtraction
Public methodToString
Returns a string that represents the current Vector3.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform
Transforms a Vector3 by the given Matrix
Public methodTransformCoordinate(Matrix)
Transform this Vector3 coordinate by Matrix
Public methodStatic memberTransformCoordinate(Vector3, Matrix)
Transform Vector3 coordinate by Matrix
Public methodTransformNormal(Matrix)
Transform this Vector3 normal by Matrix
Public methodTransformNormal(Quaternion)
Transform this Vector3 normal by Quaternion
Public methodStatic memberTransformNormal(Vector3, Matrix)
Transform Vector3 normal by Matrix
Public methodStatic memberTransformNormal(Vector3, Quaternion)
Transform Vector3 normal by Quaternion
Public methodVectorTriple(Vector3, Vector3)
Vector triple product of three Vector3s
Public methodStatic memberVectorTriple(Vector3, Vector3, Vector3)
Vector triple product of three Vector3s
Top
Operators
  NameDescription
Public operatorStatic memberAddition
Vector3 addition
Public operatorStatic memberEquality
Vector3 exact equality - see EQ(Vector3, Vector3) for alternative
Public operatorStatic memberInequality
Vector3 exact inequality - see EQ(Vector3, Vector3) for alternative
Public operatorStatic memberMultiply(Double, Vector3)
Scale the X, Y and Z components of Vector3
Public operatorStatic memberMultiply(Single, Vector3)
Scale the X, Y and Z components of Vector3
Public operatorStatic memberMultiply(Vector3, Double)
Scale the X, Y and Z components of Vector3
Public operatorStatic memberMultiply(Vector3, Single)
Scale the X, Y and Z components of Vector3
Public operatorStatic memberSubtraction
Vector3 subtraction
Public operatorStatic memberUnaryNegation
Vector3 unary negation
Top
Fields
  NameDescription
Public fieldStatic memberEmpty
A Vector3 with all of its components set to zero.
Public fieldStatic memberMaxValue
A Vector3 with the maximum value
Public fieldStatic memberMinValue
A Vector3 with the minimum value
Public fieldStatic memberOne
A Vector3 with all of its components set to one.
Public fieldStatic memberOrigin
A Vector3 with all of its components set to zero.
Public fieldStatic memberXAxis
A Vector3 representing the unit X-Axis
Public fieldStatic memberYAxis
A Vector3 representing the unit Y-Axis
Public fieldStatic memberZAxis
A Vector3 representing the unit Z-Axis
Public fieldStatic memberZero
A Vector3 with all of its components set to zero.
Top
See Also