public abstract class Plugin
extends java.lang.Object
Constructor and Description |
---|
Plugin(java.lang.String identifier,
ArchitectView architectView)
Constructor, pass a unique identifier for each of your plugins.
|
Modifier and Type | Method and Description |
---|---|
void |
callJavaScript(java.lang.String javaScriptSnippet)
Pass a java script snippet which will be executed in the current AR experience.
|
abstract void |
cameraFrameAvailable(Frame cameraFrame)
Will be called every time the Wikitude Enigine receives a new camera frame from the platform camera.
|
protected void |
destroy()
Will be called when the Wikitude Engine shuts down.
|
protected void |
endRender()
Will be called right after any Wikitude SDK internal rendering is done.
|
java.lang.String |
getIdentifier()
Returns the identifier of this particular plugin.
|
protected void |
initialize()
Will be called once after your Plugin was successfully added to the Wikitude Engine.
|
boolean |
isEnabled()
Return the enabled state of this particular plugin.
|
protected void |
pause()
Will be called every time the Wikitude Engine pauses.
|
protected void |
resume(long pausedTime)
Will be called when the Wikitude Engine starts for the first time and after every pause.
|
void |
setEnabled(boolean enabled)
Set's this plugin enabled or not.
|
protected void |
startRender()
Will be called before any Wikitude SDK internal rendering is done.
|
abstract void |
update(RecognizedTarget[] recognizedTargets)
Will be called after every image recognition cycle.
|
public Plugin(java.lang.String identifier, ArchitectView architectView)
identifier
- protected void initialize()
protected void pause()
protected void resume(long pausedTime)
pausedTime
- the duration of the pause in millisecondsprotected void destroy()
protected void startRender()
protected void endRender()
public abstract void cameraFrameAvailable(Frame cameraFrame)
cameraFrame
- frame wrapper object which contains the frame data and some metadata about the framepublic abstract void update(RecognizedTarget[] recognizedTargets)
recognizedTargets
- list of recognized targets or null if no target was recognizedpublic void callJavaScript(java.lang.String javaScriptSnippet)
javaScriptSnippet
- java script codepublic java.lang.String getIdentifier()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled
- true or false