Struct Vect

    Definition

    Namespace:
    Tizen.NUI.Physics2D.Chipmunk
    Assembly:
    Tizen.NUI.Physics2D.dll

    2D Vector struct

    public struct Vect : IEquatable<Vect>
    Implements
    IEquatable<><Vect>

    Constructors

    View Source

    Vect(double, double)

    Create a vector.

    Declaration
    public Vect(double x, double y)
    Parameters
    Type Name Description
    double x
    double y

    Properties

    View Source

    Perpendicurlar

    Returns a perpendicular vector (-90 degree rotation).

    Declaration
    public Vect Perpendicurlar { get; }
    Property Value
    Type Description
    Vect
    View Source

    X

    X value

    Declaration
    public double X { get; set; }
    Property Value
    Type Description
    double
    View Source

    Y

    Y value

    Declaration
    public double Y { get; set; }
    Property Value
    Type Description
    double
    View Source

    Zero

    (0, 0) Vector.

    Declaration
    public static Vect Zero { get; }
    Property Value
    Type Description
    Vect

    Methods

    View Source

    Clamp(double)

    Clamp the magnitude to the given length.

    Declaration
    public Vect Clamp(double length)
    Parameters
    Type Name Description
    double length
    Returns
    Type Description
    Vect
    View Source

    Cross(Vect)

    2D vector cross product analog. The cross product of 2D vectors results in a 3D vector with only a z component. This function returns the magnitude of the z value.

    Declaration
    public double Cross(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    double
    View Source

    Distance(Vect)

    Return the distance between this and v2.

    Declaration
    public double Distance(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    double
    View Source

    DistanceSquare(Vect)

    Return the squared distance between current position and v2. Faster than Distance(Vect) when you only need to compare distances.

    Declaration
    public double DistanceSquare(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    double
    View Source

    Dot(Vect)

    Vector dot product.

    Declaration
    public double Dot(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    double
    View Source

    Equals(object)

    Return true if both objects are within of each other.

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    View Source

    Equals(Vect)

    Return true if both objects are within of each other.

    Declaration
    public bool Equals(Vect other)
    Parameters
    Type Name Description
    Vect other
    Returns
    Type Description
    bool
    View Source

    ForAngle(double)

    Returns the unit length vector for the given angle (in radians).

    Declaration
    public static Vect ForAngle(double angle)
    Parameters
    Type Name Description
    double angle
    Returns
    Type Description
    Vect
    View Source

    GetHashCode()

    Get the hash code.

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    int
    View Source

    Length()

    Returns the length of v.

    Declaration
    public double Length()
    Returns
    Type Description
    double
    View Source

    LengthSquared()

    Returns the squared length of v. Faster than Length() when you only need to compare lengths.

    Declaration
    public double LengthSquared()
    Returns
    Type Description
    double
    View Source

    Lerp(Vect, double)

    Linearly interpolate between this and v2.

    Declaration
    public Vect Lerp(Vect v2, double t)
    Parameters
    Type Name Description
    Vect v2
    double t
    Returns
    Type Description
    Vect
    View Source

    LerpConst(Vect, double)

    Linearly interpolate between the current position towards v2 by distance d.

    Declaration
    public Vect LerpConst(Vect v2, double d)
    Parameters
    Type Name Description
    Vect v2
    double d
    Returns
    Type Description
    Vect
    View Source

    Near(Vect, double)

    Return true if the distance between current position and v2 is less than distance.

    Declaration
    public bool Near(Vect v2, double distance)
    Parameters
    Type Name Description
    Vect v2
    double distance
    Returns
    Type Description
    bool
    View Source

    Normalize()

    Returns a normalized copy.

    Declaration
    public Vect Normalize()
    Returns
    Type Description
    Vect
    View Source

    Project(Vect)

    Returns the vector projection of v1 onto v2.

    Declaration
    public Vect Project(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    Vect
    View Source

    Rotate(Vect)

    Uses complex number multiplication to rotate v1 by v2. Scaling will occur if v1 is not a unit vector.

    Declaration
    public Vect Rotate(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    Vect
    View Source

    SLerp(Vect, double)

    Spherical linear interpolation between current position and v2 based on t.

    Declaration
    public Vect SLerp(Vect v2, double t)
    Parameters
    Type Name Description
    Vect v2
    double t
    Returns
    Type Description
    Vect
    View Source

    SLerpConst(Vect, double)

    Spherical linear interpolation between current position towards v2 by no more than angle a radians.

    Declaration
    public Vect SLerpConst(Vect v2, double a)
    Parameters
    Type Name Description
    Vect v2
    double a
    Returns
    Type Description
    Vect
    View Source

    ToAngle()

    Returns the angular direction v is pointing in (in radians).

    Declaration
    public double ToAngle()
    Returns
    Type Description
    double
    View Source

    ToString()

    Return a string formatted like "(x,y)".

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    View Source

    Unrotate(Vect)

    Inverse of Rotate().

    Declaration
    public Vect Unrotate(Vect v2)
    Parameters
    Type Name Description
    Vect v2
    Returns
    Type Description
    Vect

    Operators

    View Source

    operator +(Vect, Vect)

    Add two vectors.

    Declaration
    public static Vect operator +(Vect a, Vect b)
    Parameters
    Type Name Description
    Vect a
    Vect b
    Returns
    Type Description
    Vect
    View Source

    operator /(double, Vect)

    Scalar division.

    Declaration
    public static Vect operator /(double s, Vect a)
    Parameters
    Type Name Description
    double s
    Vect a
    Returns
    Type Description
    Vect
    View Source

    operator /(Vect, double)

    Scalar division.

    Declaration
    public static Vect operator /(Vect a, double s)
    Parameters
    Type Name Description
    Vect a
    double s
    Returns
    Type Description
    Vect
    View Source

    operator ==(Vect, Vect)

    Return true if both objects are within of each other.

    Declaration
    public static bool operator ==(Vect a, Vect b)
    Parameters
    Type Name Description
    Vect a
    Vect b
    Returns
    Type Description
    bool
    View Source

    operator !=(Vect, Vect)

    Return true if both objects are not within of each other.

    Declaration
    public static bool operator !=(Vect a, Vect b)
    Parameters
    Type Name Description
    Vect a
    Vect b
    Returns
    Type Description
    bool
    View Source

    operator *(double, Vect)

    Scalar multiplication.

    Declaration
    public static Vect operator *(double s, Vect a)
    Parameters
    Type Name Description
    double s
    Vect a
    Returns
    Type Description
    Vect
    View Source

    operator *(Vect, double)

    Scalar multiplication.

    Declaration
    public static Vect operator *(Vect a, double s)
    Parameters
    Type Name Description
    Vect a
    double s
    Returns
    Type Description
    Vect
    View Source

    operator -(Vect, Vect)

    Subtract two vectors.

    Declaration
    public static Vect operator -(Vect a, Vect b)
    Parameters
    Type Name Description
    Vect a
    Vect b
    Returns
    Type Description
    Vect
    View Source

    operator -(Vect)

    Negate a vector.

    Declaration
    public static Vect operator -(Vect a)
    Parameters
    Type Name Description
    Vect a
    Returns
    Type Description
    Vect

    Implements

    IEquatable<>

    Extension Methods

    EXamlExtensions.LoadFromEXamlByRelativePath<T>(T, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, string)
    Extensions.LoadFromXaml<TXaml>(TXaml, Type)
    Extensions.LoadFromXamlFile<TXaml>(TXaml, string)
    • View Source
    Back to top Copyright © 2016-2025 Samsung
    Generated by DocFX