Class Position

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll
API Level:
3

Position is a three-dimensional vector.

C#
Copy
public class Position : Disposable, ICloneable
Inheritance
Position
Implements
ICloneable

Constructors

View Source

Position()

The constructor.

Declaration
C#
Copy
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 Source

Position(Single, Single, Single)

The constructor.

Declaration
C#
Copy
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 Source

Position(Position2D)

The constructor.

Declaration
C#
Copy
public Position(Position2D position2d)
Parameters
Type Name Description
Position2D position2d

Position2D to create this vector from.

API Level: 3

Properties

View Source

Item[UInt32]

The const array subscript operator overload. Should be 0, 1, or 2.

Declaration
C#
Copy
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 Source

One

Constant ( 1.0f, 1.0f, 1.0f ).

Declaration
C#
Copy
public static Position One { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginBottom

ParentOrigin constants. It's 1.0.

Declaration
C#
Copy
public static float ParentOriginBottom { get; }
Property Value
Type Description
Single
API Level: 3
View Source

ParentOriginBottomCenter

ParentOrigin constants: 0.5, 1.0, 0.5.

Declaration
C#
Copy
public static Position ParentOriginBottomCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginBottomLeft

ParentOrigin constants: 0.0f, 1.0f, 0.5f.

Declaration
C#
Copy
public static Position ParentOriginBottomLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginBottomRight

ParentOrigin constants: 1.0, 1.0, 0.5.

Declaration
C#
Copy
public static Position ParentOriginBottomRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginCenter

ParentOrigin constants: 0.0, 0.5, 0.5

Declaration
C#
Copy
public static Position ParentOriginCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginCenterLeft

ParentOrigin constants: 0.0, 0.5, 0.5.

Declaration
C#
Copy
public static Position ParentOriginCenterLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginCenterRight

ParentOrigin constants: 1.0, 0.5, 0.5.

Declaration
C#
Copy
public static Position ParentOriginCenterRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginLeft

ParentOrigin constants. It's 0.0.

Declaration
C#
Copy
public static float ParentOriginLeft { get; }
Property Value
Type Description
Single
API Level: 3
View Source

ParentOriginMiddle

ParentOrigin constants. It's 0.5.

Declaration
C#
Copy
public static float ParentOriginMiddle { get; }
Property Value
Type Description
Single
API Level: 3
View Source

ParentOriginRight

ParentOrigin constants. It's 1.0.

Declaration
C#
Copy
public static float ParentOriginRight { get; }
Property Value
Type Description
Single
API Level: 3
View Source

ParentOriginTop

ParentOrigin constants. It's 0.0.

Declaration
C#
Copy
public static float ParentOriginTop { get; }
Property Value
Type Description
Single
API Level: 3
View Source

ParentOriginTopCenter

ParentOrigin constants: 0.5, 0.0, 0.5.

Declaration
C#
Copy
public static Position ParentOriginTopCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginTopLeft

ParentOrigin constants: 0.0, 0.0, 0.5.

Declaration
C#
Copy
public static Position ParentOriginTopLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

ParentOriginTopRight

ParentOrigin constants: 1.0, 0.0, 0.5.

Declaration
C#
Copy
public static Position ParentOriginTopRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointBottom

PivotPoint constants: 1.0.

Declaration
C#
Copy
public static float PivotPointBottom { get; }
Property Value
Type Description
Single
API Level: 3
View Source

PivotPointBottomCenter

PivotPoint constants: 0.5, 1.0, 0.5

Declaration
C#
Copy
public static Position PivotPointBottomCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointBottomLeft

PivotPoint constants: 0.0, 1.0, 0.5.

Declaration
C#
Copy
public static Position PivotPointBottomLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointBottomRight

PivotPoint constants: 1.0, 1.0, 0.5.

Declaration
C#
Copy
public static Position PivotPointBottomRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointCenter

PivotPoint constants: 0.5, 0.5, 0.5.

Declaration
C#
Copy
public static Position PivotPointCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointCenterLeft

PivotPoint constants: 0.0, 0.5, 0.5.

Declaration
C#
Copy
public static Position PivotPointCenterLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointCenterRight

PivotPoint constants: 1.0, 0.5, 0.5.

Declaration
C#
Copy
public static Position PivotPointCenterRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointLeft

PivotPoint constants: 0.0.

Declaration
C#
Copy
public static float PivotPointLeft { get; }
Property Value
Type Description
Single
API Level: 3
View Source

PivotPointMiddle

PivotPoint constants: 0.5.

Declaration
C#
Copy
public static float PivotPointMiddle { get; }
Property Value
Type Description
Single
API Level: 3
View Source

PivotPointRight

PivotPoint constants: 1.0.

Declaration
C#
Copy
public static float PivotPointRight { get; }
Property Value
Type Description
Single
API Level: 3
View Source

PivotPointTop

PivotPoint constants: 0.0.

Declaration
C#
Copy
public static float PivotPointTop { get; }
Property Value
Type Description
Single
API Level: 3
View Source

PivotPointTopCenter

PivotPoint constants: 0.5, 0.0, 0.5.

Declaration
C#
Copy
public static Position PivotPointTopCenter { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointTopLeft

PivotPoint constants: 0.0, 0.0, 0.5.

Declaration
C#
Copy
public static Position PivotPointTopLeft { get; }
Property Value
Type Description
Position
API Level: 3
View Source

PivotPointTopRight

PivotPoint constants: 1.0, 0.0, 0.5.

Declaration
C#
Copy
public static Position PivotPointTopRight { get; }
Property Value
Type Description
Position
API Level: 3
View Source

X

The x component.

Declaration
C#
Copy
public float X { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.

API Level: 3
View Source

Y

The y component.

Declaration
C#
Copy
public float Y { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.

API Level: 3
View Source

Z

The z component.

Declaration
C#
Copy
public float Z { get; set; }
Property Value
Type Description
Single
Remarks

The setter is deprecated in API8 and will be removed in API10. Use new Position(...) constructor.

API Level: 3
View Source

Zero

Constant ( 0.0f, 0.0f, 0.0f ).

Declaration
C#
Copy
public static Position Zero { get; }
Property Value
Type Description
Position
API Level: 3

Methods

View Source

Clone()

Declaration
C#
Copy
public object Clone()
Returns
Type Description
Object
View Source

Equals(Object)

Determines whether the specified object is equal to the current object.

Declaration
C#
Copy
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.

View Source

EqualTo(Position)

Compares if rhs is equal to.

Declaration
C#
Copy
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 Source

GetHashCode()

Gets the hash code of this Position.

Declaration
C#
Copy
public override int GetHashCode()
Returns
Type Description
Int32

The Hash Code.

API Level: 6
View Source

NotEqualTo(Position)

Compares if rhs is not equal to.

Declaration
C#
Copy
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
View Source

ReleaseSwigCPtr(Runtime.InteropServices.HandleRef)

Declaration
C#
Copy
protected override void ReleaseSwigCPtr(Runtime.InteropServices.HandleRef swigCPtr)
Parameters
Type Name Description
Tizen.System.Runtime.InteropServices.HandleRef swigCPtr
Overrides

Operators

View Source

Addition(Position, Position)

An addition operator.

Declaration
C#
Copy
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 Source

Division(Position, Single)

The division operator.

Declaration
C#
Copy
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 Source

Division(Position, Position)

The division operator.

Declaration
C#
Copy
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 Source

Implicit(Position to Vector3)

Converts a position instance to a Vector3 instance.

Declaration
C#
Copy
public static implicit operator Vector3(Position position)
Parameters
Type Name Description
Position position
Returns
Type Description
Vector3
API Level: 3
View Source

Implicit(Position2D to Position)

Implicit type cast operator, Position2D to Position

Declaration
C#
Copy
public static implicit operator Position(Position2D position2d)
Parameters
Type Name Description
Position2D position2d

The object of Position2D type.

Returns
Type Description
Position
API Level: none
View Source

Implicit(Vector3 to Position)

Converts a Vector3 instance to a position instance.

Declaration
C#
Copy
public static implicit operator Position(Vector3 vec)
Parameters
Type Name Description
Vector3 vec
Returns
Type Description
Position
API Level: 3
View Source

Multiply(Position, Single)

The multiplication operator.

Declaration
C#
Copy
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 Source

Multiply(Position, Position)

The multiplication operator.

Declaration
C#
Copy
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 Source

Subtraction(Position, Position)

The subtraction operator.

Declaration
C#
Copy
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 Source

UnaryNegation(Position)

The unary negation operator.

Declaration
C#
Copy
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.

API Level: 3

Implements

ICloneable

Extension Methods