Class Position
Definition
- Namespace:
- Tizen.NUI
- Assembly:
- Tizen.NUI.dll
- API Level:
- 3
Position is a three-dimensional vector.
public class Position : Disposable, IDisposable, ICloneable
- Inheritance
- Implements
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.
API Level: 3
View SourcePosition(Single, Single, Single)
The constructor.
Declaration
public Position(float x, float y, float z = 0F)
Parameters
Type | Name | Description |
---|---|---|
Single | x | The x component. |
Single | y | The y component. |
Single | 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.
API Level: 3
View SourcePosition(Position2D)
The constructor.
Declaration
public Position(Position2D position2d)
Parameters
Type | Name | Description |
---|---|---|
Position2D | position2d | Position2D to create this vector from. |
API Level: 3
Properties
View SourceItem[UInt32]
The const array subscript operator overload. Should be 0, 1, or 2.
Declaration
public float this[uint index] { get; }
Parameters
Type | Name | Description |
---|---|---|
UInt32 | index | The subscript index. |
Property Value
Type | Description |
---|---|
Single | The float at the given index. |
API Level: 3
View SourceOne
Constant ( 1.0f, 1.0f, 1.0f ).
Declaration
public static Position One { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginBottom
ParentOrigin constants. It's 1.0.
Declaration
public static float ParentOriginBottom { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourceParentOriginBottomCenter
ParentOrigin constants: 0.5, 1.0, 0.5.
Declaration
public static Position ParentOriginBottomCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginBottomLeft
ParentOrigin constants: 0.0f, 1.0f, 0.5f.
Declaration
public static Position ParentOriginBottomLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginBottomRight
ParentOrigin constants: 1.0, 1.0, 0.5.
Declaration
public static Position ParentOriginBottomRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginCenter
ParentOrigin constants: 0.0, 0.5, 0.5
Declaration
public static Position ParentOriginCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginCenterLeft
ParentOrigin constants: 0.0, 0.5, 0.5.
Declaration
public static Position ParentOriginCenterLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginCenterRight
ParentOrigin constants: 1.0, 0.5, 0.5.
Declaration
public static Position ParentOriginCenterRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginLeft
ParentOrigin constants. It's 0.0.
Declaration
public static float ParentOriginLeft { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourceParentOriginMiddle
ParentOrigin constants. It's 0.5.
Declaration
public static float ParentOriginMiddle { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourceParentOriginRight
ParentOrigin constants. It's 1.0.
Declaration
public static float ParentOriginRight { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourceParentOriginTop
ParentOrigin constants. It's 0.0.
Declaration
public static float ParentOriginTop { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourceParentOriginTopCenter
ParentOrigin constants: 0.5, 0.0, 0.5.
Declaration
public static Position ParentOriginTopCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginTopLeft
ParentOrigin constants: 0.0, 0.0, 0.5.
Declaration
public static Position ParentOriginTopLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceParentOriginTopRight
ParentOrigin constants: 1.0, 0.0, 0.5.
Declaration
public static Position ParentOriginTopRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointBottom
PivotPoint constants: 1.0.
Declaration
public static float PivotPointBottom { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourcePivotPointBottomCenter
PivotPoint constants: 0.5, 1.0, 0.5
Declaration
public static Position PivotPointBottomCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointBottomLeft
PivotPoint constants: 0.0, 1.0, 0.5.
Declaration
public static Position PivotPointBottomLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointBottomRight
PivotPoint constants: 1.0, 1.0, 0.5.
Declaration
public static Position PivotPointBottomRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointCenter
PivotPoint constants: 0.5, 0.5, 0.5.
Declaration
public static Position PivotPointCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointCenterLeft
PivotPoint constants: 0.0, 0.5, 0.5.
Declaration
public static Position PivotPointCenterLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointCenterRight
PivotPoint constants: 1.0, 0.5, 0.5.
Declaration
public static Position PivotPointCenterRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointLeft
PivotPoint constants: 0.0.
Declaration
public static float PivotPointLeft { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourcePivotPointMiddle
PivotPoint constants: 0.5.
Declaration
public static float PivotPointMiddle { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourcePivotPointRight
PivotPoint constants: 1.0.
Declaration
public static float PivotPointRight { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourcePivotPointTop
PivotPoint constants: 0.0.
Declaration
public static float PivotPointTop { get; }
Property Value
Type | Description |
---|---|
Single |
API Level: 3
View SourcePivotPointTopCenter
PivotPoint constants: 0.5, 0.0, 0.5.
Declaration
public static Position PivotPointTopCenter { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointTopLeft
PivotPoint constants: 0.0, 0.0, 0.5.
Declaration
public static Position PivotPointTopLeft { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourcePivotPointTopRight
PivotPoint constants: 1.0, 0.0, 0.5.
Declaration
public static Position PivotPointTopRight { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
View SourceX
The x component.
Declaration
public float X { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Position(...) constructor.
API Level: 3
View SourceY
The y component.
Declaration
public float Y { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Position(...) constructor.
API Level: 3
View SourceZ
The z component.
Declaration
public float Z { get; set; }
Property Value
Type | Description |
---|---|
Single |
Remarks
The setter is deprecated in API8 and will be removed in API10. Please use new Position(...) constructor.
API Level: 3
View SourceZero
Constant ( 0.0f, 0.0f, 0.0f ).
Declaration
public static Position Zero { get; }
Property Value
Type | Description |
---|---|
Position |
API Level: 3
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 |
---|---|
Boolean | 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 |
---|---|
Boolean | Returns true if the two vectors are equal, otherwise false. |
API Level: 3
View SourceGetHashCode()
Gets the the hash code of this Position.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
Int32 | The Hash Code. |
Overrides
API Level: 6
View SourceNotEqualTo(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 |
---|---|
Boolean | Returns true if the two vectors are not equal, otherwise false. |
API Level: 3
Operators
View SourceAddition(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. |
API Level: 3
View SourceDivision(Position, Single)
The division operator.
Declaration
public static Position operator /(Position arg1, float arg2)
Parameters
Type | Name | Description |
---|---|---|
Position | arg1 | The vector to divide. |
Single | arg2 | The float value to scale the vector by. |
Returns
Type | Description |
---|---|
Position | The vector containing the result of scaling. |
API Level: 3
View SourceDivision(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. |
API Level: 3
View SourceImplicit(Position to Vector3)
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 |
API Level: 3
View SourceImplicit(Vector3 to Position)
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 |
API Level: 3
View SourceMultiply(Position, Single)
The multiplication operator.
Declaration
public static Position operator *(Position arg1, float arg2)
Parameters
Type | Name | Description |
---|---|---|
Position | arg1 | The vector to multiply |
Single | arg2 | The float value to scale the vector. |
Returns
Type | Description |
---|---|
Position | The vector containing the result of scaling. |
API Level: 3
View SourceMultiply(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. |
API Level: 3
View SourceSubtraction(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. |
API Level: 3
View SourceUnaryNegation(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. |