com.supermap.ar.areffect.preset
Class BaseCatchManager
- java.lang.Object
-
- com.supermap.ar.areffect.preset.BaseCatchManager
-
public abstract class BaseCatchManager extends java.lang.Object
Basic geometric object capturing manager.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
BaseCatchManager.ActionType
static interface
BaseCatchManager.OnUpdateListener
Snapping-updating listener
-
Constructor Summary
Constructors Constructor and Description BaseCatchManager()
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
addListener(BaseCatchManager.OnUpdateListener listener)
Adding listenerint
addObject(ARCatchObject arCatchObject)
Adds objects to be capturedint
addObject(AREffectElement element)
Adds objects to be capturedint
addObject(ARGeometry arGeometry)
Adds objects to be capturedvoid
addObjects(java.util.List<ARCatchObject> arCatchObjectList)
Adds objects to be capturedvoid
bindView(EffectView arView)
Binds viewvoid
clear()
BaseCatchManager.ActionType
getActionType()
Gets the operation typesARCatchObject
getArCatchObject(int index)
Gets the objects that allows to capture their vertexes.java.util.List<ARCatchObject>
getArCatchObjects()
Point3D
getCurrentPosition()
Gets instant positions.float
getTolerance()
Gets the capture tolerance.EffectView
getView()
Gets the viewvoid
removeListener(BaseCatchManager.OnUpdateListener listener)
Removing listenervoid
removeObject(int index)
Removes the captured objectsvoid
setActionType(BaseCatchManager.ActionType actionType)
Sets the operation typesvoid
setCurrentPosition(Point3D currentPoint)
Sets instant positionsvoid
setTolerance(float tolerance)
Sets snap tolerance
-
-
-
Method Detail
-
removeListener
public void removeListener(BaseCatchManager.OnUpdateListener listener)
Removing listener- Parameters:
listener
-
-
clear
public void clear()
-
addListener
public void addListener(BaseCatchManager.OnUpdateListener listener)
Adding listener- Parameters:
listener
-
-
setCurrentPosition
public void setCurrentPosition(Point3D currentPoint)
Sets instant positions- Parameters:
currentPoint
-
-
getCurrentPosition
public Point3D getCurrentPosition()
Gets instant positions. If you didn't set it in advance, it will return null- Returns:
-
bindView
public void bindView(EffectView arView)
Binds view- Parameters:
arView
-
-
getView
public EffectView getView()
Gets the view- Returns:
-
addObject
public int addObject(AREffectElement element)
Adds objects to be captured- Parameters:
element
-- Returns:
-
addObject
public int addObject(ARGeometry arGeometry)
Adds objects to be captured- Parameters:
arGeometry
-- Returns:
-
addObject
public int addObject(ARCatchObject arCatchObject)
Adds objects to be captured- Parameters:
arCatchObject
-- Returns:
-
addObjects
public void addObjects(java.util.List<ARCatchObject> arCatchObjectList)
Adds objects to be captured- Parameters:
arCatchObjectList
-
-
removeObject
public void removeObject(int index)
Removes the captured objects- Parameters:
index
- sequence number
-
getArCatchObjects
public java.util.List<ARCatchObject> getArCatchObjects()
-
getArCatchObject
public ARCatchObject getArCatchObject(int index)
Gets the objects that allows to capture their vertexes.- Parameters:
index
-- Returns:
-
getActionType
public BaseCatchManager.ActionType getActionType()
Gets the operation types- Returns:
-
setActionType
public void setActionType(BaseCatchManager.ActionType actionType)
Sets the operation types- Parameters:
actionType
-
-
getTolerance
public float getTolerance()
Gets the capture tolerance.- Returns:
-
setTolerance
public void setTolerance(float tolerance)
Sets snap tolerance- Parameters:
tolerance
-
-
-