com.supermap.ar.areffect.component
Class ARTrackingStateDetector
- java.lang.Object
-
- com.supermap.ar.areffect.component.ARTrackingStateDetector
-
public class ARTrackingStateDetector extends java.lang.Object
Tracking state detectorUsed to check whether the AR is in the tracing state
TrackingStateDetector trackingStateDetector = new TrackingStateDetector(efView); trackingStateDetector.open(); efView.addOnUpdateListener(() -> { //Desc - When the value is false, the tracking state is lost, and true indicates that the AR camera is still tracking boolean detect = trackingStateDetector.detect(efView); }); //trackingStateDetector.close();
-
-
Constructor Summary
Constructors Constructor and Description ARTrackingStateDetector(AREffectView effectView)
ConstructorARTrackingStateDetector(HmsAREffectView effectView)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description void
close()
Shut-off detectorboolean
detect(AREffectView effectView)
Real-time detectionboolean
detect(HmsAREffectView effectView)
Real-time detectionvoid
open()
Turn detector on
-
-
-
Constructor Detail
-
ARTrackingStateDetector
public ARTrackingStateDetector(AREffectView effectView)
Constructor- Parameters:
effectView
- AR view
-
ARTrackingStateDetector
public ARTrackingStateDetector(HmsAREffectView effectView)
Constructor- Parameters:
effectView
- AR view
-
-
Method Detail
-
open
public void open()
Turn detector on
-
close
public void close()
Shut-off detector
-
detect
public boolean detect(AREffectView effectView)
Real-time detection- Parameters:
effectView
-- Returns:
- state (true: tracing state)
-
detect
public boolean detect(HmsAREffectView effectView)
Real-time detection- Parameters:
effectView
-- Returns:
- state (true: tracing state)
-
-