The Vector3D type exposes the following members.

Constructors

  NameDescription
Public methodVector3D(Double)
Makes a 3d-vector from 1 value, all vector components are set to the input value
Public methodVector3D(Vector2D)
Makes a 3d-vector copy from a 2d-vector, z is set to 0
Public methodVector3D(Vector3D)
Copies a 3d-vecor
Public methodVector3D(Vector2D, Double)
Makes a 3d-vector copy from a 2d-vector and z component
Public methodVector3D(Double, Double, Double)
Makes a 3d-vector from 3 values

Methods

  NameDescription
Public methodCrossRH
performs a righ handed 3d cross product code is: x = v1.y * v2.z - v2.y * v1.z; y = v1.z * v2.x - v2.z * v1.x; z = v1.x * v2.y - v2.x * v1.y;
Public methodEquals(Object) (Overrides ValueType..::..Equals(Object).)
Public methodEquals(Vector3D)
Protected methodFinalize
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode (Overrides ValueType..::..GetHashCode()()()().)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns the fully qualified type name of this instance.
(Inherited from ValueType.)

Operators

  NameDescription
Public operatorStatic memberAddition(Double, Vector3D)
value + vector, adds a value to all vector components
Public operatorStatic memberAddition(Vector3D, Double)
vector + value, adds a value to all vector components
Public operatorStatic memberAddition(Vector3D, Vector3D)
vector + vector, adds the values of two vectors component wise
Public operatorStatic memberBitwiseAnd
3d-vector & 3d-vector, performs a left handed 3d cross product code is: x = v1.y * v2.z - v1.z * v2.y y = v1.z * v2.x - v1.x * v2.y z = v1.x * v2.y - v1.y * v2.x
Public operatorStatic memberBitwiseOr
vector | vector, dot product for vectors, that is the sum of all component wise products
Public operatorStatic memberDivision(Double, Vector3D)
value / vector, divides a value by all vector components
Public operatorStatic memberDivision(Vector3D, Double)
vector / value, divides all vector components by a value
Public operatorStatic memberDivision(Vector3D, Vector3D)
vector / vector, divides the values of two vectors component wise
Public operatorStatic memberEquality
vector == vector, checks if the two vectors are equal
Public operatorStatic memberGreaterThan
vector > value, compares all vector components to a value
Public operatorStatic memberGreaterThanOrEqual
vector >= value, compares all vector components to a value
Public operatorStatic memberInequality
vector != vector, checks if the two vectors are not equal
Public operatorStatic memberLessThan
vector < value, compares all vector components to a value
Public operatorStatic memberLessThanOrEqual
vector <= value, compares all vector components to a value
Public operatorStatic memberLogicalNot
! vector, calculates the length of the vector
Public operatorStatic memberModulus(Double, Vector3D)
value % vector, a value modulo all vector components
Public operatorStatic memberModulus(Vector3D, Double)
vector % value, all vector components modulo a value
Public operatorStatic memberModulus(Vector3D, Vector3D)
vector % vector, component wise modulo for vectors
Public operatorStatic memberMultiply(Double, Vector3D)
value * vector, multiplies a value by all vector components
Public operatorStatic memberMultiply(Vector3D, Double)
vector * value, multiplies a value by all vector components
Public operatorStatic memberMultiply(Vector3D, Vector3D)
vector * vector, multiplies the values of two vectors component wise
Public operatorStatic memberOnesComplement
~ vector, normalizes a vector
Public operatorStatic memberSubtraction(Double, Vector3D)
value - vector, subtracts all vector components from a value
Public operatorStatic memberSubtraction(Vector3D, Double)
vector - value, subtracts a value from all vector components
Public operatorStatic memberSubtraction(Vector3D, Vector3D)
vector - vector, subtracts the components of v2 from the components of v1
Public operatorStatic memberUnaryNegation
- vector, flips the sign off all vector components
Public operatorStatic memberUnaryPlus
+ vector, makes no changes to a vector

Extension Methods

  NameDescription
Public Extension MethodToSlimDXVector
Converts a Vector3D to a Vector3.
(Defined by VectorExtensions.)

Fields

  NameDescription
Public fieldStatic membereX
(1, 0, 0) basis vector in x direction
Public fieldStatic membereY
(0, 1, 0) basis vector in y direction
Public fieldStatic membereZ
(0, 0, 1) basis vector in z direction
Public fieldx
Data component for the x dimension
Public fieldy
Data component for the y dimension
Public fieldz
Data component for the z dimension
Public fieldStatic memberZero
(0, 0, 0) Vector

Properties

  NameDescription
Public propertyItem
Unsafe but very fast indexer for 3d-vector, [0..2]
Public propertyLength
Get or Set the Length of this vector
Public propertyxy
Get/set x and y components as 2d-vector
Public propertyxz
Get/set x and z components as 2d-vector
Public propertyyz
Get/set y and z components as 2d-vector

See Also