org.ros.android.view.visualization.shape
Class TriangleFanShape

java.lang.Object
  extended by org.ros.android.view.visualization.shape.TriangleFanShape
All Implemented Interfaces:
OpenGlDrawable, Shape
Direct Known Subclasses:
RobotShape

public class TriangleFanShape
extends java.lang.Object

A Shape defined by vertices using OpenGl's GL_TRIANGLE_FAN method.

Note that this class is intended to be wrapped. No transformations are performed in the draw(GL10) method.


Constructor Summary
TriangleFanShape(float[] vertices, Color color)
           
 
Method Summary
 void draw(GL10 gl)
           
 Color getColor()
           
 org.ros.rosjava_geometry.Transform getTransform()
           
protected  void scale(GL10 gl)
          Scales the coordinate system.
 void setColor(Color color)
           
 void setTransform(org.ros.rosjava_geometry.Transform pose)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TriangleFanShape

public TriangleFanShape(float[] vertices,
                        Color color)
Parameters:
vertices - an array of vertices as defined by OpenGL's GL_TRIANGLE_FAN method
color - the Color of the Shape
Method Detail

draw

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

scale

protected void scale(GL10 gl)
Scales the coordinate system.

This is called after transforming the surface according to transform.

Parameters:
gl -

getColor

public Color getColor()
Specified by:
getColor in interface Shape
Returns:
the Color of this Shape

setColor

public void setColor(Color color)
Specified by:
setColor in interface Shape
Parameters:
color - the Color of this Shape

getTransform

public org.ros.rosjava_geometry.Transform getTransform()
Specified by:
getTransform in interface Shape
Returns:
the Transform that will be applied to this Shape before it is drawn

setTransform

public void setTransform(org.ros.rosjava_geometry.Transform pose)
Specified by:
setTransform in interface Shape
Parameters:
pose - the Transform that will be applied to this Shape before it is drawn