Struct DoubleVector3
- Namespace
- OmegaEngine.Foundation.Geometry
- Assembly
- OmegaEngine.Foundation.dll
Defines a three component vector with double accuracy.
[TypeConverter(typeof(DoubleVector3Converter))]
public struct DoubleVector3 : IEquatable<DoubleVector3>
- Implements
- Inherited Members
- Extension Methods
Constructors
DoubleVector3(double, double, double)
Creates a new vector.
public DoubleVector3(double x, double y, double z)
Parameters
Properties
X
Gets or sets the X component of the vector.
public double X { readonly get; set; }
Property Value
Y
Gets or sets the Y component of the vector.
public double Y { readonly get; set; }
Property Value
Z
Gets or sets the Z component of the vector.
public double Z { readonly get; set; }
Property Value
Methods
ApplyOffset(DoubleVector3)
Returns a single-precision standard Vector3 after subtracting an offset value
public Vector3 ApplyOffset(DoubleVector3 offset)
Parameters
offset
DoubleVector3This value is subtracting from the double-precision data before it is casted to single-precision
Returns
- Vector3
The relative value
DotProduct(DoubleVector3)
Calculates the dot product of this vector and vector
.
public double DotProduct(DoubleVector3 vector)
Parameters
vector
DoubleVector3The second vector to calculate the dot product with.
Returns
- double
this x
vector
Equals(DoubleVector3)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(DoubleVector3 other)
Parameters
other
DoubleVector3An object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
obj
objectThe object to compare with the current instance.
Returns
- bool
true if
obj
and this instance are the same type and represent the same value; otherwise, false.
Flatten()
Maps X to X and Z to -Y. Drops Y.
public Vector2 Flatten()
Returns
- Vector2
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
Length()
Calculates the length of the vector.
public double Length()
Returns
Subtract(DoubleVector3)
Subtracts vector
from this and returns the result
public DoubleVector3 Subtract(DoubleVector3 vector)
Parameters
vector
DoubleVector3
Returns
ToString()
Returns the fully qualified type name of this instance.
public override string ToString()
Returns
- string
The fully qualified type name.
Operators
operator +(DoubleVector3, DoubleVector3)
Add DoubleVector3 to DoubleVector3
public static DoubleVector3 operator +(DoubleVector3 vector1, DoubleVector3 vector2)
Parameters
vector1
DoubleVector3vector2
DoubleVector3
Returns
operator +(DoubleVector3, Vector3)
Add DoubleVector3 to SlimDX.Vector3
public static DoubleVector3 operator +(DoubleVector3 vector1, Vector3 vector2)
Parameters
vector1
DoubleVector3vector2
Vector3
Returns
operator +(Vector3, DoubleVector3)
Add SlimDX.Vector3 to DoubleVector3
public static DoubleVector3 operator +(Vector3 vector1, DoubleVector3 vector2)
Parameters
vector1
Vector3vector2
DoubleVector3
Returns
operator ==(DoubleVector3, DoubleVector3)
public static bool operator ==(DoubleVector3 left, DoubleVector3 right)
Parameters
left
DoubleVector3right
DoubleVector3
Returns
explicit operator Vector3(DoubleVector3)
Convert DoubleVector3 into SlimDX.Vector3
public static explicit operator Vector3(DoubleVector3 vector)
Parameters
vector
DoubleVector3
Returns
- Vector3
explicit operator DoubleVector3(Vector3)
Convert SlimDX.Vector3 into DoubleVector3
public static explicit operator DoubleVector3(Vector3 vector)
Parameters
vector
Vector3
Returns
operator !=(DoubleVector3, DoubleVector3)
public static bool operator !=(DoubleVector3 left, DoubleVector3 right)
Parameters
left
DoubleVector3right
DoubleVector3
Returns
operator *(DoubleVector3, double)
Multiply DoubleVector3 with double
public static DoubleVector3 operator *(DoubleVector3 vector, double scalar)
Parameters
vector
DoubleVector3scalar
double
Returns
operator *(DoubleVector3, float)
Multiply DoubleVector3 with float
public static DoubleVector3 operator *(DoubleVector3 vector, float scalar)
Parameters
vector
DoubleVector3scalar
float
Returns
operator *(double, DoubleVector3)
Multiply DoubleVector3 with double
public static DoubleVector3 operator *(double scalar, DoubleVector3 vector)
Parameters
scalar
doublevector
DoubleVector3
Returns
operator *(float, DoubleVector3)
Multiply DoubleVector3 with float
public static DoubleVector3 operator *(float scalar, DoubleVector3 vector)
Parameters
scalar
floatvector
DoubleVector3
Returns
operator -(DoubleVector3, DoubleVector3)
Subtract DoubleVector3 from DoubleVector3
public static DoubleVector3 operator -(DoubleVector3 vector1, DoubleVector3 vector2)
Parameters
vector1
DoubleVector3vector2
DoubleVector3
Returns
operator -(DoubleVector3, Vector3)
Subtract DoubleVector3 from SlimDX.Vector3
public static DoubleVector3 operator -(DoubleVector3 vector1, Vector3 vector2)
Parameters
vector1
DoubleVector3vector2
Vector3
Returns
operator -(Vector3, DoubleVector3)
Subtract DoubleVector3 from SlimDX.Vector3
public static DoubleVector3 operator -(Vector3 vector1, DoubleVector3 vector2)
Parameters
vector1
Vector3vector2
DoubleVector3