00001 package edu.tum.cs.ias.knowrob.vis.items;
00002
00003 import edu.tum.cs.ias.knowrob.vis.Canvas;
00004 import edu.tum.cs.ias.knowrob.vis.Drawable;
00005
00006 public class CoordinateSystem implements Drawable {
00007
00008 public float size;
00009
00010 public CoordinateSystem(float size) {
00011 this.size = size;
00012 }
00013
00014 public void draw(Canvas c) {
00015 c.pushMatrix();
00016 c.stroke(255, 0, 0);
00017 c.line(0, 0, 0, size, 0, 0);
00018 c.popMatrix();
00019 c.pushMatrix();
00020 c.stroke(0, 255, 0);
00021 c.line(0, 0, 0, 0, size, 0);
00022 c.popMatrix();
00023 c.pushMatrix();
00024 c.stroke(0, 0, 255);
00025 c.line(0, 0, 0, 0, 0, size);
00026 c.stroke(0, 0, 0);
00027 c.popMatrix();
00028 }
00029 }