com.supermap.ar.areffect.preset
Class ARDynamicGeometry
- java.lang.Object
-
- com.supermap.ar.areffect.preset.ARDynamicGeometry
-
public class ARDynamicGeometry extends java.lang.Object
Dynamic geometry object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static interface
ARDynamicGeometry.OnPointUpdateListener
Point listening event
-
Constructor Summary
Constructors Constructor and Description ARDynamicGeometry(AREffectElement parent)
The constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addPoint(Point3D p)
add Pointvoid
clearAll()
clear Allvoid
clearCurrentObj()
Clears the currently drawn objectboolean
delLastPoint()
Clears the last node addedjava.util.ArrayList<Point3D>
getCurrentClockwisePoints()
Gets the current set of points that are always clockwiseint
getCurrentCount()
Gets the number of vertices for the current objectARGeometry
getCurrentObj(ARGeometry.ARGeometryType type)
Gets an object of the currently specified typeShapeStyle
getLineStyle()
ARGeometry
getObj(int index, ARGeometry.ARGeometryType type)
Gets an object of the specified type and the specified indexARDynamicGeometry.OnPointUpdateListener
getOnPointUpdateListener()
ShapeStyle
getPointStyle()
ShapeStyle
getPolygonStyle()
void
refresh()
refreshboolean
saveCurrentObj()
Save the current objectARDynamicGeometry
setLineStyle(ShapeStyle lineStyle)
void
setOnPointUpdateListener(ARDynamicGeometry.OnPointUpdateListener onPointUpdateListener)
Setting point adds listening eventsARDynamicGeometry
setPointStyle(ShapeStyle pointStyle)
ARDynamicGeometry
setPolygonStyle(ShapeStyle polygonStyle)
-
-
-
Constructor Detail
-
ARDynamicGeometry
public ARDynamicGeometry(AREffectElement parent)
The constructor- Parameters:
parent
- Parent element
-
-
Method Detail
-
setOnPointUpdateListener
public void setOnPointUpdateListener(ARDynamicGeometry.OnPointUpdateListener onPointUpdateListener)
Setting point adds listening events- Parameters:
onPointUpdateListener
- Listen for an event
-
clearAll
public void clearAll()
clear All
-
getObj
public ARGeometry getObj(int index, ARGeometry.ARGeometryType type)
Gets an object of the specified type and the specified index- Parameters:
index
- The indextype
- type- Returns:
- object
-
getCurrentObj
public ARGeometry getCurrentObj(ARGeometry.ARGeometryType type)
Gets an object of the currently specified type- Parameters:
type
-- Returns:
-
getCurrentCount
public int getCurrentCount()
Gets the number of vertices for the current object- Returns:
- Vertex set (note: non-end to end closure)
-
saveCurrentObj
public boolean saveCurrentObj()
Save the current object- Returns:
-
clearCurrentObj
public void clearCurrentObj()
Clears the currently drawn object
-
addPoint
public void addPoint(Point3D p)
add Point- Parameters:
p
-
-
delLastPoint
public boolean delLastPoint()
Clears the last node added- Returns:
-
getPointStyle
public ShapeStyle getPointStyle()
-
setPointStyle
public ARDynamicGeometry setPointStyle(ShapeStyle pointStyle)
-
getPolygonStyle
public ShapeStyle getPolygonStyle()
-
getLineStyle
public ShapeStyle getLineStyle()
-
setLineStyle
public ARDynamicGeometry setLineStyle(ShapeStyle lineStyle)
-
setPolygonStyle
public ARDynamicGeometry setPolygonStyle(ShapeStyle polygonStyle)
-
getOnPointUpdateListener
public ARDynamicGeometry.OnPointUpdateListener getOnPointUpdateListener()
-
getCurrentClockwisePoints
public java.util.ArrayList<Point3D> getCurrentClockwisePoints()
Gets the current set of points that are always clockwise- Returns:
-
refresh
public void refresh()
refresh
-
-