edu.dhbw.andar
Class ARObject

java.lang.Object
  extended by edu.dhbw.andar.ARObject
Direct Known Subclasses:
CustomObject

public abstract class ARObject
extends java.lang.Object

Author:
tobi

Constructor Summary
ARObject(java.lang.String name, java.lang.String patternName, double markerWidth, double[] markerCenter)
          Create a new AR object.
 
Method Summary
 void draw(GL10 gl)
          Do OpenGL stuff.
 double[] getCenter()
           
 int getId()
           
 double getMarkerWidth()
           
 java.lang.String getPatternName()
           
 double[] getTransMatrix()
          Get the current translation matrix.
abstract  void init(GL10 gl)
           
 boolean isVisible()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ARObject

public ARObject(java.lang.String name,
                java.lang.String patternName,
                double markerWidth,
                double[] markerCenter)
Create a new AR object.

Parameters:
name - the name of the the object, an arbitrary string
patternName - the file name of the pattern(the file must reside in the res/raw folder)
markerWidth -
markerCenter -
Method Detail

getMarkerWidth

public double getMarkerWidth()

getCenter

public double[] getCenter()

getId

public int getId()

getPatternName

public java.lang.String getPatternName()

isVisible

public boolean isVisible()
Returns:
Is this object visible? -> is the marker belonging to this object visible?

getTransMatrix

public double[] getTransMatrix()
Get the current translation matrix.

Returns:

draw

public void draw(GL10 gl)
Do OpenGL stuff. Everything draw here will be drawn directly onto the marker. TODO replace wrap by real floatbuffer

Parameters:
gl -

init

public abstract void init(GL10 gl)