Class Position

Definition

Namespace:
Tizen.NUI
Assembly:
Tizen.NUI.dll

Position is a three-dimensional vector.

C#
Copy
public class Position : Disposable, IDisposable, ICloneable
Inheritance
object
Position
Implements
System.IDisposable
System.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.

View Source

Position(float, float, float)

The constructor.

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

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.

Properties

View Source

this[uint]

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
uint index

The subscript index.

Property Value
Type Description
float

The float at the given index.

View Source

One

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

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

ParentOriginBottom

ParentOrigin constants. It's 1.0.

Declaration
C#
Copy
public static float ParentOriginBottom { get; }
Property Value
Type Description
float
View Source

ParentOriginBottomCenter

ParentOrigin constants: 0.5, 1.0, 0.5.

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

ParentOriginBottomLeft

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

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

ParentOriginBottomRight

ParentOrigin constants: 1.0, 1.0, 0.5.

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

ParentOriginCenter

ParentOrigin constants: 0.0, 0.5, 0.5

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

ParentOriginCenterLeft

ParentOrigin constants: 0.0, 0.5, 0.5.

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

ParentOriginCenterRight

ParentOrigin constants: 1.0, 0.5, 0.5.

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

ParentOriginLeft

ParentOrigin constants. It's 0.0.

Declaration
C#
Copy
public static float ParentOriginLeft { get; }
Property Value
Type Description
float
View Source

ParentOriginMiddle

ParentOrigin constants. It's 0.5.

Declaration
C#
Copy
public static float ParentOriginMiddle { get; }
Property Value
Type Description
float
View Source

ParentOriginRight

ParentOrigin constants. It's 1.0.

Declaration
C#
Copy
public static float ParentOriginRight { get; }
Property Value
Type Description
float
View Source

ParentOriginTop

ParentOrigin constants. It's 0.0.

Declaration
C#
Copy
public static float ParentOriginTop { get; }
Property Value
Type Description
float
View Source

ParentOriginTopCenter

ParentOrigin constants: 0.5, 0.0, 0.5.

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

ParentOriginTopLeft

ParentOrigin constants: 0.0, 0.0, 0.5.

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

ParentOriginTopRight

ParentOrigin constants: 1.0, 0.0, 0.5.

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

PivotPointBottom

PivotPoint constants: 1.0.

Declaration
C#
Copy
public static float PivotPointBottom { get; }
Property Value
Type Description
float
View Source

PivotPointBottomCenter

PivotPoint constants: 0.5, 1.0, 0.5

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

PivotPointBottomLeft

PivotPoint constants: 0.0, 1.0, 0.5.

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

PivotPointBottomRight

PivotPoint constants: 1.0, 1.0, 0.5.

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

PivotPointCenter

PivotPoint constants: 0.5, 0.5, 0.5.

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

PivotPointCenterLeft

PivotPoint constants: 0.0, 0.5, 0.5.

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

PivotPointCenterRight

PivotPoint constants: 1.0, 0.5, 0.5.

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

PivotPointLeft

PivotPoint constants: 0.0.

Declaration
C#
Copy
public static float PivotPointLeft { get; }
Property Value
Type Description
float
View Source

PivotPointMiddle

PivotPoint constants: 0.5.

Declaration
C#
Copy
public static float PivotPointMiddle { get; }
Property Value
Type Description
float
View Source

PivotPointRight

PivotPoint constants: 1.0.

Declaration
C#
Copy
public static float PivotPointRight { get; }
Property Value
Type Description
float
View Source

PivotPointTop

PivotPoint constants: 0.0.

Declaration
C#
Copy
public static float PivotPointTop { get; }
Property Value
Type Description
float
View Source

PivotPointTopCenter

PivotPoint constants: 0.5, 0.0, 0.5.

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

PivotPointTopLeft

PivotPoint constants: 0.0, 0.0, 0.5.

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

PivotPointTopRight

PivotPoint constants: 1.0, 0.0, 0.5.

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

X

The x component.

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

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

View Source

Y

The y component.

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

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

View Source

Z

The z component.

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

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

View Source

Zero

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

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

Methods

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
bool

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
bool

Returns true if the two vectors are equal, otherwise false.

View Source

GetHashCode()

Gets the the hash code of this Position.

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

The Hash Code.

Overrides
object.GetHashCode()
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
bool

Returns true if the two vectors are not equal, otherwise false.

Operators

View Source

operator +(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.

View Source

operator /(Position, float)

The division operator.

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

View Source

operator /(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.

View Source

implicit operator Vector3(Position)

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
View Source

implicit operator Position(Vector3)

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
View Source

operator *(Position, float)

The multiplication operator.

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

View Source

operator *(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.

View Source

operator -(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.

View Source

operator -(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.

Implements

System.IDisposable
System.ICloneable