鴻蒙OS MmiPoint

2022-10-14 11:03 更新

MmiPoint

java.lang.Object

|---ohos.multimodalinput.event.MmiPoint

  1. public class MmiPoint
  2. extends Object

表示給定坐標系中的 x、y 或 z 坐標。

Since:

3

構造函數(shù)摘要

構造函數(shù) 描述
MmiPoint(float px, float py) 用于創(chuàng)建具有指定 x 和 y 坐標的 MmiPoint 對象的構造函數(shù)。
MmiPoint(float px, float py, float pz) 用于創(chuàng)建具有指定 x、y 和 z 坐標的 MmiPoint 對象的構造函數(shù)。

方法總結

修飾符和類型 方法 描述
float getX() 獲取 x 坐標。
float getY() 獲取 y 坐標。
float getZ() 獲取 z 坐標。
String toString() 獲取此 MmiPoint 對象的字符串表示形式,其中指定了 x、y 和 z 坐標。
從類 java.lang.Object 繼承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

構造函數(shù)詳細信息

MmiPoint

public MmiPoint(float px, float py)

用于創(chuàng)建具有指定 x 和 y 坐標的 MmiPoint 對象的構造函數(shù)。

參數(shù):

參數(shù)名稱 參數(shù)描述
px 表示 x 坐標。
py 表示 y 坐標。

Since:

3

MmiPoint

public MmiPoint(float px, float py, float pz)

用于創(chuàng)建具有指定 x、y 和 z 坐標的 MmiPoint 對象的構造函數(shù)。

參數(shù):

參數(shù)名稱 參數(shù)描述
px 表示 x 坐標。
py 表示 y 坐標。
pz 表示 z 坐標。

Since:

3

方法詳情

getX

public float getX()

獲取 x 坐標。

返回:

返回 x 坐標。

Since:

3

getY

public float getY()

獲取 y 坐標。

返回:

返回 y 坐標。

Since:

3

getZ

public float getZ()

獲取 z 坐標。

返回:

返回 z 坐標。

Since:

3

toString

public String toString()

獲取此 MmiPoint 對象的字符串表示形式,其中指定了 x、y 和 z 坐標。

覆蓋:

類 Object 中的 toString

返回:

返回此 MmiPoint 對象的字符串表示形式,其中指定了 x、y 和 z 坐標,格式為 MmiPoint{px=x 坐標值,py=y 坐標值,pz=z 坐標值}。

Since:

3

以上內(nèi)容是否對您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號
微信公眾號

編程獅公眾號