Show / Hide Table of Contents

Class Vector3D

Defines a vector with three components. Vector3 with double floating point precision

Inheritance
System.Object
Vector3D
Namespace: VRageMath
Assembly: VRage.Math.dll
Syntax
public sealed class Vector3D : ValueType, IEquatable<Vector3D>

Constructors

Vector3D(Double)

Creates a new instance of Vector3.

Declaration
public Vector3D(double value)
Parameters
Type Name Description
System.Double value

Value to initialize each component to.

Vector3D(Double, Double, Double)

Initializes a new instance of Vector3.

Declaration
public Vector3D(double x, double y, double z)
Parameters
Type Name Description
System.Double x

Initial value for the x-component of the vector.

System.Double y

Initial value for the y-component of the vector.

System.Double z

Initial value for the z-component of the vector.

Vector3D(Vector2, Double)

Initializes a new instance of Vector3.

Declaration
public Vector3D(Vector2 value, double z)
Parameters
Type Name Description
Vector2 value

A vector containing the values to initialize x and y components with.

System.Double z

Initial value for the z-component of the vector.

Vector3D(Vector2D, Double)

Declaration
public Vector3D(Vector2D value, double z)
Parameters
Type Name Description
Vector2D value
System.Double z

Vector3D(Vector3)

Declaration
public Vector3D(Vector3 value)
Parameters
Type Name Description
Vector3 value

Vector3D(Vector3D)

Declaration
public Vector3D(Vector3D value)
Parameters
Type Name Description
Vector3D value

Vector3D(Vector3I)

Declaration
public Vector3D(Vector3I value)
Parameters
Type Name Description
Vector3I value

Vector3D(ref Vector3I)

Declaration
public Vector3D(ref Vector3I value)
Parameters
Type Name Description
Vector3I value

Vector3D(Vector4)

Declaration
public Vector3D(Vector4 xyz)
Parameters
Type Name Description
Vector4 xyz

Vector3D(Vector4D)

Declaration
public Vector3D(Vector4D xyz)
Parameters
Type Name Description
Vector4D xyz

Fields

Backward

Declaration
public static Vector3D Backward
Field Value
Type Description
Vector3D

Down

Declaration
public static Vector3D Down
Field Value
Type Description
Vector3D

Forward

Declaration
public static Vector3D Forward
Field Value
Type Description
Vector3D

Half

Declaration
public static Vector3D Half
Field Value
Type Description
Vector3D

Left

Declaration
public static Vector3D Left
Field Value
Type Description
Vector3D

MaxValue

Declaration
public static Vector3D MaxValue
Field Value
Type Description
Vector3D

MinValue

Declaration
public static Vector3D MinValue
Field Value
Type Description
Vector3D

NegativeInfinity

Declaration
public static Vector3D NegativeInfinity
Field Value
Type Description
Vector3D

One

Declaration
public static Vector3D One
Field Value
Type Description
Vector3D

PositiveInfinity

Declaration
public static Vector3D PositiveInfinity
Field Value
Type Description
Vector3D

Right

Declaration
public static Vector3D Right
Field Value
Type Description
Vector3D

UnitX

Declaration
public static Vector3D UnitX
Field Value
Type Description
Vector3D

UnitY

Declaration
public static Vector3D UnitY
Field Value
Type Description
Vector3D

UnitZ

Declaration
public static Vector3D UnitZ
Field Value
Type Description
Vector3D

Up

Declaration
public static Vector3D Up
Field Value
Type Description
Vector3D

X

Gets or sets the x-component of the vector.

Declaration
public double X
Field Value
Type Description
System.Double

Y

Gets or sets the y-component of the vector.

Declaration
public double Y
Field Value
Type Description
System.Double

Z

Gets or sets the z-component of the vector.

Declaration
public double Z
Field Value
Type Description
System.Double

Zero

Declaration
public static Vector3D Zero
Field Value
Type Description
Vector3D

Properties

Sum

Declaration
public double Sum { get; }
Property Value
Type Description
System.Double

Volume

Declaration
public double Volume { get; }
Property Value
Type Description
System.Double

Methods

Abs(Vector3D)

