Struct Vector3d
Namespace: g3
Assembly: cs.temp.dll.dll
Syntax
public struct Vector3d : IComparable<Vector3d>, IEquatable<Vector3d>
Constructors
Vector3d(Vector3d)
Declaration
public Vector3d(Vector3d copy)
Parameters
Vector3d(Vector3f)
Declaration
public Vector3d(Vector3f copy)
Parameters
Vector3d(Double)
Declaration
public Vector3d(double f)
Parameters
Type |
Name |
Description |
Double |
f |
|
Vector3d(Double, Double, Double)
Declaration
public Vector3d(double x, double y, double z)
Parameters
Vector3d(Double[])
Declaration
public Vector3d(double[] v2)
Parameters
Type |
Name |
Description |
Double[] |
v2 |
|
Fields
AxisX
Declaration
public static readonly Vector3d AxisX
Field Value
AxisY
Declaration
public static readonly Vector3d AxisY
Field Value
AxisZ
Declaration
public static readonly Vector3d AxisZ
Field Value
MaxValue
Declaration
public static readonly Vector3d MaxValue
Field Value
MinValue
Declaration
public static readonly Vector3d MinValue
Field Value
One
Declaration
public static readonly Vector3d One
Field Value
x
Declaration
Field Value
y
Declaration
Field Value
z
Declaration
Field Value
Zero
Declaration
public static readonly Vector3d Zero
Field Value
Properties
Abs
Declaration
public Vector3d Abs { get; }
Property Value
IsFinite
Declaration
public bool IsFinite { get; }
Property Value
IsNormalized
Declaration
public bool IsNormalized { get; }
Property Value
Item[Int32]
Declaration
public double this[int key] { get; set; }
Parameters
Type |
Name |
Description |
Int32 |
key |
|
Property Value
Length
Declaration
public double Length { get; }
Property Value
LengthL1
Declaration
public double LengthL1 { get; }
Property Value
LengthSquared
Declaration
public double LengthSquared { get; }
Property Value
Max
Declaration
public double Max { get; }
Property Value
MaxAbs
Declaration
public double MaxAbs { get; }
Property Value
Min
Declaration
public double Min { get; }
Property Value
MinAbs
Declaration
public double MinAbs { get; }
Property Value
Normalized
Declaration
public Vector3d Normalized { get; }
Property Value
xy
Declaration
public Vector2d xy { get; set; }
Property Value
xz
Declaration
public Vector2d xz { get; set; }
Property Value
yz
Declaration
public Vector2d yz { get; set; }
Property Value
Methods
Add(Vector3d)
Declaration
public void Add(Vector3d o)
Parameters
AngleD(Vector3d)
Declaration
public double AngleD(Vector3d v2)
Parameters
Returns
AngleD(Vector3d, Vector3d)
Declaration
public static double AngleD(Vector3d v1, Vector3d v2)
Parameters
Returns
AngleR(Vector3d)
Declaration
public double AngleR(Vector3d v2)
Parameters
Returns
AngleR(Vector3d, Vector3d)
Declaration
public static double AngleR(Vector3d v1, Vector3d v2)
Parameters
Returns
CompareTo(Vector3d)
Declaration
public int CompareTo(Vector3d other)
Parameters
Returns
ComputeOrthogonalComplement(Int32, Vector3d, ref Vector3d, ref Vector3d)
this function is ported from GTEngine.
Compute a right-handed orthonormal basis for the orthogonal complement
of the input vectors. The function returns the smallest length of the
unnormalized vectors computed during the process. If this value is nearly
zero, it is possible that the inputs are linearly dependent (within
numerical round-off errors). On input, numInputs must be 1 or 2 and
v0 through v(numInputs-1) must be initialized. On output, the
vectors v0 through v2 form an orthonormal set.
Declaration
public static double ComputeOrthogonalComplement(int numInputs, Vector3d v0, ref Vector3d v1, ref Vector3d v2)
Parameters
Returns
Cross(Vector3d)
Declaration
public Vector3d Cross(Vector3d v2)
Parameters
Returns
Cross(Vector3d, Vector3d)
Declaration
public static Vector3d Cross(Vector3d v1, Vector3d v2)
Parameters
Returns
Cross(ref Vector3d)
Declaration
public Vector3d Cross(ref Vector3d v2)
Parameters
Returns
Distance(Vector3d)
Declaration
public double Distance(Vector3d v2)
Parameters
Returns
Distance(ref Vector3d)
Declaration
public double Distance(ref Vector3d v2)
Parameters
Returns
DistanceSquared(Vector3d)
Declaration
public double DistanceSquared(Vector3d v2)
Parameters
Returns
DistanceSquared(ref Vector3d)
Declaration
public double DistanceSquared(ref Vector3d v2)
Parameters
Returns
Dot(Vector3d)
Declaration
public double Dot(Vector3d v2)
Parameters
Returns
Dot(Vector3d, Vector3d)
Declaration
public static double Dot(Vector3d v1, Vector3d v2)
Parameters
Returns
Dot(ref Vector3d)
Declaration
public double Dot(ref Vector3d v2)
Parameters
Returns
EpsilonEqual(Vector3d, Double)
Declaration
public bool EpsilonEqual(Vector3d v2, double epsilon)
Parameters
Returns
Equals(Vector3d)
Declaration
public bool Equals(Vector3d other)
Parameters
Returns
Equals(Object)
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
Overrides
GenerateComplementBasis(ref Vector3d, ref Vector3d, Vector3d)
Input W must be a unit-length vector. The output vectors {U,V} are
unit length and mutually perpendicular, and {U,V,W} is an orthonormal basis.
ported from WildMagic5
Declaration
public static void GenerateComplementBasis(ref Vector3d u, ref Vector3d v, Vector3d w)
Parameters
GetHashCode()
Declaration
public override int GetHashCode()
Returns
Overrides
Lerp(Vector3d, Vector3d, Double)
Declaration
public static Vector3d Lerp(Vector3d a, Vector3d b, double t)
Parameters
Returns
Lerp(ref Vector3d, ref Vector3d, Double)
Declaration
public static Vector3d Lerp(ref Vector3d a, ref Vector3d b, double t)
Parameters
Returns
MakePerpVectors(ref Vector3d, out Vector3d, out Vector3d)
Declaration
public static void MakePerpVectors(ref Vector3d n, out Vector3d b1, out Vector3d b2)
Parameters
Normalize(Double)
Declaration
public double Normalize(double epsilon = 2.2204460492503131E-16)
Parameters
Type |
Name |
Description |
Double |
epsilon |
|
Returns
Orthonormalize(ref Vector3d, ref Vector3d, ref Vector3d)
Gram-Schmidt orthonormalization of the input vectors.
[RMS] this is from WildMagic5, but I added returning the minLength value
from GTEngine, because I use this in place of GTEngine's Orthonormalize in
ComputeOrthogonalComplement below
Declaration
public static double Orthonormalize(ref Vector3d u, ref Vector3d v, ref Vector3d w)
Parameters
Returns
Round(Int32)
Declaration
public void Round(int nDecimals)
Parameters
Type |
Name |
Description |
Int32 |
nDecimals |
|
Set(Vector3d)
Declaration
public void Set(Vector3d o)
Parameters
Set(Double, Double, Double)
Declaration
public void Set(double fX, double fY, double fZ)
Parameters
Subtract(Vector3d)
Declaration
public void Subtract(Vector3d o)
Parameters
ToString()
Declaration
public override string ToString()
Returns
Overrides
ToString(String)
Declaration
public string ToString(string fmt)
Parameters
Type |
Name |
Description |
String |
fmt |
|
Returns
UnitCross(Vector3d)
Declaration
public Vector3d UnitCross(Vector3d v2)
Parameters
Returns
UnitCross(ref Vector3d)
Declaration
public Vector3d UnitCross(ref Vector3d v2)
Parameters
Returns
Operators
Addition(Vector3d, Vector3d)
Declaration
public static Vector3d operator +(Vector3d v0, Vector3d v1)
Parameters
Returns
Addition(Vector3d, Double)
Declaration
public static Vector3d operator +(Vector3d v0, double f)
Parameters
Returns
Division(Vector3d, Vector3d)
Declaration
public static Vector3d operator /(Vector3d a, Vector3d b)
Parameters
Returns
Division(Vector3d, Double)
Declaration
public static Vector3d operator /(Vector3d v, double f)
Parameters
Returns
Division(Double, Vector3d)
Declaration
public static Vector3d operator /(double f, Vector3d v)
Parameters
Returns
Equality(Vector3d, Vector3d)
Declaration
public static bool operator ==(Vector3d a, Vector3d b)
Parameters
Returns
Explicit(Vector3d to Vector3f)
Declaration
public static explicit operator Vector3f(Vector3d v)
Parameters
Returns
Implicit(Vector3f to Vector3d)
Declaration
public static implicit operator Vector3d(Vector3f v)
Parameters
Returns
Inequality(Vector3d, Vector3d)
Declaration
public static bool operator !=(Vector3d a, Vector3d b)
Parameters
Returns
Multiply(Vector3d, Vector3d)
Declaration
public static Vector3d operator *(Vector3d a, Vector3d b)
Parameters
Returns
Multiply(Vector3d, Double)
Declaration
public static Vector3d operator *(Vector3d v, double f)
Parameters
Returns
Multiply(Double, Vector3d)
Declaration
public static Vector3d operator *(double f, Vector3d v)
Parameters
Returns
Subtraction(Vector3d, Vector3d)
Declaration
public static Vector3d operator -(Vector3d v0, Vector3d v1)
Parameters
Returns
Subtraction(Vector3d, Double)
Declaration
public static Vector3d operator -(Vector3d v0, double f)
Parameters
Returns
UnaryNegation(Vector3d)
Declaration
public static Vector3d operator -(Vector3d v)
Parameters
Returns
Implements