com.metaio.sdk
Interface MetaioSurfaceView.Callback

Enclosing class:
MetaioSurfaceView

public static interface MetaioSurfaceView.Callback

Implement this callback to load/unload geometries, transform geometries and handle geometries selection through touch event and receive animation events.

All callbacks are called inside rendering thread, therefore any expensive processing inside these methods should be done in another thread. Furthermore, any GUI operation must be performed in user interface thread.


Method Summary
 void onDrawFrame()
          This is called when metaio SDK has updated tracking and is ready to render.
 void onSurfaceChanged(int width, int height)
          Called when OpenGL surface is resized.
 void onSurfaceCreated()
          This is called when OpenGL surface has been created.
 void onSurfaceDestroyed()
          Called when OpenGL surface is destroyed
 

Method Detail

onSurfaceCreated

void onSurfaceCreated()
This is called when OpenGL surface has been created. The metaioSDK can be initialized in this callback, e.g. setting clipping plane limits etc. Also, audio renderer should be registered in this callback.


onSurfaceChanged

void onSurfaceChanged(int width,
                      int height)
Called when OpenGL surface is resized. The new dimensions must be passed to metaioSDK by calling metaioSDK.resizeRenderer.

Parameters:
width - Width of the surface view
height - Height of the surface view

onSurfaceDestroyed

void onSurfaceDestroyed()
Called when OpenGL surface is destroyed


onDrawFrame

void onDrawFrame()
This is called when metaio SDK has updated tracking and is ready to render. It is good place to load any geometries or update transformations.