Declaration
public static Vector3D Abs(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
Vector3D

Abs(ref Vector3D, out Vector3D)

Declaration
public static void Abs(ref Vector3D vector3D, out Vector3D abs)
Parameters
Type Name Description
Vector3D vector3D
Vector3D abs

AbsMax()

Returns the component of the vector, whose absolute value is largest of all the three components.

Declaration
public double AbsMax()
Returns
Type Description
System.Double

AbsMaxComponent()

Declaration
public int AbsMaxComponent()
Returns
Type Description
System.Int32

AbsMin()

Returns the component of the vector, whose absolute value is smallest of all the three components.

Declaration
public double AbsMin()
Returns
Type Description
System.Double

Add(Vector3D, Vector3D)

Adds two vectors.

Declaration
public static Vector3D Add(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Add(ref Vector3D, ref Vector3D, out Vector3D)

Adds two vectors.

Declaration
public static void Add(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Vector3D result

[OutAttribute] Sum of the source vectors.

Angle(Vector3D, Vector3D)

Gets angle between 2 vectors in radians

Declaration
public static double Angle(Vector3D a, Vector3D b)
Parameters
Type Name Description
Vector3D a

Vector A

Vector3D b

Vector B

Returns
Type Description
System.Double

Angle in radians

ArePerpendicular(ref Vector3D, ref Vector3D)

Declaration
public static bool ArePerpendicular(ref Vector3D a, ref Vector3D b)
Parameters
Type Name Description
Vector3D a
Vector3D b
Returns
Type Description
System.Boolean

AssertIsValid()

Declaration
public void AssertIsValid()

Barycentric(Vector3D, Vector3D, Vector3D, Double, Double)

Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.

Declaration
public static Vector3D Barycentric(Vector3D value1, Vector3D value2, Vector3D value3, double amount1, double amount2)
Parameters
Type Name Description
Vector3D value1

A Vector3 containing the 3D Cartesian coordinates of vertex 1 of the triangle.

Vector3D value2

A Vector3 containing the 3D Cartesian coordinates of vertex 2 of the triangle.

Vector3D value3

A Vector3 containing the 3D Cartesian coordinates of vertex 3 of the triangle.

System.Double amount1

Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).

System.Double amount2

Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).

Returns
Type Description
Vector3D

Barycentric(Vector3D, Vector3D, Vector3D, Vector3D, out Double, out Double, out Double)

Compute barycentric coordinates (u, v, w) for point p with respect to triangle (a, b, c) From : Real-Time Collision Detection, Christer Ericson, CRC Press 3.4 Barycentric Coordinates

Declaration
public static void Barycentric(Vector3D p, Vector3D a, Vector3D b, Vector3D c, out double u, out double v, out double w)
Parameters
Type Name Description
Vector3D p
Vector3D a
Vector3D b
Vector3D c
System.Double u
System.Double v
System.Double w

Barycentric(ref Vector3D, ref Vector3D, ref Vector3D, Double, Double, out Vector3D)

Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 3D triangle.

Declaration
public static void Barycentric(ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, double amount1, double amount2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

A Vector3 containing the 3D Cartesian coordinates of vertex 1 of the triangle.

Vector3D value2

A Vector3 containing the 3D Cartesian coordinates of vertex 2 of the triangle.

Vector3D value3

A Vector3 containing the 3D Cartesian coordinates of vertex 3 of the triangle.

System.Double amount1

Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).

System.Double amount2

Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).

Vector3D result

[OutAttribute] The 3D Cartesian coordinates of the specified point are placed in this Vector3 on exit.

CalculatePerpendicularVector(Vector3D)

