org.ros.android.view.visualization.layer
Class DefaultLayer

java.lang.Object
  extended by org.ros.android.view.visualization.layer.DefaultLayer
All Implemented Interfaces:
Layer, OpenGlDrawable
Direct Known Subclasses:
CameraControlLayer, PosePublisherLayer, RobotLayer, SubscriberLayer

public abstract class DefaultLayer
extends java.lang.Object
implements Layer

Base class for visualization layers.


Constructor Summary
DefaultLayer()
           
 
Method Summary
 void addRenderListener(RenderRequestListener listener)
           
 void draw(GL10 gl)
           
 void onShutdown(VisualizationView view, org.ros.node.Node node)
          Called when the view is removed from the view.
 void onStart(org.ros.node.ConnectedNode connectedNode, Handler handler, org.ros.rosjava_geometry.FrameTransformTree frameTransformTree, Camera camera)
          Called when the layer is registered at the navigation view.
 boolean onTouchEvent(VisualizationView view, MotionEvent event)
          Event handler for touch events.
 void removeRenderListener(RenderRequestListener listener)
           
protected  void requestRender()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultLayer

public DefaultLayer()
Method Detail

draw

public void draw(GL10 gl)
Specified by:
draw in interface OpenGlDrawable

onTouchEvent

public boolean onTouchEvent(VisualizationView view,
                            MotionEvent event)
Description copied from interface: Layer
Event handler for touch events.

Specified by:
onTouchEvent in interface Layer
Parameters:
view - the view generating the event
event - the touch event
Returns:
true if the event has been handled

onStart

public void onStart(org.ros.node.ConnectedNode connectedNode,
                    Handler handler,
                    org.ros.rosjava_geometry.FrameTransformTree frameTransformTree,
                    Camera camera)
Description copied from interface: Layer
Called when the layer is registered at the navigation view.

Specified by:
onStart in interface Layer

onShutdown

public void onShutdown(VisualizationView view,
                       org.ros.node.Node node)
Description copied from interface: Layer
Called when the view is removed from the view.

Specified by:
onShutdown in interface Layer

addRenderListener

public void addRenderListener(RenderRequestListener listener)
Specified by:
addRenderListener in interface Layer
Parameters:
listener - the RenderRequestListener to add

removeRenderListener

public void removeRenderListener(RenderRequestListener listener)
Specified by:
removeRenderListener in interface Layer
Parameters:
listener - the RenderRequestListener to remove

requestRender

protected void requestRender()