Class Position2D
Definition
- Assembly:
- Tizen.NUI.dll
Position2D is a two-dimensional vector.
public class Position2D : IDisposable
- Inheritance
-
objectPosition2D
- Implements
-
System.IDisposable
Constructors
View SourcePosition2D()
The constructor.
Declaration
public Position2D()
Position2D(int, int)
The constructor.
Declaration
public Position2D(int x, int y)
Parameters
Type | Name | Description |
---|---|---|
int | x | x component |
int | y | y component |
Position2D(Position)
The constructor.
Declaration
public Position2D(Position position)
Parameters
Type | Name | Description |
---|---|---|
Position | position | Position to create this vector from |
Fields
View Sourcedisposed
A Flat to check if it is already disposed.
Declaration
protected bool disposed
Field Value
Type | Description |
---|---|
bool |
swigCMemOwn
swigCMemOwn
Declaration
protected bool swigCMemOwn
Field Value
Type | Description |
---|---|
bool |
Properties
View Sourcethis[uint]
The const array subscript operator overload. Should be 0, or 1.
Declaration
public float this[uint index] { get; }
Parameters
Type | Name | Description |
---|---|---|
uint | index | The subscript index. |
Property Value
Type | Description |
---|---|
float | The float at the given index. |
X
The x component.
Declaration
public int X { get; set; }
Property Value
Type | Description |
---|---|
int |
Y
The y component.
Declaration
public int Y { get; set; }
Property Value
Type | Description |
---|---|
int |
Methods
View SourceDispose()
Dispose.
Declaration
public void Dispose()
Dispose(DisposeTypes)
Dispose.
Declaration
protected virtual void Dispose(DisposeTypes type)
Parameters
Type | Name | Description |
---|---|---|
DisposeTypes | type | The dispose type. |
EqualTo(Position2D)
Compares if the rhs is equal to.
Declaration
public bool EqualTo(Position2D rhs)
Parameters
Type | Name | Description |
---|---|---|
Position2D | rhs | The vector to compare |
Returns
Type | Description |
---|---|
bool | Returns true if the two vectors are equal, otherwise false |
~Position2D()
Dispose.
Declaration
protected ~Position2D()
NotEqualTo(Position2D)
Compares if the rhs is not equal to.
Declaration
public bool NotEqualTo(Position2D rhs)
Parameters
Type | Name | Description |
---|---|---|
Position2D | rhs | The vector to compare. |
Returns
Type | Description |
---|---|
bool | Returns true if the two vectors are not equal, otherwise false. |
Operators
View Sourceoperator +(Position2D, Position2D)
The addition operator.
Declaration
public static Position2D operator +(Position2D arg1, Position2D arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to add. |
Position2D | arg2 | The vector to add. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the addition. |
operator /(Position2D, int)
The division operator.
Declaration
public static Position2D operator /(Position2D arg1, int arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to divide. |
int | arg2 | The integer value to scale the vector by. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the division. |
operator /(Position2D, Position2D)
The division operator.
Declaration
public static Position2D operator /(Position2D arg1, Position2D arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to divide. |
Position2D | arg2 | The vector to divide. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the division. |
implicit operator Vector2(Position2D)
Converts a Position2D instance to a Vector2 instance.
Declaration
public static implicit operator Vector2(Position2D position2d)
Parameters
Type | Name | Description |
---|---|---|
Position2D | position2d | An object of the Position2D type. |
Returns
Type | Description |
---|---|
Vector2 | return an object of the Vector2 type |
implicit operator Position2D(Vector2)
Converts a Vector2 instance to a Position2D instance.
Declaration
public static implicit operator Position2D(Vector2 vec)
Parameters
Type | Name | Description |
---|---|---|
Vector2 | vec | An object of the Vector2 type. |
Returns
Type | Description |
---|---|
Position2D | return an object of the Position2D type |
operator *(Position2D, int)
The multiplication operator.
Declaration
public static Position2D operator *(Position2D arg1, int arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to multiply. |
int | arg2 | The integer value to scale the vector. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the multiplication. |
operator *(Position2D, Position2D)
The multiplication operator.
Declaration
public static Position2D operator *(Position2D arg1, Position2D arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to multiply. |
Position2D | arg2 | The vector to multiply. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the multiplication. |
operator -(Position2D, Position2D)
The subtraction operator.
Declaration
public static Position2D operator -(Position2D arg1, Position2D arg2)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to subtract. |
Position2D | arg2 | The vector to subtract. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the result of the subtraction. |
operator -(Position2D)
The unary negation operator.
Declaration
public static Position2D operator -(Position2D arg1)
Parameters
Type | Name | Description |
---|---|---|
Position2D | arg1 | The vector to negate. |
Returns
Type | Description |
---|---|
Position2D | The vector containing the negation. |