Search Results for

    Show / Hide Table of Contents

    Struct Vector3d

    Implements
    IComparable<Vector3d>
    IEquatable<Vector3d>
    Inherited Members
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetType()
    Namespace: g3
    Assembly: cs.temp.dll.dll
    Syntax
    public struct Vector3d : IComparable<Vector3d>, IEquatable<Vector3d>

    Constructors

    Vector3d(Vector3d)

    Declaration
    public Vector3d(Vector3d copy)
    Parameters
    Type Name Description
    Vector3d copy

    Vector3d(Vector3f)

    Declaration
    public Vector3d(Vector3f copy)
    Parameters
    Type Name Description
    Vector3f copy

    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
    Type Name Description
    Double x
    Double y
    Double z

    Vector3d(Double[])

    Declaration
    public Vector3d(double[] v2)
    Parameters
    Type Name Description
    Double[] v2

    Fields

    AxisX

    Declaration
    public static readonly Vector3d AxisX
    Field Value
    Type Description
    Vector3d

    AxisY

    Declaration
    public static readonly Vector3d AxisY
    Field Value
    Type Description
    Vector3d

    AxisZ

    Declaration
    public static readonly Vector3d AxisZ
    Field Value
    Type Description
    Vector3d

    MaxValue

    Declaration
    public static readonly Vector3d MaxValue
    Field Value
    Type Description
    Vector3d

    MinValue

    Declaration
    public static readonly Vector3d MinValue
    Field Value
    Type Description
    Vector3d

    One

    Declaration
    public static readonly Vector3d One
    Field Value
    Type Description
    Vector3d

    x

    Declaration
    public double x
    Field Value
    Type Description
    Double

    y

    Declaration
    public double y
    Field Value
    Type Description
    Double

    z

    Declaration
    public double z
    Field Value
    Type Description
    Double

    Zero

    Declaration
    public static readonly Vector3d Zero
    Field Value
    Type Description
    Vector3d

    Properties

    Abs

    Declaration
    public Vector3d Abs { get; }
    Property Value
    Type Description
    Vector3d

    IsFinite

    Declaration
    public bool IsFinite { get; }
    Property Value
    Type Description
    Boolean

    IsNormalized

    Declaration
    public bool IsNormalized { get; }
    Property Value
    Type Description
    Boolean

    Item[Int32]

    Declaration
    public double this[int key] { get; set; }
    Parameters
    Type Name Description
    Int32 key
    Property Value
    Type Description
    Double

    Length

    Declaration
    public double Length { get; }
    Property Value
    Type Description
    Double

    LengthL1

    Declaration
    public double LengthL1 { get; }
    Property Value
    Type Description
    Double

    LengthSquared

    Declaration
    public double LengthSquared { get; }
    Property Value
    Type Description
    Double

    Max

    Declaration
    public double Max { get; }
    Property Value
    Type Description
    Double

    MaxAbs

    Declaration
    public double MaxAbs { get; }
    Property Value
    Type Description
    Double

    Min

    Declaration
    public double Min { get; }
    Property Value
    Type Description
    Double

    MinAbs

    Declaration
    public double MinAbs { get; }
    Property Value
    Type Description
    Double

    Normalized

    Declaration
    public Vector3d Normalized { get; }
    Property Value
    Type Description
    Vector3d

    xy

    Declaration
    public Vector2d xy { get; set; }
    Property Value
    Type Description
    Vector2d

    xz

    Declaration
    public Vector2d xz { get; set; }
    Property Value
    Type Description
    Vector2d

    yz

    Declaration
    public Vector2d yz { get; set; }
    Property Value
    Type Description
    Vector2d

    Methods

    Add(Vector3d)

    Declaration
    public void Add(Vector3d o)
    Parameters
    Type Name Description
    Vector3d o

    AngleD(Vector3d)

    Declaration
    public double AngleD(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    AngleD(Vector3d, Vector3d)

    Declaration
    public static double AngleD(Vector3d v1, Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v1
    Vector3d v2
    Returns
    Type Description
    Double

    AngleR(Vector3d)

    Declaration
    public double AngleR(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    AngleR(Vector3d, Vector3d)

    Declaration
    public static double AngleR(Vector3d v1, Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v1
    Vector3d v2
    Returns
    Type Description
    Double

    CompareTo(Vector3d)

    Declaration
    public int CompareTo(Vector3d other)
    Parameters
    Type Name Description
    Vector3d other
    Returns
    Type Description
    Int32

    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
    Type Name Description
    Int32 numInputs
    Vector3d v0
    Vector3d v1
    Vector3d v2
    Returns
    Type Description
    Double

    Cross(Vector3d)

    Declaration
    public Vector3d Cross(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Vector3d

    Cross(Vector3d, Vector3d)

    Declaration
    public static Vector3d Cross(Vector3d v1, Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v1
    Vector3d v2
    Returns
    Type Description
    Vector3d

    Cross(ref Vector3d)

    Declaration
    public Vector3d Cross(ref Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Vector3d

    Distance(Vector3d)

    Declaration
    public double Distance(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    Distance(ref Vector3d)

    Declaration
    public double Distance(ref Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    DistanceSquared(Vector3d)

    Declaration
    public double DistanceSquared(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    DistanceSquared(ref Vector3d)

    Declaration
    public double DistanceSquared(ref Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    Dot(Vector3d)

    Declaration
    public double Dot(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    Dot(Vector3d, Vector3d)

    Declaration
    public static double Dot(Vector3d v1, Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v1
    Vector3d v2
    Returns
    Type Description
    Double

    Dot(ref Vector3d)

    Declaration
    public double Dot(ref Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Double

    EpsilonEqual(Vector3d, Double)

    Declaration
    public bool EpsilonEqual(Vector3d v2, double epsilon)
    Parameters
    Type Name Description
    Vector3d v2
    Double epsilon
    Returns
    Type Description
    Boolean

    Equals(Vector3d)

    Declaration
    public bool Equals(Vector3d other)
    Parameters
    Type Name Description
    Vector3d other
    Returns
    Type Description
    Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)

    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
    Type Name Description
    Vector3d u
    Vector3d v
    Vector3d w

    GetHashCode()

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

    Lerp(Vector3d, Vector3d, Double)

    Declaration
    public static Vector3d Lerp(Vector3d a, Vector3d b, double t)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Double t
    Returns
    Type Description
    Vector3d

    Lerp(ref Vector3d, ref Vector3d, Double)

    Declaration
    public static Vector3d Lerp(ref Vector3d a, ref Vector3d b, double t)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Double t
    Returns
    Type Description
    Vector3d

    MakePerpVectors(ref Vector3d, out Vector3d, out Vector3d)

    Returns two vectors perpendicular to n, as efficiently as possible. Duff et all method, from https://graphics.pixar.com/library/OrthonormalB/paper.pdf

    Declaration
    public static void MakePerpVectors(ref Vector3d n, out Vector3d b1, out Vector3d b2)
    Parameters
    Type Name Description
    Vector3d n
    Vector3d b1
    Vector3d b2

    Normalize(Double)

    Declaration
    public double Normalize(double epsilon = 2.2204460492503131E-16)
    Parameters
    Type Name Description
    Double epsilon
    Returns
    Type Description
    Double

    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
    Type Name Description
    Vector3d u
    Vector3d v
    Vector3d w
    Returns
    Type Description
    Double

    Round(Int32)

    Declaration
    public void Round(int nDecimals)
    Parameters
    Type Name Description
    Int32 nDecimals

    Set(Vector3d)

    Declaration
    public void Set(Vector3d o)
    Parameters
    Type Name Description
    Vector3d o

    Set(Double, Double, Double)

    Declaration
    public void Set(double fX, double fY, double fZ)
    Parameters
    Type Name Description
    Double fX
    Double fY
    Double fZ

    Subtract(Vector3d)

    Declaration
    public void Subtract(Vector3d o)
    Parameters
    Type Name Description
    Vector3d o

    ToString()

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

    ToString(String)

    Declaration
    public string ToString(string fmt)
    Parameters
    Type Name Description
    String fmt
    Returns
    Type Description
    String

    UnitCross(Vector3d)

    Declaration
    public Vector3d UnitCross(Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Vector3d

    UnitCross(ref Vector3d)

    Declaration
    public Vector3d UnitCross(ref Vector3d v2)
    Parameters
    Type Name Description
    Vector3d v2
    Returns
    Type Description
    Vector3d

    Operators

    Addition(Vector3d, Vector3d)

    Declaration
    public static Vector3d operator +(Vector3d v0, Vector3d v1)
    Parameters
    Type Name Description
    Vector3d v0
    Vector3d v1
    Returns
    Type Description
    Vector3d

    Addition(Vector3d, Double)

    Declaration
    public static Vector3d operator +(Vector3d v0, double f)
    Parameters
    Type Name Description
    Vector3d v0
    Double f
    Returns
    Type Description
    Vector3d

    Division(Vector3d, Vector3d)

    Declaration
    public static Vector3d operator /(Vector3d a, Vector3d b)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Returns
    Type Description
    Vector3d

    Division(Vector3d, Double)

    Declaration
    public static Vector3d operator /(Vector3d v, double f)
    Parameters
    Type Name Description
    Vector3d v
    Double f
    Returns
    Type Description
    Vector3d

    Division(Double, Vector3d)

    Declaration
    public static Vector3d operator /(double f, Vector3d v)
    Parameters
    Type Name Description
    Double f
    Vector3d v
    Returns
    Type Description
    Vector3d

    Equality(Vector3d, Vector3d)

    Declaration
    public static bool operator ==(Vector3d a, Vector3d b)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Returns
    Type Description
    Boolean

    Explicit(Vector3d to Vector3f)

    Declaration
    public static explicit operator Vector3f(Vector3d v)
    Parameters
    Type Name Description
    Vector3d v
    Returns
    Type Description
    Vector3f

    Implicit(Vector3f to Vector3d)

    Declaration
    public static implicit operator Vector3d(Vector3f v)
    Parameters
    Type Name Description
    Vector3f v
    Returns
    Type Description
    Vector3d

    Inequality(Vector3d, Vector3d)

    Declaration
    public static bool operator !=(Vector3d a, Vector3d b)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Returns
    Type Description
    Boolean

    Multiply(Vector3d, Vector3d)

    Declaration
    public static Vector3d operator *(Vector3d a, Vector3d b)
    Parameters
    Type Name Description
    Vector3d a
    Vector3d b
    Returns
    Type Description
    Vector3d

    Multiply(Vector3d, Double)

    Declaration
    public static Vector3d operator *(Vector3d v, double f)
    Parameters
    Type Name Description
    Vector3d v
    Double f
    Returns
    Type Description
    Vector3d

    Multiply(Double, Vector3d)

    Declaration
    public static Vector3d operator *(double f, Vector3d v)
    Parameters
    Type Name Description
    Double f
    Vector3d v
    Returns
    Type Description
    Vector3d

    Subtraction(Vector3d, Vector3d)

    Declaration
    public static Vector3d operator -(Vector3d v0, Vector3d v1)
    Parameters
    Type Name Description
    Vector3d v0
    Vector3d v1
    Returns
    Type Description
    Vector3d

    Subtraction(Vector3d, Double)

    Declaration
    public static Vector3d operator -(Vector3d v0, double f)
    Parameters
    Type Name Description
    Vector3d v0
    Double f
    Returns
    Type Description
    Vector3d

    UnaryNegation(Vector3d)

    Declaration
    public static Vector3d operator -(Vector3d v)
    Parameters
    Type Name Description
    Vector3d v
    Returns
    Type Description
    Vector3d

    Implements

    System.IComparable<T>
    System.IEquatable<T>
    In This Article
    Back to top ViRGIS VR GIS