Class Position
Definition
- Assembly:
- Tizen.NUI.dll
Position is a three-dimensional vector.
public class Position : Disposable, IDisposable, ICloneable
- Inheritance
- Implements
-
System.IDisposableSystem.ICloneable
Constructors
View SourcePosition()
The constructor.
Declaration
public Position()
Remarks
Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
For example, the followings are possible.
view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost.
view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default.
Position(float, float, float)
The constructor.
Declaration
public Position(float x, float y, float z = 0)
Parameters
| Type | Name | Description |
|---|---|---|
| float | x | The x component. |
| float | y | The y component. |
| float | z | The z component(optional). |
Remarks
Position2D and Position are implicitly converted to each other, so these are compatible and can be replaced without any type casting.
For example, the followings are possible.
view.Position2D = new Position(10.0f, 10.0f, 10.0f); // be aware that here the z value(10.0f) will be lost.
view.Position = new Position2D(10, 10); // be aware that here the z value is 0.0f by default.
Position(Position2D)
The constructor.
Declaration
public Position(Position2D position2d)
Parameters
| Type | Name | Description |
|---|---|---|
| Position2D | position2d | Position2D to create this vector from. |
Properties
View Sourcethis[uint]
The const array subscript operator overload. Should be 0, 1, or 2.
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. |
One
Constant ( 1.0f, 1.0f, 1.0f ).
Declaration
public static Position One { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginBottom
ParentOrigin constants. It's 1.0.
Declaration
public static float ParentOriginBottom { get; }
Property Value
| Type | Description |
|---|---|
| float |
ParentOriginBottomCenter
ParentOrigin constants: 0.5, 1.0, 0.5.
Declaration
public static Position ParentOriginBottomCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginBottomLeft
ParentOrigin constants: 0.0f, 1.0f, 0.5f.
Declaration
public static Position ParentOriginBottomLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginBottomRight
ParentOrigin constants: 1.0, 1.0, 0.5.
Declaration
public static Position ParentOriginBottomRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginCenter
ParentOrigin constants: 0.0, 0.5, 0.5
Declaration
public static Position ParentOriginCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginCenterLeft
ParentOrigin constants: 0.0, 0.5, 0.5.
Declaration
public static Position ParentOriginCenterLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginCenterRight
ParentOrigin constants: 1.0, 0.5, 0.5.
Declaration
public static Position ParentOriginCenterRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginLeft
ParentOrigin constants. It's 0.0.
Declaration
public static float ParentOriginLeft { get; }
Property Value
| Type | Description |
|---|---|
| float |
ParentOriginMiddle
ParentOrigin constants. It's 0.5.
Declaration
public static float ParentOriginMiddle { get; }
Property Value
| Type | Description |
|---|---|
| float |
ParentOriginRight
ParentOrigin constants. It's 1.0.
Declaration
public static float ParentOriginRight { get; }
Property Value
| Type | Description |
|---|---|
| float |
ParentOriginTop
ParentOrigin constants. It's 0.0.
Declaration
public static float ParentOriginTop { get; }
Property Value
| Type | Description |
|---|---|
| float |
ParentOriginTopCenter
ParentOrigin constants: 0.5, 0.0, 0.5.
Declaration
public static Position ParentOriginTopCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginTopLeft
ParentOrigin constants: 0.0, 0.0, 0.5.
Declaration
public static Position ParentOriginTopLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
ParentOriginTopRight
ParentOrigin constants: 1.0, 0.0, 0.5.
Declaration
public static Position ParentOriginTopRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointBottom
PivotPoint constants: 1.0.
Declaration
public static float PivotPointBottom { get; }
Property Value
| Type | Description |
|---|---|
| float |
PivotPointBottomCenter
PivotPoint constants: 0.5, 1.0, 0.5
Declaration
public static Position PivotPointBottomCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointBottomLeft
PivotPoint constants: 0.0, 1.0, 0.5.
Declaration
public static Position PivotPointBottomLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointBottomRight
PivotPoint constants: 1.0, 1.0, 0.5.
Declaration
public static Position PivotPointBottomRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointCenter
PivotPoint constants: 0.5, 0.5, 0.5.
Declaration
public static Position PivotPointCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointCenterLeft
PivotPoint constants: 0.0, 0.5, 0.5.
Declaration
public static Position PivotPointCenterLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointCenterRight
PivotPoint constants: 1.0, 0.5, 0.5.
Declaration
public static Position PivotPointCenterRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointLeft
PivotPoint constants: 0.0.
Declaration
public static float PivotPointLeft { get; }
Property Value
| Type | Description |
|---|---|
| float |
PivotPointMiddle
PivotPoint constants: 0.5.
Declaration
public static float PivotPointMiddle { get; }
Property Value
| Type | Description |
|---|---|
| float |
PivotPointRight
PivotPoint constants: 1.0.
Declaration
public static float PivotPointRight { get; }
Property Value
| Type | Description |
|---|---|
| float |
PivotPointTop
PivotPoint constants: 0.0.
Declaration
public static float PivotPointTop { get; }
Property Value
| Type | Description |
|---|---|
| float |
PivotPointTopCenter
PivotPoint constants: 0.5, 0.0, 0.5.
Declaration
public static Position PivotPointTopCenter { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointTopLeft
PivotPoint constants: 0.0, 0.0, 0.5.
Declaration
public static Position PivotPointTopLeft { get; }
Property Value
| Type | Description |
|---|---|
| Position |
PivotPointTopRight
PivotPoint constants: 1.0, 0.0, 0.5.
Declaration
public static Position PivotPointTopRight { get; }
Property Value
| Type | Description |
|---|---|
| Position |
X
The x component.
Declaration
public float X { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.
Y
The y component.
Declaration
public float Y { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.
Z
The z component.
Declaration
public float Z { get; set; }
Property Value
| Type | Description |
|---|---|
| float |
Remarks
The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.
Zero
Constant ( 0.0f, 0.0f, 0.0f ).
Declaration
public static Position Zero { get; }
Property Value
| Type | Description |
|---|---|
| Position |
Methods
View SourceEquals(Object)
Determines whether the specified object is equal to the current object.
Declaration
public override bool Equals(Object obj)
Parameters
| Type | Name | Description |
|---|---|---|
| Tizen.System.Object | obj | The object to compare with the current object. |
Returns
| Type | Description |
|---|---|
| bool | true if the specified object is equal to the current object; otherwise, false. |
EqualTo(Position)
Compares if rhs is equal to.
Declaration
public bool EqualTo(Position rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | rhs | The vector to compare. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the two vectors are equal, otherwise false. |
GetHashCode()
Gets the hash code of this Position.
Declaration
public override int GetHashCode()
Returns
| Type | Description |
|---|---|
| int | The Hash Code. |
Overrides
NotEqualTo(Position)
Compares if rhs is not equal to.
Declaration
public bool NotEqualTo(Position rhs)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | rhs | The vector to compare. |
Returns
| Type | Description |
|---|---|
| bool | Returns true if the two vectors are not equal, otherwise false. |
Operators
View Sourceoperator +(Position, Position)
An addition operator.
Declaration
public static Position operator +(Position arg1, Position arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to add. |
| Position | arg2 | The vector to add. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of the addition. |
operator /(Position, float)
The division operator.
Declaration
public static Position operator /(Position arg1, float arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to divide. |
| float | arg2 | The float value to scale the vector by. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of scaling. |
operator /(Position, Position)
The division operator.
Declaration
public static Position operator /(Position arg1, Position arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to divide. |
| Position | arg2 | The vector to divide. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of the division. |
implicit operator Vector3(Position)
Converts a position instance to a Vector3 instance.
Declaration
public static implicit operator Vector3(Position position)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | position |
Returns
| Type | Description |
|---|---|
| Vector3 |
implicit operator Position(Vector3)
Converts a Vector3 instance to a position instance.
Declaration
public static implicit operator Position(Vector3 vec)
Parameters
| Type | Name | Description |
|---|---|---|
| Vector3 | vec |
Returns
| Type | Description |
|---|---|
| Position |
operator *(Position, float)
The multiplication operator.
Declaration
public static Position operator *(Position arg1, float arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to multiply |
| float | arg2 | The float value to scale the vector. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of scaling. |
operator *(Position, Position)
The multiplication operator.
Declaration
public static Position operator *(Position arg1, Position arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to multiply. |
| Position | arg2 | The vector to multiply. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of the multiplication. |
operator -(Position, Position)
The subtraction operator.
Declaration
public static Position operator -(Position arg1, Position arg2)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to subtract. |
| Position | arg2 | The vector to subtract. |
Returns
| Type | Description |
|---|---|
| Position | The vector containing the result of the subtraction. |
operator -(Position)
The unary negation operator.
Declaration
public static Position operator -(Position arg1)
Parameters
| Type | Name | Description |
|---|---|---|
| Position | arg1 | The vector to negate. |
Returns
| Type | Description |
|---|---|
| Position | The vector containg the negation. |