public class ScreenPointTool
extends java.lang.Object
构造器和说明 |
---|
ScreenPointTool() |
限定符和类型 | 方法和说明 |
---|---|
static <any> |
convertToPixel(EffectView effectView,
java.util.List<Point3D> point3DList)
将AR场景坐标集转为屏幕像素坐标
|
static <any> |
convertToPixel(EffectView effectView,
java.util.List<Point3D> point3DList,
boolean isModify)
将AR场景坐标集转为屏幕像素坐标
|
static int[] |
convertToScreenPoint(AREffectView arView,
Point3D point3D)
将场景中的点转为Z值为0的屏幕坐标
|
static int[] |
convertToScreenPoint(AREffectView arView,
Vector3 vector3)
将场景中的点转为Z值为0的屏幕坐标
注:坐标原点为屏幕中心
|
static Point2D |
convertToScreenPoint2D(AREffectView arView,
Point3D point3D)
将场景中的点转为Z值为0的屏幕坐标
|
static int[][] |
generateBounds(AREffectView arView,
java.util.List<Vector3> arVertexGroup)
将AR中的顶点组转换为屏幕坐标中的最大矩形的顶点
(bounds[0][0],bounds[0][1])-----------------
| |
| |
-----------------(bounds[1][0],bounds[1][1])
|
static float |
getDpScale(android.content.Context context)
获取dp值与真实尺度的比例
|
static float |
getScreenDensity(AREffectBaseView arEffectView)
获取屏幕密度
|
static int |
getScreenDensityDPI(android.content.Context context)
获取屏幕dpi
|
static float |
getScreenHeight_DP(EffectBaseView arEffectView)
获取屏幕高度
单位:dp
|
static int |
getScreenHeightPixel(android.content.Context context)
获取手机屏幕高度
|
static float |
getScreenWidth_DP(EffectBaseView arEffectView)
获取屏幕宽度
单位:dp
|
static int |
getScreenWidthPixel(android.content.Context context)
获取手机屏幕宽度
|
static Ray |
screenPointToRay(EffectBaseView arEffectView,
int x,
int y)
屏幕坐标转射线
|
public static int[] convertToScreenPoint(AREffectView arView, Point3D point3D)
point3D
- public static Point2D convertToScreenPoint2D(AREffectView arView, Point3D point3D)
arView
- point3D
- public static int[] convertToScreenPoint(AREffectView arView, Vector3 vector3)
arView
- vector3
- public static int[][] generateBounds(AREffectView arView, java.util.List<Vector3> arVertexGroup)
(bounds[0][0],bounds[0][1])-----------------
| |
| |
-----------------(bounds[1][0],bounds[1][1])
arView
- arVertexGroup
- public static float getScreenDensity(AREffectBaseView arEffectView)
arEffectView
- public static float getDpScale(android.content.Context context)
context
- public static float getScreenWidth_DP(EffectBaseView arEffectView)
arEffectView
- public static float getScreenHeight_DP(EffectBaseView arEffectView)
arEffectView
- public static Ray screenPointToRay(EffectBaseView arEffectView, int x, int y)
arEffectView
- x
- y
- public static <any> convertToPixel(EffectView effectView, java.util.List<Point3D> point3DList)
effectView
- point3DList
- public static int getScreenHeightPixel(android.content.Context context)
context
- 上下文public static int getScreenWidthPixel(android.content.Context context)
context
- 上下文public static <any> convertToPixel(EffectView effectView, java.util.List<Point3D> point3DList, boolean isModify)
effectView
- arViewpoint3DList
- 待转换的3D点集isModify
- 是否保持位置镜像public static int getScreenDensityDPI(android.content.Context context)
context
-