com.supermap.ar.areffect.preset
类 Shape<Vector3>
- java.lang.Object
-
- com.supermap.ar.areffect.preset.BaseShape
-
- com.supermap.ar.areffect.preset.Shape<Vector3>
-
- 类型参数:
Vector3
-
- 直接已知子类:
- StripeLine
public class Shape<Vector3> extends BaseShape
绘制形状类
-
-
嵌套类概要
-
从类继承的嵌套类/接口 com.supermap.ar.areffect.preset.BaseShape
BaseShape.MatType, BaseShape.Mode
-
-
构造器概要
构造器 构造器和说明 Shape(BaseShape.MatType matType)
构造方法
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 限定符和类型 方法和说明 void
clear()
清除对象void
drawBuildingOneSide(java.util.List<Point3D> pList)
渲染墙的一面 2+++++++++++++1 + + + + 3+++++++++++++0void
drawBuildingOneSide(Vector3 vector0, Vector3 vector1, Vector3 vector2, Vector3 vector3)
渲染墙的一面 V2++++++++++++V1 + + + + V3++++++++++++V0void
drawCube(Vector offset, Vector size)
绘制size大小的立方体void
drawCubeOutline(Vector offset, Vector size)
绘制立方体轮廓线void
drawCustomMesh(java.util.ArrayList<Vertex> vertices, java.util.ArrayList<java.lang.Integer> triangleIndices)
绘制自定义网格 使用sceneform原生的属性进行绘制void
drawCustomMesh(Material material, java.util.ArrayList<Vertex> vertices, java.util.ArrayList<java.lang.Integer> triangleIndices)
绘制自定义网格 使用sceneform原生的属性进行绘制void
drawCylinder(Point3D fromP3d, Point3D toP3d, float radius)
通过底(顶)的圆心位置、半径绘制圆柱void
drawCylinder(Vector3 from, Vector3 to, float radius)
已过时。void
drawCylinder(Vector vector, float radius)
通过底面圆的半径、高的矢量绘制圆柱void
drawHalfTorus(float r1, float r2, int side)
绘制水平的半环状对象void
drawHorizontalPolygon(java.util.List<Point3D> pointList)
通过点集,绘制水平多边形 此方法点集,须是首尾相连的点 建议:这些点对象在同一水平面(即同一高度)void
drawLine(java.util.List<Point3D> point3DList)
连续的多点之间画线void
drawLine(Point3D fromP3d, Point3D toP3d)
两点间画线void
drawLine(Vector vector)
以父节点为起点,以vector为矢量画线void
drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList)
通过点集,绘制多边形void
drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList, java.util.ArrayList<Vector> normalVectorList)
通过点集,绘制多边形void
drawPrism(java.util.List<Point3D> bottomPointList, java.util.List<Point3D> topPointList)
绘制棱柱void
drawQuadrangle(Vector3 a, Vector3 b, Vector3 c, Vector3 d, int type)
绘制四边形(protected)void
drawRegularPolygon(float r, int side)
绘制正多边形void
drawSphere(float radius)
绘制球体void
drawSphere(Vector offset, float radius)
绘制球体void
drawTorus(float r1, float r2, int side)
绘制水平的环状对象AREffectElement
getParentElement()
获取父节点元素void
setParentNode(AREffectElement element)
设置父节点void
setParentNode(EffectView arView)
设置父节点-
从类继承的方法 com.supermap.ar.areffect.preset.BaseShape
getColor, getColorRGBA, getMetallic, getRadius, getReflectance, getRoughness, getSelectionColor, getSelectionTextureMap, getShapeMaterial, getShapeStyle, getTextureMap, isRenderable, isSelected, isShadowCaster, isShadowReceiver, select, setColor, setColor, setColor, setMetallic, setRadius, setReflectance, setRenderable, setRoughness, setSelectionColor, setSelectionTextureMap, setShadowCaster, setShadowReceiver, setShapeStyle, setTextureMap, unSelect, updateMaterial
-
-
-
-
构造器详细资料
-
Shape
public Shape(BaseShape.MatType matType)
构造方法- 参数:
matType
- 材质类型(透明/不透明)
-
-
方法详细资料
-
drawPolygon
public void drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList)
通过点集,绘制多边形- 参数:
mode
- 绘制模式pointList
- 三维点集
-
drawHorizontalPolygon
public void drawHorizontalPolygon(java.util.List<Point3D> pointList)
通过点集,绘制水平多边形 此方法点集,须是首尾相连的点 建议:这些点对象在同一水平面(即同一高度)- 参数:
pointList
- 三维点集
-
drawCube
public void drawCube(Vector offset, Vector size)
绘制size大小的立方体- 参数:
offset
- 偏移矢量(以父节点为基准,在父节点的位置上的偏移量)size
- 大小
-
drawCubeOutline
public void drawCubeOutline(Vector offset, Vector size)
绘制立方体轮廓线- 参数:
offset
-size
-
-
drawSphere
public void drawSphere(Vector offset, float radius)
绘制球体- 参数:
offset
- 偏移量(相对父节点)radius
- 球半径
-
drawSphere
public void drawSphere(float radius)
绘制球体- 参数:
radius
- 球半径
-
drawPrism
public void drawPrism(java.util.List<Point3D> bottomPointList, java.util.List<Point3D> topPointList)
绘制棱柱- 参数:
bottomPointList
- 底面顶点集topPointList
- 顶面顶点集 备注:底面顶点顺序与顶面顶点顺序需一一对应,切底面(顶面)顶点需首尾相连
-
drawCylinder
public void drawCylinder(Vector vector, float radius)
通过底面圆的半径、高的矢量绘制圆柱- 参数:
vector
- 圆柱高的矢量radius
- 半径
-
drawCylinder
public void drawCylinder(Point3D fromP3d, Point3D toP3d, float radius)
通过底(顶)的圆心位置、半径绘制圆柱- 参数:
fromP3d
- 起点位置(底部圆心位置)toP3d
- 终点位置(顶部圆心位置)radius
- 0.0005f
-
drawCylinder
@Deprecated public void drawCylinder(Vector3 from, Vector3 to, float radius)
已过时。通过底(顶)的圆心位置、半径绘制圆柱- 参数:
from
- 起点位置(底部圆心位置)to
- 终点位置(顶部圆心位置)radius
- 0.0005f
-
drawLine
public void drawLine(Vector vector)
以父节点为起点,以vector为矢量画线- 参数:
vector
- 方向矢量
-
drawLine
public void drawLine(java.util.List<Point3D> point3DList)
连续的多点之间画线- 参数:
point3DList
-
-
drawTorus
public void drawTorus(float r1, float r2, int side)
绘制水平的环状对象- 参数:
r1
-r2
-side
-
-
drawHalfTorus
public void drawHalfTorus(float r1, float r2, int side)
绘制水平的半环状对象- 参数:
r1
-r2
-side
-
-
drawRegularPolygon
public void drawRegularPolygon(float r, int side)
绘制正多边形- 参数:
r
- 几何中心到顶点的距离side
- 多边形边数
-
drawCustomMesh
public void drawCustomMesh(Material material, java.util.ArrayList<Vertex> vertices, java.util.ArrayList<java.lang.Integer> triangleIndices)
绘制自定义网格使用sceneform原生的属性进行绘制
- 参数:
material
- 材质vertices
- 顶点集triangleIndices
- 顶点索引- 另请参阅:
com.google.are.sceneform.rendering.Material
,com.google.are.sceneform.rendering.Vertex
-
drawCustomMesh
public void drawCustomMesh(java.util.ArrayList<Vertex> vertices, java.util.ArrayList<java.lang.Integer> triangleIndices)
绘制自定义网格使用sceneform原生的属性进行绘制
- 参数:
vertices
- 顶点集 (包含空间点与贴图坐标的映射关系)triangleIndices
- 坐标索引 (三个一组,逆时针顺序)- 另请参阅:
com.google.are.sceneform.rendering.Material
,com.google.are.sceneform.rendering.Vertex
-
drawQuadrangle
public void drawQuadrangle(Vector3 a, Vector3 b, Vector3 c, Vector3 d, int type)
绘制四边形(protected)
-
drawBuildingOneSide
public void drawBuildingOneSide(java.util.List<Point3D> pList)
渲染墙的一面2+++++++++++++1
+ +
+ +
3+++++++++++++0
- 参数:
pList
- the vertex list of the side which the order is
-
drawBuildingOneSide
public void drawBuildingOneSide(Vector3 vector0, Vector3 vector1, Vector3 vector2, Vector3 vector3)
渲染墙的一面V2++++++++++++V1
+ +
+ +
V3++++++++++++V0
- 参数:
vector0
-vector1
-vector2
-vector3
-
-
drawPolygon
public void drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList, java.util.ArrayList<Vector> normalVectorList)
通过点集,绘制多边形- 参数:
mode
- 绘制模式pointList
- 三维点集normalVectorList
- 顶点法向量
-
setParentNode
public void setParentNode(AREffectElement element)
设置父节点- 参数:
element
-
-
setParentNode
public void setParentNode(EffectView arView)
设置父节点- 参数:
arView
-
-
getParentElement
public AREffectElement getParentElement()
获取父节点元素- 返回:
-
-