com.metaio.sdk.jni
Class IMetaioSDKCallback

java.lang.Object
  extended by com.metaio.sdk.jni.IMetaioSDKCallback

public class IMetaioSDKCallback
extends Object

The metaio SDK Callback interface. These functions should be implemented for handling events triggered by the metaio SDK.


Constructor Summary
IMetaioSDKCallback()
           
IMetaioSDKCallback(long cPtr, boolean cMemoryOwn)
           
 
Method Summary
 void delete()
           
static long getCPtr(IMetaioSDKCallback obj)
           
 void onAnimationEnd(IGeometry geometry, String animationName)
           
 void onCameraImageSaved(String filepath)
          To request this callback, call requestCameraFrame(filepath, width, height)
 void onInstantTrackingEvent(boolean success, String file)
          If "success" is true, "file" will contain a file name you either specified when starting the instant tracking or a temporarily result.
 void onMovieEnd(IGeometry geometry, String movieName)
           
 void onNewCameraFrame(ImageStruct cameraFrame)
          The image will have the dimensions of the current capture resolution.
 void onScreenshot(String filepath)
          If the screenshot is not written to a file, the filepath will be an empty string.
 void onScreenshotImage(ImageStruct image)
          The image struct buffer must be deleted by the application.
 void onSDKReady()
          splash screen is finished.
 void onTrackingEvent(TrackingValuesVector trackingValues)
          This is called automatically as soon as trackingValues have been updated.
 void swigReleaseOwnership()
           
 void swigTakeOwnership()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IMetaioSDKCallback

public IMetaioSDKCallback(long cPtr,
                          boolean cMemoryOwn)

IMetaioSDKCallback

public IMetaioSDKCallback()
Method Detail

getCPtr

public static long getCPtr(IMetaioSDKCallback obj)

delete

public void delete()

swigReleaseOwnership

public void swigReleaseOwnership()

swigTakeOwnership

public void swigTakeOwnership()

onSDKReady

public void onSDKReady()
splash screen is finished.


onAnimationEnd

public void onAnimationEnd(IGeometry geometry,
                           String animationName)
Parameters:
geometry - the geometry which has finished animating
animationName - the name of the just finished animation or in case of movie-playback the filename of the movie

onMovieEnd

public void onMovieEnd(IGeometry geometry,
                       String movieName)
Parameters:
geometry - the geometry which has finished animating/movie-playback
movieName - the name of the just finished animation or in case of movie-playback the filename of the movie void

onNewCameraFrame

public void onNewCameraFrame(ImageStruct cameraFrame)
The image will have the dimensions of the current capture resolution. To request this callback, call requestCameraFrame()

Parameters:
cameraFrame - the latest camera image you must copy the ImageStuct::buffer, if you need it for later.

onCameraImageSaved

public void onCameraImageSaved(String filepath)
To request this callback, call requestCameraFrame(filepath, width, height)

Parameters:
filepath - File path in which image is written, or empty string in case of a failure

onScreenshotImage

public void onScreenshotImage(ImageStruct image)
The image struct buffer must be deleted by the application. Note: This callback is called on the render thread.

Parameters:
image - Screenshot image See: IMetaioSDK::requestScreenshot

onScreenshot

public void onScreenshot(String filepath)
If the screenshot is not written to a file, the filepath will be an empty string. Note: This callback is called on the render thread.

Parameters:
filepath - File path where screenshot image has been written See: IMetaioSDK::requestScreenshot

onTrackingEvent

public void onTrackingEvent(TrackingValuesVector trackingValues)
This is called automatically as soon as trackingValues have been updated. The vector contains all the valid poses. The invalid trackingValues is only returned for first frame as soon as target is lost to inform this event. Note that this function is called in rendering thread, thus it would block rendering. It should be returned as soon as possible without any expensive processing.

Parameters:
trackingValues - current tracking values

onInstantTrackingEvent

public void onInstantTrackingEvent(boolean success,
                                   String file)
If "success" is true, "file" will contain a file name you either specified when starting the instant tracking or a temporarily result.

Parameters:
success - true on success
file - path to the tracking configuration