Urho.IntVector2 Structure

Represents a 2D vector using two single-precision inting-point numbers.

See Also: IntVector2

Syntax

public struct IntVector2 : IEquatable<IntVector2>

Remarks

The IntVector2 structure is suitable for interoperation with unmanaged code requiring two consecutive ints.

Requirements

Namespace: Urho
Assembly: Urho (in Urho.dll)
Assembly Versions: 1.0.0.0

The members of Urho.IntVector2 are listed below.

See Also: ValueType

Public Constructors

Constructs a new IntVector2 from the given IntVector2.
Constructs a new IntVector2 from the given Vector2.
Constructs a new IntVector2.

Public Fields

static readonly
OneIntVector2. Defines an instance with all components set to 1.
static readonly
SizeInBytesInt32. Defines the size of the IntVector2 struct in bytes.
static readonly
UnitXIntVector2. Defines a unit-length IntVector2 that points towards the X-axis.
static readonly
UnitYIntVector2. Defines a unit-length IntVector2 that points towards the Y-axis.
XInt32. The X component of the IntVector2.
YInt32. The Y component of the IntVector2.
static readonly
ZeroIntVector2. Defines a zero-length IntVector2.

Public Properties

[read-only]
IsEmptyBoolean. Determines if the vector is zero.
[read-only]
LengthInt32. Gets the length (magnitude) of the vector.
[read-only]
LengthFastInt32. Gets an approximation of the vector length (magnitude).
[read-only]
LengthSquaredInt32. Gets the square of the vector length (magnitude).
[read-only]
PerpendicularLeftIntVector2. Gets the perpendicular vector on the left side of this vector.
[read-only]
PerpendicularRightIntVector2. Gets the perpendicular vector on the right side of this vector.

Public Methods

Add(IntVector2)
Add the Vector passed as parameter to this instance.
Add(ref IntVector2)
Add the Vector passed as parameter to this instance.
static
Add(IntVector2, IntVector2) : IntVector2
Adds two vectors.
static
Add(ref IntVector2, ref IntVector2, out IntVector2)
Adds two vectors.
static
BaryCentric(IntVector2, IntVector2, IntVector2, Int32, Int32) : IntVector2
Interpolate 3 Vectors using Barycentric coordinates
static
BaryCentric(ref IntVector2, ref IntVector2, ref IntVector2, Int32, Int32, out IntVector2)
Interpolate 3 Vectors using Barycentric coordinates
static
Clamp(IntVector2, IntVector2, IntVector2) : IntVector2
Clamp a vector to the given minimum and maximum vectors
static
Clamp(ref IntVector2, ref IntVector2, ref IntVector2, out IntVector2)
Clamp a vector to the given minimum and maximum vectors
static
ComponentMax(IntVector2, IntVector2) : IntVector2
Calculate the component-wise maximum of two vectors
static
ComponentMax(ref IntVector2, ref IntVector2, out IntVector2)
Calculate the component-wise maximum of two vectors
static
ComponentMin(IntVector2, IntVector2) : IntVector2
Calculate the component-wise minimum of two vectors
static
ComponentMin(ref IntVector2, ref IntVector2, out IntVector2)
Calculate the component-wise minimum of two vectors
static
Distance(IntVector2, IntVector2) : Single
Div(Int32)
Divide this instance by a scalar.
static
Divide(IntVector2, Int32) : IntVector2
Divides a vector by a scalar.
static
Divide(IntVector2, IntVector2) : IntVector2
Divides a vector by the components of a vector (scale).
static
Divide(ref IntVector2, Int32, out IntVector2)
Divides a vector by a scalar.
static
Divide(ref IntVector2, ref IntVector2, out IntVector2)
Divide a vector by the components of a vector (scale).
static
Dot(IntVector2, IntVector2) : Int32
Calculate the dot (scalar) product of two vectors
static
Dot(ref IntVector2, ref IntVector2, out Int32)
Calculate the dot (scalar) product of two vectors
override
Equals(Object) : Boolean
Indicates whether this instance and a specified object are equal.
Equals(IntVector2) : Boolean
Indicates whether the current vector is equal to another vector.
override
GetHashCode() : Int32
Returns the hashcode for this instance.
static
Lerp(IntVector2, IntVector2, Int32) : IntVector2
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Lerp(ref IntVector2, ref IntVector2, Int32, out IntVector2)
Returns a new Vector that is the linear blend of the 2 given Vectors
static
Max(IntVector2, IntVector2) : IntVector2
Returns the Vector3 with the minimum magnitude
static
Min(IntVector2, IntVector2) : IntVector2
Returns the Vector3 with the minimum magnitude
Mult(Int32)
Multiply this instance by a scalar.
static
Multiply(IntVector2, Int32) : IntVector2
Multiplies a vector by a scalar.
static
Multiply(IntVector2, IntVector2) : IntVector2
Multiplies a vector by the components a vector (scale).
static
Multiply(ref IntVector2, Int32, out IntVector2)
Multiplies a vector by a scalar.
static
Multiply(ref IntVector2, ref IntVector2, out IntVector2)
Multiplies a vector by the components of a vector (scale).
Normalize()
Scales the IntVector2 to unit length.
static
Normalize(IntVector2) : IntVector2
Scale a vector to unit length
static
Normalize(ref IntVector2, out IntVector2)
Scale a vector to unit length
NormalizeFast()
Scales the IntVector2 to approximately unit length.
static
NormalizeFast(IntVector2) : IntVector2
Scale a vector to approximately unit length
static
NormalizeFast(ref IntVector2, out IntVector2)
Scale a vector to approximately unit length
Scale(IntVector2)
Scales this instance by the given parameter.
Scale(ref IntVector2)
Scales this instance by the given parameter.
Scale(Int32, Int32)
Scales the current IntVector2 by the given amounts.
Sub(IntVector2)
Subtract the Vector passed as parameter from this instance.
Sub(ref IntVector2)
Subtract the Vector passed as parameter from this instance.
static
Subtract(IntVector2, IntVector2) : IntVector2
Subtract one Vector from another
static
Subtract(ref IntVector2, ref IntVector2, out IntVector2)
Subtract one Vector from another
override
ToString() : String
Returns a System.String that represents the current IntVector2.

Public Operators

static
Addition(IntVector2, IntVector2) Adds the specified instances.
static
Division(IntVector2, Int32) Divides the specified instance by a scalar.
static
Equality(IntVector2, IntVector2) Compares the specified instances for equality.
static
Inequality(IntVector2, IntVector2) Compares the specified instances for inequality.
static
Multiply(Int32, IntVector2) Multiplies the specified instance by a scalar.
static
Multiply(IntVector2, Int32) Multiplies the specified instance by a scalar.
static
Subtraction(IntVector2, IntVector2) Subtracts the specified instances.
static
UnaryNegation Negates the specified instance.