edu.dhbw.andar
Class ARToolkit

java.lang.Object
  extended by edu.dhbw.andar.ARToolkit

public class ARToolkit
extends java.lang.Object

Interface to the ARToolkit.

Author:
Tobias Domhan

Constructor Summary
ARToolkit(Resources res, java.io.File baseFile)
           
 
Method Summary
 void detectMarkers(byte[] image)
          Detects the markers in the image, and updates the state of the MarkerInfo accordingly.
 void draw(GL10 gl)
          Draw all ARObjects.
 void initGL(GL10 gl)
          initialize the objects.
 void registerARObject(ARObject arobject)
          Registers an object to the ARToolkit.
 void setVisListener(MarkerVisibilityListener visListener)
           
 void unregisterARObject(ARObject arobject)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARToolkit

public ARToolkit(Resources res,
                 java.io.File baseFile)
Method Detail

registerARObject

public void registerARObject(ARObject arobject)
                      throws AndARException
Registers an object to the ARToolkit. This means: The toolkit will try to determine the pose of the object. If it is visible the draw method of the object will be invoked. The corresponding translation matrix will be applied inside opengl before doing so. TODO: registering a object with the same pattern twice will not work, as arloadpatt will create different IDs for the same pattern, and the detecting function will return only the first id as being detected. we need to store patt load id's in an hash -> loadpatt as a native function returning the ID -> pass this id to the object registering function.

Parameters:
arobject - The object that shell be registered.
Throws:
AndARException

unregisterARObject

public void unregisterARObject(ARObject arobject)

detectMarkers

public final void detectMarkers(byte[] image)
Detects the markers in the image, and updates the state of the MarkerInfo accordingly.

Parameters:
image -

draw

public final void draw(GL10 gl)
Draw all ARObjects.

Parameters:
gl -

initGL

public final void initGL(GL10 gl)
initialize the objects.

Parameters:
gl -

setVisListener

public void setVisListener(MarkerVisibilityListener visListener)