Class Vector3<T>
- Namespace
- FellowOakDicom.Imaging.Mathematics
- Assembly
- fo-dicom.core.dll
public class Vector3<T> where T : INumber<T>
Type Parameters
T
- Inheritance
-
Vector3<T>
- Inherited Members
- Extension Methods
Constructors
Vector3()
public Vector3()
Vector3(Vector3<T>)
public Vector3(Vector3<T> v)
Parameters
vVector3<T>
Vector3(T, T, T)
public Vector3(T x, T y, T z)
Parameters
xTyTzT
Vector3(T[])
public Vector3(T[] v)
Parameters
vT[]
Vector3(T[], int)
public Vector3(T[] v, int start)
Parameters
vT[]startint
Fields
AxisX
public static readonly Vector3<T> AxisX
Field Value
- Vector3<T>
AxisY
public static readonly Vector3<T> AxisY
Field Value
- Vector3<T>
AxisZ
public static readonly Vector3<T> AxisZ
Field Value
- Vector3<T>
Zero
public static readonly Vector3<T> Zero
Field Value
- Vector3<T>
Properties
IsZero
public bool IsZero { get; }
Property Value
X
public T X { get; set; }
Property Value
- T
Y
public T Y { get; set; }
Property Value
- T
Z
public T Z { get; set; }
Property Value
- T
Methods
Clone()
public Vector3<T> Clone()
Returns
- Vector3<T>
CrossProduct(Vector3<T>)
public Vector3<T> CrossProduct(Vector3<T> b)
Parameters
bVector3<T>
Returns
- Vector3<T>
Distance(Vector3<T>)
public T Distance(Vector3<T> b)
Parameters
bVector3<T>
Returns
- T
DotProduct(Point3<T>)
public T DotProduct(Point3<T> b)
Parameters
bPoint3<T>
Returns
- T
DotProduct(Vector3<T>)
public T DotProduct(Vector3<T> b)
Parameters
bVector3<T>
Returns
- T
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
objobjectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
IsPerpendicular(Vector3<T>)
public bool IsPerpendicular(Vector3<T> b)
Parameters
bVector3<T>
Returns
Length()
public T Length()
Returns
- T
Magnitude()
public T Magnitude()
Returns
- T
Max(Vector3<T>, Vector3<T>)
public static Vector3<T> Max(Vector3<T> a, Vector3<T> b)
Parameters
Returns
- Vector3<T>
Min(Vector3<T>, Vector3<T>)
public static Vector3<T> Min(Vector3<T> a, Vector3<T> b)
Parameters
Returns
- Vector3<T>
NearestAxis()
public Vector3<T> NearestAxis()
Returns
- Vector3<T>
Normalize()
public Vector3<T> Normalize()
Returns
- Vector3<T>
Reflect(Vector3<T>)
public Vector3<T> Reflect(Vector3<T> normal)
Parameters
normalVector3<T>
Returns
- Vector3<T>
Rotate(Vector3<T>, T)
public Vector3<T> Rotate(Vector3<T> axis, T angle)
Parameters
axisVector3<T>angleT
Returns
- Vector3<T>
ToArray()
public T[] ToArray()
Returns
- T[]
ToPoint()
public Point3<T> ToPoint()
Returns
- Point3<T>
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.
Operators
operator +(Vector3<T>, Vector3<T>)
public static Vector3<T> operator +(Vector3<T> a, Vector3<T> b)
Parameters
Returns
- Vector3<T>
operator /(Vector3<T>, T)
public static Vector3<T> operator /(Vector3<T> a, T b)
Parameters
aVector3<T>bT
Returns
- Vector3<T>
operator ==(Vector3<T>, Vector3<T>)
public static bool operator ==(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator >(Vector3<T>, Vector3<T>)
public static bool operator >(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator >=(Vector3<T>, Vector3<T>)
public static bool operator >=(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator !=(Vector3<T>, Vector3<T>)
public static bool operator !=(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator <(Vector3<T>, Vector3<T>)
public static bool operator <(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator <=(Vector3<T>, Vector3<T>)
public static bool operator <=(Vector3<T> a, Vector3<T> b)
Parameters
Returns
operator *(Vector3<T>, Point3<T>)
public static T operator *(Vector3<T> a, Point3<T> b)
Parameters
Returns
- T
operator *(Vector3<T>, Vector3<T>)
public static T operator *(Vector3<T> a, Vector3<T> b)
Parameters
Returns
- T
operator *(Vector3<T>, T)
public static Vector3<T> operator *(Vector3<T> a, T b)
Parameters
aVector3<T>bT
Returns
- Vector3<T>
operator *(T, Vector3<T>)
public static Vector3<T> operator *(T a, Vector3<T> b)
Parameters
aTbVector3<T>
Returns
- Vector3<T>
operator -(Vector3<T>, Vector3<T>)
public static Vector3<T> operator -(Vector3<T> a, Vector3<T> b)
Parameters
Returns
- Vector3<T>
operator -(Vector3<T>)
public static Vector3<T> operator -(Vector3<T> a)
Parameters
aVector3<T>
Returns
- Vector3<T>
operator +(Vector3<T>)
public static Vector3<T> operator +(Vector3<T> a)
Parameters
aVector3<T>
Returns
- Vector3<T>