java.lang.Object | |||
↳ | AppCompatActivity | ||
↳ | com.vidinoti.android.vdarsdk.arcore.VidinotiBaseArViewerActivity | ||
↳ | com.vidinoti.android.vdarsdk.arcore.VidinotiArViewerActivity |
Activity that runs ARCore with a web view on top of the camera view.
The camera projection and view matrix are retrieved from the web page and a 3D scene can then be rendered using
WebGL.
For launching the activity, use the Intent
returned by createViewIntent(Context, String, String)
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Calculate the normal distance to plane from cameraPose, the given planePose should have y axis parallel to
plane's normal, for example plane's center pose or hit test pose.
| |||||||||||
Called when the AR view must be closed (e.g.
| |||||||||||
Creates the intent for starting the activity with the required parameters.
| |||||||||||
Called when the WebView content requested the detection of an image.
| |||||||||||
Called when the WebView content requested the detection of a plane.
| |||||||||||
Called when a continuous hit testing must be performed
| |||||||||||
Called when the WebView content requested a image capture of the camera.
| |||||||||||
Called when the last placement must be used as anchor
| |||||||||||
Called when the ARCore session can be stopped
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.vidinoti.android.vdarsdk.arcore.VidinotiBaseArViewerActivity
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
android.opengl.GLSurfaceView.Renderer
| |||||||||||
From interface
com.vidinoti.android.vdarsdk.arcore.VidinotiArJavascriptInterface.Listener
|
Calculate the normal distance to plane from cameraPose, the given planePose should have y axis parallel to plane's normal, for example plane's center pose or hit test pose.
planePose | pose of the plane anchor |
---|---|
cameraPose | pose of the camera |
Called when the AR view must be closed (e.g. at the end of an animation)
Creates the intent for starting the activity with the required parameters.
context | the context |
---|---|
url | the URL that must be loaded, either remote (http/https) or local (relative to the modelPath) |
modelPath | the path where the model files are stored |
startActivity(Intent)
Called when the WebView content requested the detection of an image.
Once an image has been detected, the anchor matrix must be updated
(See sendAnchorMatrix(float[])
and
sendAnchorPlaced(String)
called.
id | the id corresponding to the placement request |
---|---|
imageUrl | the url of the image to track |
widthInMeters | the physical width of the image, it improves the tracking to specify the physical size |
Called when the WebView content requested the detection of a plane.
Once a plane has been detected, the anchor matrix must be updated
(See sendAnchorMatrix(float[])
and
sendAnchorPlaced(String)
called.
id | the id corresponding to the placement request |
---|
Called when a continuous hit testing must be performed
Called when the WebView content requested a image capture of the camera.
The screen capture must be sent via sendScreenCapture(String)
Called when the last placement must be used as anchor