| class info |
| com.huawei.hms.mlsdk.common.MLPosition |
| Represents a point data class. A point is a two-dimensional or three-dimensional floating point in an image. The upper left corner (0,0) is the origin point, with the horizontal right direction as the positive direction of axis X, and vertical downward direction as the positive direction of axis Y. A point is valid only when both its X and Y coordinates are specified. |
| Constructor name |
| MLPosition(Float x, Float y, Float z) Instantiates a point in the (x,y,z) coordinate space. |
| MLPosition(Float x, Float y) Instantiates a point in the (x,y) coordinate space. |
| Return type | Method name |
| boolean | equals(Object obj) |
| Float | getX() |
| Float | getY() |
| Float | getZ() |
| int | hashCode() |
| String | toString() |
| Method |
| public MLPosition(Float x, Float y, Float z) |
| Instantiates a point in the (x,y,z) coordinate space. |
Parameters
| Parameter name | Parameter desc |
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| Method |
| public MLPosition(Float x, Float y) |
| Instantiates a point in the (x,y) coordinate space. |
Parameters
| Parameter name | Parameter desc |
| x | X coordinate |
| y | Y coordinate |
| Method |
| public final boolean equals(Object obj) |
| Determines whether the input instance is equal to the current instance. |
Parameters
| Parameter name | Parameter desc |
| obj | Instance to be compared. |
Return
| Type | desc |
| boolean | true: equal instances false: unequal instances |
| Method |
| public final Float getX() |
| Obtains the X coordinate of the floating point type. |
Return
| Type | desc |
| Float | X coordinate |
| Method |
| public final Float getY() |
| Obtains the X coordinate of the floating point type. |
Return
| Type | desc |
| Float | Y coordinate |
| Method |
| public final Float getZ() |
| Obtains the Z coordinate of the floating point type. For a two-dimensional image, the Z coordinate is empty. |
Return
| Type | desc |
| Float | Z coordinate |
| Method |
| public final int hashCode() |
| Obtains the hash value of the current instance. |
Return
| Type | desc |
| int | Hash value of the instance. |
| Method |
| public final String toString() |
| Converts the current instance into a character string. |
Return
| Type | desc |
| String | Character string converted from the instance. |