com.supermap.ar.areffect.preset
Class Shape
- java.lang.Object
-
- com.supermap.ar.areffect.preset.BaseShape
-
- com.supermap.ar.areffect.preset.Shape
-
- Direct Known Subclasses:
- StripeLine
public class Shape extends BaseShape
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.supermap.ar.areffect.preset.BaseShape
BaseShape.MatType, BaseShape.Mode
-
-
Constructor Summary
Constructors Constructor and Description Shape(BaseShape.MatType matType)
Construction method
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description void
clear()
Clears objectsvoid
drawBuildingOneSide(java.util.List<Point3D> pList)
update author: rophy date: 2022-03-15 content: render One side of the wallvoid
drawBuildingOneSide(Vector3 vector0, Vector3 vector1, Vector3 vector2, Vector3 vector3)
update author: rophy date: 2022-03-15 content: render One side of the wall V2++++++++++++V1 + + + + V3++++++++++++V0void
drawCube(Vector offset, Vector size)
Draws a cube in sizevoid
drawCubeOutline(Vector offset, Vector size)
Draws the contour lines of the cubevoid
drawCylinder(Point3D fromP3d, Point3D toP3d, float radius)
Draws a cylinder based on the center and radius of the bottom (top) circle.void
drawCylinder(Vector3 from, Vector3 to, float radius)
Deprecated.void
drawCylinder(Vector vector, float radius)
Draws a cylinder based on the radius of the bottom circle and heightvoid
drawHalfTorus(float r1, float r2, int side)
Draws a horizontal semi ring objectvoid
drawHorizontalPolygon(java.util.List<Point3D> pointList)
Draws horizontal polygons through the points set The point set should have end-to-end points Suggestions: these points should be in the same plane (the same height)void
drawLine(java.util.List<Point3D> point3DList)
Draws lines among multiple continuous pointsvoid
drawLine(Point3D fromP3d, Point3D toP3d)
Draws lines between two pointsvoid
drawLine(Vector vector)
Takes the parent node as a starting point and "vector" as vector to draw linesvoid
drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList)
Draws polygons through the points setvoid
drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList, java.util.ArrayList<Vector> normalVectorList)
From the point set, draw a polygonvoid
drawPrism(java.util.List<Point3D> bottomPointList, java.util.List<Point3D> topPointList)
Draws prismvoid
drawRegularPolygon(float r, int side)
Draws regular polygonsvoid
drawSphere(float radius)
Draws a spherevoid
drawSphere(Vector offset, float radius)
Draws a spherevoid
drawTorus(float r1, float r2, int side)
Draws a horizontal circular objectAREffectElement
getParentElement()
Get the parent nodevoid
setParentNode(AREffectElement element)
Setting the parent nodevoid
setParentNode(EffectView arView)
Setting the parent node-
Methods inherited from class com.supermap.ar.areffect.preset.BaseShape
getColor, getColorRGBA, getMetallic, getRadius, getReflectance, getRoughness, getSelectionColor, getShapeMaterial, getShapeStyle, getTextureMap, isRenderable, isSelected, isShadowCaster, isShadowReceiver, select, setColor, setColor, setColor, setMetallic, setRadius, setReflectance, setRenderable, setRoughness, setSelectionColor, setShadowCaster, setShadowReceiver, setShapeStyle, setTextureMap, unSelect, updateMaterial
-
-
-
-
Constructor Detail
-
Shape
public Shape(BaseShape.MatType matType)
Construction method- Parameters:
matType
- texture type (transparent/opaque)
-
-
Method Detail
-
drawPolygon
public void drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList)
Draws polygons through the points set- Parameters:
mode
- The drawing mode.pointList
- 3D point set
-
drawHorizontalPolygon
public void drawHorizontalPolygon(java.util.List<Point3D> pointList)
Draws horizontal polygons through the points set The point set should have end-to-end points Suggestions: these points should be in the same plane (the same height)- Parameters:
pointList
- 3D point set
-
drawCube
public void drawCube(Vector offset, Vector size)
Draws a cube in size- Parameters:
offset
- offset vector (takes the parent node as base. It is the offset on the parent node)size
- The size.
-
drawCubeOutline
public void drawCubeOutline(Vector offset, Vector size)
Draws the contour lines of the cube- Parameters:
offset
-size
-
-
drawSphere
public void drawSphere(Vector offset, float radius)
Draws a sphere- Parameters:
offset
- the offset (relative to the parent node)radius
- sphere radius
-
drawSphere
public void drawSphere(float radius)
Draws a sphere- Parameters:
radius
- sphere radius
-
drawPrism
public void drawPrism(java.util.List<Point3D> bottomPointList, java.util.List<Point3D> topPointList)
Draws prism- Parameters:
bottomPointList
- bottom vertex settopPointList
- top surface vertex set Note: the vertexes of the top surface need to correspond with the vertexes of the bottom one by one. The vertexes of the bottom surface (top surface) should be end to end.
-
drawCylinder
public void drawCylinder(Vector vector, float radius)
Draws a cylinder based on the radius of the bottom circle and height- Parameters:
vector
- the height of the cylinderradius
- Radius
-
drawCylinder
public void drawCylinder(Point3D fromP3d, Point3D toP3d, float radius)
Draws a cylinder based on the center and radius of the bottom (top) circle.- Parameters:
fromP3d
- the starting position (the position of the center of the bottom circle)toP3d
- the end position (the position of the center of the top circle)radius
- 0.0005f
-
drawCylinder
@Deprecated public void drawCylinder(Vector3 from, Vector3 to, float radius)
Deprecated.Draws a cylinder based on the center and radius of the bottom (top) circle.- Parameters:
from
- the starting position (the position of the center of the bottom circle)to
- the end position (the position of the center of the top circle)radius
- 0.0005f
-
drawLine
public void drawLine(Vector vector)
Takes the parent node as a starting point and "vector" as vector to draw lines- Parameters:
vector
- direction vector
-
drawLine
public void drawLine(Point3D fromP3d, Point3D toP3d)
Draws lines between two points- Parameters:
fromP3d
- starting positiontoP3d
- end position
-
drawLine
public void drawLine(java.util.List<Point3D> point3DList)
Draws lines among multiple continuous points- Parameters:
point3DList
-
-
drawTorus
public void drawTorus(float r1, float r2, int side)
Draws a horizontal circular object- Parameters:
r1
-r2
-side
-
-
drawHalfTorus
public void drawHalfTorus(float r1, float r2, int side)
Draws a horizontal semi ring object- Parameters:
r1
-r2
-side
-
-
drawRegularPolygon
public void drawRegularPolygon(float r, int side)
Draws regular polygons- Parameters:
r
- the distance between the geometrical center and vertexside
- the number of sides of the polygon
-
drawBuildingOneSide
public void drawBuildingOneSide(java.util.List<Point3D> pList)
update author: rophy date: 2022-03-15 content: render One side of the wall- Parameters:
pList
- the vertex list of the side which the order is 2+++++++++++++1 + + + + 3+++++++++++++0
-
drawBuildingOneSide
public void drawBuildingOneSide(Vector3 vector0, Vector3 vector1, Vector3 vector2, Vector3 vector3)
update author: rophy date: 2022-03-15 content: render One side of the wall V2++++++++++++V1 + + + + V3++++++++++++V0
-
drawPolygon
public void drawPolygon(BaseShape.Mode mode, java.util.List<Point3D> pointList, java.util.ArrayList<Vector> normalVectorList)
From the point set, draw a polygon- Parameters:
mode
- Draw modepointList
- Set of 3D pointsnormalVectorList
- Vertex normal
-
setParentNode
public void setParentNode(AREffectElement element)
Setting the parent node- Parameters:
element
-
-
setParentNode
public void setParentNode(EffectView arView)
Setting the parent node- Parameters:
arView
-
-
getParentElement
public AREffectElement getParentElement()
Get the parent node- Returns:
-
-