Declaration
public static Vector3D CalculatePerpendicularVector(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
Vector3D

CalculatePerpendicularVector(out Vector3D)

Declaration
public void CalculatePerpendicularVector(out Vector3D result)
Parameters
Type Name Description
Vector3D result

CatmullRom(Vector3D, Vector3D, Vector3D, Vector3D, Double)

Performs a Catmull-Rom interpolation using the specified positions.

Declaration
public static Vector3D CatmullRom(Vector3D value1, Vector3D value2, Vector3D value3, Vector3D value4, double amount)
Parameters
Type Name Description
Vector3D value1

The first position in the interpolation.

Vector3D value2

The second position in the interpolation.

Vector3D value3

The third position in the interpolation.

Vector3D value4

The fourth position in the interpolation.

System.Double amount

Weighting factor.

Returns
Type Description
Vector3D

CatmullRom(ref Vector3D, ref Vector3D, ref Vector3D, ref Vector3D, Double, out Vector3D)

Performs a Catmull-Rom interpolation using the specified positions.

Declaration
public static void CatmullRom(ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, ref Vector3D value4, double amount, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

The first position in the interpolation.

Vector3D value2

The second position in the interpolation.

Vector3D value3

The third position in the interpolation.

Vector3D value4

The fourth position in the interpolation.

System.Double amount

Weighting factor.

Vector3D result

[OutAttribute] A vector that is the result of the Catmull-Rom interpolation.

Clamp(Vector3D, Vector3D, Vector3D)

Restricts a value to be within a specified range.

Declaration
public static Vector3D Clamp(Vector3D value1, Vector3D min, Vector3D max)
Parameters
Type Name Description
Vector3D value1

The value to clamp.

Vector3D min

The minimum value.

Vector3D max

The maximum value.

Returns
Type Description
Vector3D

Clamp(ref Vector3D, ref Vector3D, ref Vector3D, out Vector3D)

Restricts a value to be within a specified range.

Declaration
public static void Clamp(ref Vector3D value1, ref Vector3D min, ref Vector3D max, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

The value to clamp.

Vector3D min

The minimum value.

Vector3D max

The maximum value.

Vector3D result

[OutAttribute] The clamped value.

ClampToSphere(Vector3D, Double, Boolean)

Declaration
public static Vector3D ClampToSphere(Vector3D vector, double radius, bool force = false)
Parameters
Type Name Description
Vector3D vector
System.Double radius
System.Boolean force
Returns
Type Description
Vector3D

ClampToSphere(ref Vector3D, Double)

Declaration
public static void ClampToSphere(ref Vector3D vector, double radius)
Parameters
Type Name Description
Vector3D vector
System.Double radius

CreateFromAzimuthAndElevation(Double, Double, out Vector3D)

Declaration
public static void CreateFromAzimuthAndElevation(double azimuth, double elevation, out Vector3D direction)
Parameters
Type Name Description
System.Double azimuth
System.Double elevation
Vector3D direction

Cross(Vector3D)

Declaration
public Vector3D Cross(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
Vector3D

Cross(Vector3D, Vector3D)

Calculates the cross product of two vectors.

Declaration
public static Vector3D Cross(Vector3D vector1, Vector3D vector2)
Parameters
Type Name Description
Vector3D vector1

Source vector.

Vector3D vector2

Source vector.

Returns
Type Description
Vector3D

Cross(ref Vector3D, ref Vector3D, out Vector3D)

Calculates the cross product of two vectors.

Declaration
public static void Cross(ref Vector3D vector1, ref Vector3D vector2, out Vector3D result)
Parameters
Type Name Description
Vector3D vector1

Source vector.

Vector3D vector2

Source vector.

Vector3D result

[OutAttribute] The cross product of the vectors.

Distance(Vector3, Vector3D)

Declaration
public static double Distance(Vector3 value1, Vector3D value2)
Parameters
Type Name Description
Vector3 value1
Vector3D value2
Returns
Type Description
System.Double

Distance(Vector3D, Vector3)

Declaration
public static double Distance(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1
Vector3 value2
Returns
Type Description
System.Double

Distance(Vector3D, Vector3D)

Calculates the distance between two vectors.

Declaration
public static double Distance(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
System.Double

Distance(ref Vector3D, ref Vector3D, out Double)

Calculates the distance between two vectors.

Declaration
public static void Distance(ref Vector3D value1, ref Vector3D value2, out double result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

System.Double result

[OutAttribute] The distance between the vectors.

DistanceSquared(Vector3D, Vector3D)

Calculates the distance between two vectors squared.

Declaration
public static double DistanceSquared(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
System.Double

DistanceSquared(ref Vector3D, ref Vector3D, out Double)

Calculates the distance between two vectors squared.

Declaration
public static void DistanceSquared(ref Vector3D value1, ref Vector3D value2, out double result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

System.Double result

[OutAttribute] The distance between the two vectors squared.

Divide(Vector3D, Double)

Divides a vector by a scalar value.

Declaration
public static Vector3D Divide(Vector3D value1, double value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

System.Double value2

The divisor.

Returns
Type Description
Vector3D

Divide(Vector3D, Vector3D)

Divides the components of a vector by the components of another vector.

Declaration
public static Vector3D Divide(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Divisor vector.

Returns
Type Description
Vector3D

Divide(ref Vector3D, Double, out Vector3D)

Divides a vector by a scalar value.

Declaration
public static void Divide(ref Vector3D value1, double value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

System.Double value2

The divisor.

Vector3D result

[OutAttribute] The result of the division.

Divide(ref Vector3D, ref Vector3D, out Vector3D)

Divides the components of a vector by the components of another vector.

Declaration
public static void Divide(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

The divisor.

Vector3D result

[OutAttribute] The result of the division.

DominantAxisProjection(Vector3D)

Returns a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value.

Declaration
public static Vector3D DominantAxisProjection(Vector3D value1)
Parameters
Type Name Description
Vector3D value1

Source vector.

Returns
Type Description
Vector3D

DominantAxisProjection(ref Vector3D, out Vector3D)

Calculates a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value. The result is saved into a user-specified variable.

Declaration
public static void DominantAxisProjection(ref Vector3D value1, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D result

[OutAttribute] The projected vector.

Dot(Vector3)

Declaration
public double Dot(Vector3 v)
Parameters
Type Name Description
Vector3 v
Returns
Type Description
System.Double

Dot(ref Vector3, ref Vector3D, out Double)

Declaration
public static void Dot(ref Vector3 vector1, ref Vector3D vector2, out double result)
Parameters
Type Name Description
Vector3 vector1
Vector3D vector2
System.Double result

Dot(Vector3D)

Declaration
public double Dot(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
System.Double

Dot(Vector3D, Vector3)

Declaration
public static double Dot(Vector3D vector1, Vector3 vector2)
Parameters
Type Name Description
Vector3D vector1
Vector3 vector2
Returns
Type Description
System.Double

Dot(Vector3D, Vector3D)

Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.

Declaration
public static double Dot(Vector3D vector1, Vector3D vector2)
Parameters
Type Name Description
Vector3D vector1

Source vector.

Vector3D vector2

Source vector.

Returns
Type Description
System.Double

Dot(ref Vector3D)

Declaration
public double Dot(ref Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
System.Double

Dot(ref Vector3D, ref Vector3, out Double)

Declaration
public static void Dot(ref Vector3D vector1, ref Vector3 vector2, out double result)
Parameters
Type Name Description
Vector3D vector1
Vector3 vector2
System.Double result

Dot(ref Vector3D, ref Vector3D, out Double)

Calculates the dot product of two vectors and writes the result to a user-specified variable. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.

Declaration
public static void Dot(ref Vector3D vector1, ref Vector3D vector2, out double result)
Parameters
Type Name Description
Vector3D vector1

Source vector.

Vector3D vector2

Source vector.

System.Double result

[OutAttribute] The dot product of the two vectors.

Equals(Object)

Returns a value that indicates whether the current instance is equal to a specified object.

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj

Object to make the comparison with.

Returns
Type Description
System.Boolean

Equals(Vector3D)

Determines whether the specified Object is equal to the Vector3.

Declaration
public bool Equals(Vector3D other)
Parameters
Type Name Description
Vector3D other

The Vector3 to compare with the current Vector3.

Returns
Type Description
System.Boolean

Equals(Vector3D, Double)

Declaration
public bool Equals(Vector3D other, double epsilon)
Parameters
Type Name Description
Vector3D other
System.Double epsilon
Returns
Type Description
System.Boolean

Floor(Vector3D)

Declaration
public static Vector3I Floor(Vector3D vect3d)
Parameters
Type Name Description
Vector3D vect3d
Returns
Type Description
Vector3I

Fract(ref Vector3D, out Vector3D)

Declaration
public static void Fract(ref Vector3D o, out Vector3D r)
Parameters
Type Name Description
Vector3D o
Vector3D r

GetAzimuthAndElevation(Vector3D, out Double, out Double)

Declaration
public static void GetAzimuthAndElevation(Vector3D v, out double azimuth, out double elevation)
Parameters
Type Name Description
Vector3D v
System.Double azimuth
System.Double elevation

GetDim(Int32)

Declaration
public double GetDim(int i)
Parameters
Type Name Description
System.Int32 i
Returns
Type Description
System.Double

GetHash()

Gets the hash code of the vector object.

Declaration
public long GetHash()
Returns
Type Description
System.Int64

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32

Hermite(Vector3D, Vector3D, Vector3D, Vector3D, Double)

Performs a Hermite spline interpolation.

Declaration
public static Vector3D Hermite(Vector3D value1, Vector3D tangent1, Vector3D value2, Vector3D tangent2, double amount)
Parameters
Type Name Description
Vector3D value1

Source position vector.

Vector3D tangent1

Source tangent vector.

Vector3D value2

Source position vector.

Vector3D tangent2

Source tangent vector.

System.Double amount

Weighting factor.

Returns
Type Description
Vector3D

Hermite(ref Vector3D, ref Vector3D, ref Vector3D, ref Vector3D, Double, out Vector3D)

Performs a Hermite spline interpolation.

Declaration
public static void Hermite(ref Vector3D value1, ref Vector3D tangent1, ref Vector3D value2, ref Vector3D tangent2, double amount, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source position vector.

Vector3D tangent1

Source tangent vector.

Vector3D value2

Source position vector.

Vector3D tangent2

Source tangent vector.

System.Double amount

Weighting factor.

Vector3D result

[OutAttribute] The result of the Hermite spline interpolation.

Interpolate3(Vector3D, Vector3D, Double)

Declaration
public void Interpolate3(Vector3D v0, Vector3D v1, double rt)
Parameters
Type Name Description
Vector3D v0
Vector3D v1
System.Double rt

IsInsideInclusive(ref Vector3D, ref Vector3D)

Declaration
public bool IsInsideInclusive(ref Vector3D min, ref Vector3D max)
Parameters
Type Name Description
Vector3D min
Vector3D max
Returns
Type Description
System.Boolean

IsUnit(ref Vector3D)

Declaration
public static bool IsUnit(ref Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
System.Boolean

IsValid()

Declaration
public bool IsValid()
Returns
Type Description
System.Boolean

IsZero()

Declaration
public bool IsZero()
Returns
Type Description
System.Boolean

IsZero(Vector3D)

Declaration
public static bool IsZero(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
System.Boolean

IsZero(Vector3D, Double)

Declaration
public static bool IsZero(Vector3D value, double epsilon)
Parameters
Type Name Description
Vector3D value
System.Double epsilon
Returns
Type Description
System.Boolean

IsZeroVector(Vector3D)

Declaration
public static Vector3D IsZeroVector(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
Vector3D

IsZeroVector(Vector3D, Double)

Declaration
public static Vector3D IsZeroVector(Vector3D value, double epsilon)
Parameters
Type Name Description
Vector3D value
System.Double epsilon
Returns
Type Description
Vector3D

Length()

Calculates the length of the vector.

Declaration
public double Length()
Returns
Type Description
System.Double

LengthSquared()

Calculates the length of the vector squared.

Declaration
public double LengthSquared()
Returns
Type Description
System.Double

Lerp(Vector3D, Vector3D, Double)

Performs a linear interpolation between two vectors.

Declaration
public static Vector3D Lerp(Vector3D value1, Vector3D value2, double amount)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

System.Double amount

Value between 0 and 1 indicating the weight of value2.

Returns
Type Description
Vector3D

Lerp(ref Vector3D, ref Vector3D, Double, out Vector3D)

Performs a linear interpolation between two vectors.

Declaration
public static void Lerp(ref Vector3D value1, ref Vector3D value2, double amount, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

System.Double amount

Value between 0 and 1 indicating the weight of value2.

Vector3D result

[OutAttribute] The result of the interpolation.

Max()

Returns the component of the vector that is largest of all the three components.

Declaration
public double Max()
Returns
Type Description
System.Double

Max(Vector3D, Vector3D)

Returns a vector that contains the highest value from each matching pair of components.

Declaration
public static Vector3D Max(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Max(ref Vector3D, ref Vector3D, out Vector3D)

Returns a vector that contains the highest value from each matching pair of components.

Declaration
public static void Max(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Vector3D result

[OutAttribute] The maximized vector.

Min()

Returns the component of the vector that is smallest of all the three components.

Declaration
public double Min()
Returns
Type Description
System.Double

Min(Vector3D, Vector3D)

Returns a vector that contains the lowest value from each matching pair of components.

Declaration
public static Vector3D Min(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Min(ref Vector3D, ref Vector3D, out Vector3D)

Returns a vector that contains the lowest value from each matching pair of components.

Declaration
public static void Min(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Vector3D result

[OutAttribute] The minimized vector.

MinMax(ref Vector3D, ref Vector3D)

Separates minimal and maximal values of any two input vectors

Declaration
public static void MinMax(ref Vector3D min, ref Vector3D max)
Parameters
Type Name Description
Vector3D min

minimal values of the two vectors

Vector3D max

maximal values of the two vectors

Multiply(Vector3D, Double)

Multiplies a vector by a scalar value.

Declaration
public static Vector3D Multiply(Vector3D value1, double scaleFactor)
Parameters
Type Name Description
Vector3D value1

Source vector.

System.Double scaleFactor

Scalar value.

Returns
Type Description
Vector3D

Multiply(Vector3D, Vector3D)

Multiplies the components of two vectors by each other.

Declaration
public static Vector3D Multiply(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Multiply(ref Vector3D, Double, out Vector3D)

Multiplies a vector by a scalar value.

Declaration
public static void Multiply(ref Vector3D value1, double scaleFactor, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

System.Double scaleFactor

Scalar value.

Vector3D result

[OutAttribute] The result of the multiplication.

Multiply(ref Vector3D, ref Vector3D, out Vector3D)

Multiplies the components of two vectors by each other.

Declaration
public static void Multiply(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Vector3D result

[OutAttribute] The result of the multiplication.

Negate(Vector3D)

Returns a vector pointing in the opposite direction.

Declaration
public static Vector3D Negate(Vector3D value)
Parameters
Type Name Description
Vector3D value

Source vector.

Returns
Type Description
Vector3D

Negate(ref Vector3D, out Vector3D)

Returns a vector pointing in the opposite direction.

Declaration
public static void Negate(ref Vector3D value, out Vector3D result)
Parameters
Type Name Description
Vector3D value

Source vector.

Vector3D result

[OutAttribute] Vector pointing in the opposite direction.

Normalize()

Turns the current vector into a unit vector. The result is a vector one unit in length pointing in the same direction as the original vector.

Declaration
public double Normalize()
Returns
Type Description
System.Double

Normalize(Vector3D)

Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.

Declaration
public static Vector3D Normalize(Vector3D value)
Parameters
Type Name Description
Vector3D value

The source Vector3.

Returns
Type Description
Vector3D

Normalize(ref Vector3D, out Vector3D)

Creates a unit vector from the specified vector, writing the result to a user-specified variable. The result is a vector one unit in length pointing in the same direction as the original vector.

Declaration
public static void Normalize(ref Vector3D value, out Vector3D result)
Parameters
Type Name Description
Vector3D value

Source vector.

Vector3D result

[OutAttribute] The normalized vector.

Normalized()

Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.

Declaration
public Vector3D Normalized()
Returns
Type Description
Vector3D

Normalized vector

ProjectOnPlane(ref Vector3D, ref Vector3D)

Projects given vector on plane specified by it's normal.

Declaration
public static Vector3D ProjectOnPlane(ref Vector3D vec, ref Vector3D planeNormal)
Parameters
Type Name Description
Vector3D vec

Vector which is to be projected

Vector3D planeNormal

Plane normal (may or may not be normalized)

Returns
Type Description
Vector3D

Vector projected on plane

ProjectOnVector(ref Vector3D, ref Vector3D)

Projects vector on another vector resulting in new vector in guided vector's direction with different length.

Declaration
public static Vector3D ProjectOnVector(ref Vector3D vec, ref Vector3D guideVector)
Parameters
Type Name Description
Vector3D vec

Vector which is to be projected

Vector3D guideVector

Guide vector (may or may not be normalized)

Returns
Type Description
Vector3D

Vector projected on guide vector

RectangularDistance(Vector3D, Vector3D)

Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.

Declaration
public static double RectangularDistance(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
System.Double

RectangularDistance(ref Vector3D, ref Vector3D)

Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.

Declaration
public static double RectangularDistance(ref Vector3D value1, ref Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
System.Double

Reflect(Vector3D, Vector3D)

Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.

Declaration
public static Vector3D Reflect(Vector3D vector, Vector3D normal)
Parameters
Type Name Description
Vector3D vector

Source vector.

Vector3D normal

Normal of the surface.

Returns
Type Description
Vector3D

Reflect(ref Vector3D, ref Vector3D, out Vector3D)

Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.

Declaration
public static void Reflect(ref Vector3D vector, ref Vector3D normal, out Vector3D result)
Parameters
Type Name Description
Vector3D vector

Source vector.

Vector3D normal

Normal of the surface.

Vector3D result

[OutAttribute] The reflected vector.

Reject(Vector3D, Vector3D)

Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction

Declaration
public static Vector3D Reject(Vector3D vector, Vector3D direction)
Parameters
Type Name Description
Vector3D vector

Vector which is to be rejected

Vector3D direction

Direction from which the input vector will be rejected

Returns
Type Description
Vector3D

Rejection of the vector from the given direction

Reject(ref Vector3D, ref Vector3D, out Vector3D)

Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction

Declaration
public static void Reject(ref Vector3D vector, ref Vector3D direction, out Vector3D result)
Parameters
Type Name Description
Vector3D vector

Vector which is to be rejected

Vector3D direction

Direction from which the input vector will be rejected

Vector3D result

Rejection of the vector from the given direction

Rotate(Vector3D, Double)

Declaration
public Vector3D Rotate(Vector3D axis, double rotationInRadians)
Parameters
Type Name Description
Vector3D axis
System.Double rotationInRadians
Returns
Type Description
Vector3D

Rotate(Vector3D, MatrixD)

Declaration
public static Vector3D Rotate(Vector3D vector, MatrixD rotationMatrix)
Parameters
Type Name Description
Vector3D vector
MatrixD rotationMatrix
Returns
Type Description
Vector3D

Rotate(ref Vector3D, ref MatrixD, out Vector3D)

Declaration
public static void Rotate(ref Vector3D vector, ref MatrixD rotationMatrix, out Vector3D result)
Parameters
Type Name Description
Vector3D vector
MatrixD rotationMatrix
Vector3D result

RotateAndScale(ref Vector3D, ref MatrixD, out Vector3D)

Declaration
public static void RotateAndScale(ref Vector3D vector, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D vector
MatrixD matrix
Vector3D result

Round(Vector3D)

Declaration
public static Vector3I Round(Vector3D vect3d)
Parameters
Type Name Description
Vector3D vect3d
Returns
Type Description
Vector3I

Round(Vector3D, Int32)

Declaration
public static Vector3D Round(Vector3D v, int numDecimals)
Parameters
Type Name Description
Vector3D v
System.Int32 numDecimals
Returns
Type Description
Vector3D

SetDim(Int32, Double)

Declaration
public void SetDim(int i, double value)
Parameters
Type Name Description
System.Int32 i
System.Double value

Sign(Vector3D)

Declaration
public static Vector3D Sign(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
Vector3D

SignNonZero(Vector3D)

Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign.

Declaration
public static Vector3D SignNonZero(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
Vector3D

SmoothStep(Vector3D, Vector3D, Double)

Interpolates between two values using a cubic equation.

Declaration
public static Vector3D SmoothStep(Vector3D value1, Vector3D value2, double amount)
Parameters
Type Name Description
Vector3D value1

Source value.

Vector3D value2

Source value.

System.Double amount

Weighting value.

Returns
Type Description
Vector3D

SmoothStep(ref Vector3D, ref Vector3D, Double, out Vector3D)

Interpolates between two values using a cubic equation.

Declaration
public static void SmoothStep(ref Vector3D value1, ref Vector3D value2, double amount, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

System.Double amount

Weighting value.

Vector3D result

[OutAttribute] The interpolated value.

Step(Vector3D)

Declaration
public static Vector3D Step(Vector3D value)
Parameters
Type Name Description
Vector3D value
Returns
Type Description
Vector3D

Subtract(Vector3D, Vector3D)

Subtracts a vector from a vector.

Declaration
public static Vector3D Subtract(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Subtract(ref Vector3D, ref Vector3D, out Vector3D)

Subtracts a vector from a vector.

Declaration
public static void Subtract(ref Vector3D value1, ref Vector3D value2, out Vector3D result)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Vector3D result

[OutAttribute] The result of the subtraction.

SwapYZCoordinates(Vector3D)

Declaration
public static Vector3D SwapYZCoordinates(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
Vector3D

ToString()

Retrieves a string representation of the current object.

Declaration
public override string ToString()
Returns
Type Description
System.String

ToString(String)

Declaration
public string ToString(string format)
Parameters
Type Name Description
System.String format
Returns
Type Description
System.String

Transform(Vector3, MatrixD)

Declaration
public static Vector3D Transform(Vector3 position, MatrixD matrix)
Parameters
Type Name Description
Vector3 position
MatrixD matrix
Returns
Type Description
Vector3D

Transform(ref Vector3, ref MatrixD, out Vector3D)

Declaration
public static void Transform(ref Vector3 position, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3 position
MatrixD matrix
Vector3D result

Transform(Vector3D, Matrix)

Transforms a 3D vector by the given matrix.

Declaration
public static Vector3D Transform(Vector3D position, Matrix matrix)
Parameters
Type Name Description
Vector3D position

The source vector.

Matrix matrix

The transformation matrix.

Returns
Type Description
Vector3D

Transform(Vector3D, MatrixD)

Transforms a 3D vector by the given matrix.

Declaration
public static Vector3D Transform(Vector3D position, MatrixD matrix)
Parameters
Type Name Description
Vector3D position

The source vector.

MatrixD matrix

The transformation matrix.

Returns
Type Description
Vector3D

Transform(Vector3D, ref MatrixD)

Declaration
public static Vector3D Transform(Vector3D position, ref MatrixD matrix)
Parameters
Type Name Description
Vector3D position
MatrixD matrix
Returns
Type Description
Vector3D

Transform(Vector3D, Quaternion)

Transforms a Vector3 by a specified Quaternion rotation.

Declaration
public static Vector3D Transform(Vector3D value, Quaternion rotation)
Parameters
Type Name Description
Vector3D value

The Vector3 to rotate.

Quaternion rotation

The Quaternion rotation to apply.

Returns
Type Description
Vector3D

Transform(Vector3D, QuaternionD)

Transforms a Vector3 by a specified Quaternion rotation.

Declaration
public static Vector3D Transform(Vector3D value, QuaternionD rotation)
Parameters
Type Name Description
Vector3D value

The Vector3 to rotate.

QuaternionD rotation

The Quaternion rotation to apply.

Returns
Type Description
Vector3D

Transform(ref Vector3D, ref MatrixD, out Vector3D)

Transforms a Vector3 by the given Matrix.

Declaration
public static void Transform(ref Vector3D position, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D position

The source Vector3.

MatrixD matrix

The transformation Matrix.

Vector3D result

[OutAttribute] The transformed vector.

Transform(ref Vector3D, ref MatrixI, out Vector3D)

Declaration
public static void Transform(ref Vector3D position, ref MatrixI matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D position
MatrixI matrix
Vector3D result

Transform(ref Vector3D, ref Quaternion, out Vector3D)

Transforms a Vector3 by a specified Quaternion rotation.

Declaration
public static void Transform(ref Vector3D value, ref Quaternion rotation, out Vector3D result)
Parameters
Type Name Description
Vector3D value

The Vector3 to rotate.

Quaternion rotation

The Quaternion rotation to apply.

Vector3D result

[OutAttribute] An existing Vector3 filled in with the results of the rotation.

Transform(Vector3D[], Int32, ref Matrix, Vector3D[], Int32, Int32)

Applies a specified transform Matrix to a specified range of an array of Vector3s and writes the results into a specified range of a destination array.

Declaration
public static void Transform(Vector3D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3D[] destinationArray, int destinationIndex, int length)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array.

System.Int32 sourceIndex

The index in the source array at which to start.

Matrix matrix

The transform Matrix to apply.

Vector3D[] destinationArray

The existing destination array.

System.Int32 destinationIndex

The index in the destination array at which to start.

System.Int32 length

The number of Vector3s to transform.

Transform(Vector3D[], Int32, ref Quaternion, Vector3D[], Int32, Int32)

Applies a specified Quaternion rotation to a specified range of an array of Vector3s and writes the results into a specified range of a destination array.

Declaration
public static void Transform(Vector3D[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector3D[] destinationArray, int destinationIndex, int length)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array.

System.Int32 sourceIndex

The index in the source array at which to start.

Quaternion rotation

The Quaternion rotation to apply.

Vector3D[] destinationArray

The existing destination array.

System.Int32 destinationIndex

The index in the destination array at which to start.

System.Int32 length

The number of Vector3s to transform.

Transform(Vector3D[], ref MatrixD, Vector3D*)

Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array.

Declaration
public static void Transform(Vector3D[] sourceArray, ref MatrixD matrix, Vector3D*destinationArray)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array.

MatrixD matrix

The transform Matrix to apply.

Vector3D* destinationArray

An existing destination array into which the transformed Vector3s are written.

Transform(Vector3D[], ref MatrixD, Vector3D[])

Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array.

Declaration
public static void Transform(Vector3D[] sourceArray, ref MatrixD matrix, Vector3D[] destinationArray)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array.

MatrixD matrix

The transform Matrix to apply.

Vector3D[] destinationArray

An existing destination array into which the transformed Vector3s are written.

Transform(Vector3D[], ref Quaternion, Vector3D[])

Transforms a source array of Vector3s by a specified Quaternion rotation and writes the results to an existing destination array.

Declaration
public static void Transform(Vector3D[] sourceArray, ref Quaternion rotation, Vector3D[] destinationArray)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array.

Quaternion rotation

The Quaternion rotation to apply.

Vector3D[] destinationArray

An existing destination array into which the transformed Vector3s are written.

TransformNoProjection(ref Vector3D, ref MatrixD, out Vector3D)

Declaration
public static void TransformNoProjection(ref Vector3D vector, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D vector
MatrixD matrix
Vector3D result

TransformNormal(Vector3, MatrixD)

Transforms a 3D vector normal by a matrix.

Declaration
public static Vector3D TransformNormal(Vector3 normal, MatrixD matrix)
Parameters
Type Name Description
Vector3 normal

The source vector.

MatrixD matrix

The transformation matrix.

Returns
Type Description
Vector3D

TransformNormal(ref Vector3, ref MatrixD, out Vector3D)

Declaration
public static void TransformNormal(ref Vector3 normal, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3 normal
MatrixD matrix
Vector3D result

TransformNormal(Vector3D, Matrix)

Transforms a 3D vector normal by a matrix.

Declaration
public static Vector3D TransformNormal(Vector3D normal, Matrix matrix)
Parameters
Type Name Description
Vector3D normal

The source vector.

Matrix matrix

The transformation matrix.

Returns
Type Description
Vector3D

TransformNormal(Vector3D, MatrixD)

Transforms a 3D vector normal by a matrix.

Declaration
public static Vector3D TransformNormal(Vector3D normal, MatrixD matrix)
Parameters
Type Name Description
Vector3D normal

The source vector.

MatrixD matrix

The transformation matrix.

Returns
Type Description
Vector3D

TransformNormal(Vector3D, ref MatrixD)

Declaration
public static Vector3D TransformNormal(Vector3D normal, ref MatrixD matrix)
Parameters
Type Name Description
Vector3D normal
MatrixD matrix
Returns
Type Description
Vector3D

TransformNormal(Vector3D, MyBlockOrientation)

Declaration
public static Vector3D TransformNormal(Vector3D normal, MyBlockOrientation orientation)
Parameters
Type Name Description
Vector3D normal
MyBlockOrientation orientation
Returns
Type Description
Vector3D

TransformNormal(ref Vector3D, ref MatrixD, out Vector3D)

Transforms a vector normal by a matrix.

Declaration
public static void TransformNormal(ref Vector3D normal, ref MatrixD matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D normal

The source vector.

MatrixD matrix

The transformation Matrix.

Vector3D result

[OutAttribute] The Vector3 resulting from the transformation.

TransformNormal(ref Vector3D, ref MatrixI, out Vector3D)

Declaration
public static void TransformNormal(ref Vector3D normal, ref MatrixI matrix, out Vector3D result)
Parameters
Type Name Description
Vector3D normal
MatrixI matrix
Vector3D result

TransformNormal(ref Vector3D, MyBlockOrientation, out Vector3D)

Declaration
public static void TransformNormal(ref Vector3D normal, MyBlockOrientation orientation, out Vector3D result)
Parameters
Type Name Description
Vector3D normal
MyBlockOrientation orientation
Vector3D result

TransformNormal(Vector3D[], Int32, ref Matrix, Vector3D[], Int32, Int32)

Transforms a specified range in an array of 3D vector normals by a specified Matrix and writes the results to a specified range in a destination array.

Declaration
public static void TransformNormal(Vector3D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3D[] destinationArray, int destinationIndex, int length)
Parameters
Type Name Description
Vector3D[] sourceArray

The source array of Vector3 normals.

System.Int32 sourceIndex

The starting index in the source array.

Matrix matrix

The transform Matrix to apply.

Vector3D[] destinationArray

The destination Vector3 array.

System.Int32 destinationIndex

The starting index in the destination array.

System.Int32 length

The number of vectors to transform.

TransformNormal(Vector3D[], ref Matrix, Vector3D*)

Transforms an array of 3D vector normals by a specified Matrix.

Declaration
public static void TransformNormal(Vector3D[] sourceArray, ref Matrix matrix, Vector3D*destinationArray)
Parameters
Type Name Description
Vector3D[] sourceArray

The array of Vector3 normals to transform.

Matrix matrix

The transform matrix to apply.

Vector3D* destinationArray

An existing Vector3 array into which the results of the transforms are written.

TransformNormal(Vector3D[], ref Matrix, Vector3D[])

Transforms an array of 3D vector normals by a specified Matrix.

Declaration
public static void TransformNormal(Vector3D[] sourceArray, ref Matrix matrix, Vector3D[] destinationArray)
Parameters
Type Name Description
Vector3D[] sourceArray

The array of Vector3 normals to transform.

Matrix matrix

The transform matrix to apply.

Vector3D[] destinationArray

An existing Vector3 array into which the results of the transforms are written.

TryParse(String, out Vector3D)

Declaration
public static bool TryParse(string str, out Vector3D retval)
Parameters
Type Name Description
System.String str
Vector3D retval
Returns
Type Description
System.Boolean

VolumeInt(Double)

Declaration
public long VolumeInt(double multiplier)
Parameters
Type Name Description
System.Double multiplier
Returns
Type Description
System.Int64

Operators

Addition(Vector3, Vector3D)

Declaration
public static Vector3D operator +(Vector3 value1, Vector3D value2)
Parameters
Type Name Description
Vector3 value1
Vector3D value2
Returns
Type Description
Vector3D

Addition(Vector3D, Double)

Declaration
public static Vector3D operator +(Vector3D value1, double value2)
Parameters
Type Name Description
Vector3D value1
System.Double value2
Returns
Type Description
Vector3D

Addition(Vector3D, Single)

Declaration
public static Vector3D operator +(Vector3D value1, float value2)
Parameters
Type Name Description
Vector3D value1
System.Single value2
Returns
Type Description
Vector3D

Addition(Vector3D, Vector3)

Declaration
public static Vector3D operator +(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1
Vector3 value2
Returns
Type Description
Vector3D

Addition(Vector3D, Vector3D)

Adds two vectors.

Declaration
public static Vector3D operator +(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Addition(Vector3D, Vector3I)

Declaration
public static Vector3D operator +(Vector3D value1, Vector3I value2)
Parameters
Type Name Description
Vector3D value1
Vector3I value2
Returns
Type Description
Vector3D

Division(Double, Vector3D)

Declaration
public static Vector3D operator /(double value, Vector3D divider)
Parameters
Type Name Description
System.Double value
Vector3D divider
Returns
Type Description
Vector3D

Division(Vector3D, Double)

Divides a vector by a scalar value.

Declaration
public static Vector3D operator /(Vector3D value, double divider)
Parameters
Type Name Description
Vector3D value

Source vector.

System.Double divider

The divisor.

Returns
Type Description
Vector3D

Division(Vector3D, Vector3D)

Divides the components of a vector by the components of another vector.

Declaration
public static Vector3D operator /(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Divisor vector.

Returns
Type Description
Vector3D

Equality(Vector3, Vector3D)

Declaration
public static bool operator ==(Vector3 value1, Vector3D value2)
Parameters
Type Name Description
Vector3 value1
Vector3D value2
Returns
Type Description
System.Boolean

Equality(Vector3D, Vector3)

Declaration
public static bool operator ==(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1
Vector3 value2
Returns
Type Description
System.Boolean

Equality(Vector3D, Vector3D)

Tests vectors for equality.

Declaration
public static bool operator ==(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
System.Boolean

Explicit(Vector3D to Vector3I)

Declaration
public static explicit operator Vector3I(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
Vector3I

Implicit(Vector3 to Vector3D)

Declaration
public static implicit operator Vector3D(Vector3 v)
Parameters
Type Name Description
Vector3 v
Returns
Type Description
Vector3D

Implicit(Vector3D to Vector3)

Declaration
public static implicit operator Vector3(Vector3D v)
Parameters
Type Name Description
Vector3D v
Returns
Type Description
Vector3

Inequality(Vector3, Vector3D)

Declaration
public static bool operator !=(Vector3 value1, Vector3D value2)
Parameters
Type Name Description
Vector3 value1
Vector3D value2
Returns
Type Description
System.Boolean

Inequality(Vector3D, Vector3)

Declaration
public static bool operator !=(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1
Vector3 value2
Returns
Type Description
System.Boolean

Inequality(Vector3D, Vector3D)

Tests vectors for inequality.

Declaration
public static bool operator !=(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Vector to compare.

Vector3D value2

Vector to compare.

Returns
Type Description
System.Boolean

Modulus(Vector3D, Double)

Declaration
public static Vector3D operator %(Vector3D value1, double value2)
Parameters
Type Name Description
Vector3D value1
System.Double value2
Returns
Type Description
Vector3D

Modulus(Vector3D, Vector3D)

Modulo division of two vectors.

Declaration
public static Vector3D operator %(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1
Vector3D value2
Returns
Type Description
Vector3D

Multiply(Double, Vector3D)

Multiplies a vector by a scalar value.

Declaration
public static Vector3D operator *(double scaleFactor, Vector3D value)
Parameters
Type Name Description
System.Double scaleFactor

Scalar value.

Vector3D value

Source vector.

Returns
Type Description
Vector3D

Multiply(Vector3D, Double)

Multiplies a vector by a scalar value.

Declaration
public static Vector3D operator *(Vector3D value, double scaleFactor)
Parameters
Type Name Description
Vector3D value

Source vector.

System.Double scaleFactor

Scalar value.

Returns
Type Description
Vector3D

Multiply(Vector3D, Vector3)

Multiplies the components of two vectors by each other.

Declaration
public static Vector3D operator *(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3 value2

Source vector.

Returns
Type Description
Vector3D

Multiply(Vector3D, Vector3D)

Multiplies the components of two vectors by each other.

Declaration
public static Vector3D operator *(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

Subtraction(Vector3, Vector3D)

Declaration
public static Vector3D operator -(Vector3 value1, Vector3D value2)
Parameters
Type Name Description
Vector3 value1
Vector3D value2
Returns
Type Description
Vector3D

Subtraction(Vector3D, Double)

Declaration
public static Vector3D operator -(Vector3D value1, double value2)
Parameters
Type Name Description
Vector3D value1
System.Double value2
Returns
Type Description
Vector3D

Subtraction(Vector3D, Vector3)

Declaration
public static Vector3D operator -(Vector3D value1, Vector3 value2)
Parameters
Type Name Description
Vector3D value1
Vector3 value2
Returns
Type Description
Vector3D

Subtraction(Vector3D, Vector3D)

Subtracts a vector from a vector.

Declaration
public static Vector3D operator -(Vector3D value1, Vector3D value2)
Parameters
Type Name Description
Vector3D value1

Source vector.

Vector3D value2

Source vector.

Returns
Type Description
Vector3D

UnaryNegation(Vector3D)

Returns a vector pointing in the opposite direction.

Declaration
public static Vector3D operator -(Vector3D value)
Parameters
Type Name Description
Vector3D value

Source vector.

Returns
Type Description
Vector3D
☀
☾
In This Article
Back to top
Generated by DocFX
☀
☾