es.ucm.look.ar
Class LookAR

java.lang.Object
  extended by Activity
      extended by es.ucm.look.ar.LookAR

public class LookAR
extends Activity

This activity recreates a first person OpenGL world.


Constructor Summary
LookAR()
          Constructs a Look Augmented Reality frame with camera, 2D, 3D and HUD
LookAR(boolean usesCamera)
          Constructs a Look Augmented Reality frame with 2D, 3D and HUD
LookAR(boolean usesCamera, boolean uses3D, boolean uses2D, boolean usesHud, float maxDist)
          Constructs an Look Augmented Reality frame with the given parameters with full screen
LookAR(boolean usesCamera, boolean uses3D, boolean uses2D, boolean usesHud, float maxDist, boolean fullscreen)
          Constructs an Look Augmented Reality frame with the given parameters
 
Method Summary
 AR2D get2DLayer()
          Returns the layer holding 2D
 ViewGroup getHudContainer()
          Returns the HUD container.
 float getMaxDistance()
          Returns the max distance object will be seen
 Renderer3D getRenderer()
          Returns the renderer for the engine
 World getWorld()
          Returns the world
 boolean onTouchEvent(MotionEvent event)
           
 void setWorld(World world)
          Sets the world to be represented by this activity
 void surfaceChanged(SurfaceHolder holder, int format, int width, int height)
           
 void surfaceCreated(SurfaceHolder holder)
           
 void surfaceDestroyed(SurfaceHolder holder)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LookAR

public LookAR()
Constructs a Look Augmented Reality frame with camera, 2D, 3D and HUD


LookAR

public LookAR(boolean usesCamera)
Constructs a Look Augmented Reality frame with 2D, 3D and HUD

Parameters:
usesCamera - if the camera must be use as background

LookAR

public LookAR(boolean usesCamera,
              boolean uses3D,
              boolean uses2D,
              boolean usesHud,
              float maxDist)
Constructs an Look Augmented Reality frame with the given parameters with full screen

Parameters:
usesCamera - If app is using the camera as background
uses3D - If app is using three dimension displaying
uses2D - If app is using two dimension displaying
usesHud - If app is using a HUD with Anroid's views
maxDist - Max distance to be shown in the AR
fullScreen - If activity is full screen

LookAR

public LookAR(boolean usesCamera,
              boolean uses3D,
              boolean uses2D,
              boolean usesHud,
              float maxDist,
              boolean fullscreen)
Constructs an Look Augmented Reality frame with the given parameters

Parameters:
usesCamera - If app is using the camera as background
uses3D - If app is using three dimension displaying
uses2D - If app is using two dimension displaying
usesHud - If app is using a HUD with Anroid's views
maxDist - Max distance to be shown in the AR
fullScreen - If activity is full screen
Method Detail

get2DLayer

public AR2D get2DLayer()
Returns the layer holding 2D

Returns:

getHudContainer

public ViewGroup getHudContainer()
Returns the HUD container. Views can be added to it

Returns:
the HUD container

getMaxDistance

public float getMaxDistance()
Returns the max distance object will be seen

Returns:

getRenderer

public Renderer3D getRenderer()
Returns the renderer for the engine

Returns:
the renderer for the engine

getWorld

public World getWorld()
Returns the world

Returns:
the world

onTouchEvent

public boolean onTouchEvent(MotionEvent event)

setWorld

public void setWorld(World world)
Sets the world to be represented by this activity

Parameters:
world - the world to be represented by this activity

surfaceChanged

public void surfaceChanged(SurfaceHolder holder,
                           int format,
                           int width,
                           int height)

surfaceCreated

public void surfaceCreated(SurfaceHolder holder)

surfaceDestroyed

public void surfaceDestroyed(SurfaceHolder holder)