.NET SDK Documentation

    Show / Hide Table of Contents

    Struct Vector3

    Represents a 3D Vector (type/units aren't specified)

    Implements
    IEquatable<Vector3>
    Namespace: Anki.Vector.Types
    Assembly: Anki.Vector.dll
    Syntax
    public struct Vector3 : IEquatable<Vector3>

    Constructors

    | Improve this Doc View Source

    Vector3(Single, Single, Single)

    Initializes a new instance of the Vector3 struct.

    public Vector3(float x, float y, float z)
    Parameters
    Type Name Description
    Single x

    The x.

    Single y

    The y.

    Single z

    The z.

    Properties

    | Improve this Doc View Source

    Magnitude

    Gets the magnitude.

    public float Magnitude { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Normalized

    Gets the normalized version of this instance with the same direction and unit magnitude.

    public Vector3 Normalized { get; }
    Property Type
    Vector3
    | Improve this Doc View Source

    X

    Gets the x component

    public float X { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Y

    Gets the y component

    public float Y { get; }
    Property Type
    Single
    | Improve this Doc View Source

    Z

    Gets the z component

    public float Z { get; }
    Property Type
    Single

    Methods

    | Improve this Doc View Source

    Cross(Vector3)

    Return the cross product of this instance with another Vector3

    public Vector3 Cross(Vector3 other)
    Parameters
    Type Name Description
    Vector3 other

    The other.

    Returns
    Type Description
    Vector3

    The cross product

    | Improve this Doc View Source

    Dot(Vector3)

    Return the dots product of this instance with another Vector3

    public float Dot(Vector3 other)
    Parameters
    Type Name Description
    Vector3 other

    The other.

    Returns
    Type Description
    Single

    The dot product

    | Improve this Doc View Source

    Equals(Vector3)

    Indicates whether the current object is equal to another object of the same type.

    public bool Equals(Vector3 other)
    Parameters
    Type Name Description
    Vector3 other

    An object to compare with this object.

    Returns
    Type Description
    Boolean

    true if the current object is equal to the other parameter; otherwise, false.

    | Improve this Doc View Source

    Equals(Object)

    Determines whether the specified Object, is equal to this instance.

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

    The Object to compare with this instance.

    Returns
    Type Description
    Boolean

    true if the specified Object is equal to this instance; otherwise, false.

    Overrides
    ValueType.Equals(Object)
    | Improve this Doc View Source

    GetHashCode()

    Returns a hash code for this instance.

    public override int GetHashCode()
    Returns
    Type Description
    Int32

    A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.

    Overrides
    ValueType.GetHashCode()
    | Improve this Doc View Source

    ToString()

    Converts to string.

    public override string ToString()
    Returns
    Type Description
    String

    A String that represents this instance.

    Overrides
    ValueType.ToString()

    Operators

    | Improve this Doc View Source

    Addition(Vector3, Vector3)

    Implements the addition operator.

    public static Vector3 operator +(Vector3 lhs, Vector3 rhs)
    Parameters
    Type Name Description
    Vector3 lhs

    The left value.

    Vector3 rhs

    The right value.

    Returns
    Type Description
    Vector3

    Sum of 2 instances

    | Improve this Doc View Source

    Division(Vector3, Int32)

    Implements the division operator.

    public static Vector3 operator /(Vector3 vector, int value)
    Parameters
    Type Name Description
    Vector3 vector

    The Vector.

    Int32 value

    The value to divide by

    Returns
    Type Description
    Vector3

    The Vector divided by the value

    | Improve this Doc View Source

    Division(Vector3, Single)

    Implements the division operator.

    public static Vector3 operator /(Vector3 vector, float value)
    Parameters
    Type Name Description
    Vector3 vector

    The Vector.

    Single value

    The value to divide by

    Returns
    Type Description
    Vector3

    The Vector divided by the value

    | Improve this Doc View Source

    Equality(Vector3, Vector3)

    Implements the operator ==.

    public static bool operator ==(Vector3 lhs, Vector3 rhs)
    Parameters
    Type Name Description
    Vector3 lhs

    The LHS.

    Vector3 rhs

    The RHS.

    Returns
    Type Description
    Boolean

    The result of the operator.

    | Improve this Doc View Source

    Inequality(Vector3, Vector3)

    Implements the operator !=.

    public static bool operator !=(Vector3 lhs, Vector3 rhs)
    Parameters
    Type Name Description
    Vector3 lhs

    The LHS.

    Vector3 rhs

    The RHS.

    Returns
    Type Description
    Boolean

    The result of the operator.

    | Improve this Doc View Source

    Multiply(Vector3, Int32)

    Implements the multiplication operator.

    public static Vector3 operator *(Vector3 vector, int value)
    Parameters
    Type Name Description
    Vector3 vector

    The Vector.

    Int32 value

    The value to multiply by

    Returns
    Type Description
    Vector3

    The Vector multiplied by the value

    | Improve this Doc View Source

    Multiply(Vector3, Single)

    Implements the multiplication operator.

    public static Vector3 operator *(Vector3 vector, float value)
    Parameters
    Type Name Description
    Vector3 vector

    The Vector.

    Single value

    The value to multiply by

    Returns
    Type Description
    Vector3

    The Vector multiplied by the value

    | Improve this Doc View Source

    Subtraction(Vector3, Vector3)

    Implements the subtraction operator.

    public static Vector3 operator -(Vector3 lhs, Vector3 rhs)
    Parameters
    Type Name Description
    Vector3 lhs

    The left value.

    Vector3 rhs

    The right value.

    Returns
    Type Description
    Vector3

    Difference of 2 instances

    Implements

    System.IEquatable<T>
    • Improve this Doc
    • View Source
    Back to top Copyright (c) 2019 by Wayne Venables