目录

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.

Public Constructor Summary

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.

Public Method Summary

Return typeMethod name
booleanequals(Object obj)
FloatgetX()
FloatgetY()
FloatgetZ()
inthashCode()
StringtoString()

Public Constructors

Method
public MLPosition(Float x, Float y, Float z)
Instantiates a point in the (x,y,z) coordinate space.

Parameters

Parameter nameParameter desc
xX coordinate
yY coordinate
zZ coordinate
Method
public MLPosition(Float x, Float y)
Instantiates a point in the (x,y) coordinate space.

Parameters

Parameter nameParameter desc
xX coordinate
yY coordinate

Public Methods

Method
public final boolean equals(Object obj)
Determines whether the input instance is equal to the current instance.

Parameters

Parameter nameParameter desc
objInstance to be compared.


Return

Typedesc
booleantrue: equal instances
false: unequal instances
Method
public final Float getX()
Obtains the X coordinate of the floating point type.

Return

Typedesc
FloatX coordinate
Method
public final Float getY()
Obtains the X coordinate of the floating point type.

Return

Typedesc
FloatY 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

Typedesc
FloatZ coordinate
Method
public final int hashCode()
Obtains the hash value of the current instance.

Return

Typedesc
intHash value of the instance.
Method
public final String toString()
Converts the current instance into a character string.

Return

Typedesc
StringCharacter string converted from the instance.