Fork.java
Go to the documentation of this file.
00001 package edu.tum.cs.ias.knowrob.vis.items;
00002 
00003 import javax.vecmath.Matrix4d;
00004 import javax.vecmath.Vector3d;
00005 
00006 import processing.core.PConstants;
00007 import edu.tum.cs.ias.knowrob.vis.Canvas;
00008 
00009 import javax.vecmath.Vector3f;
00010 
00011 public class Fork extends Item {
00012 
00013         
00014         public Fork(float m00, float m01, float m02, float m03, 
00015                                 float m10, float m11, float m12, float m13, 
00016                                 float m20, float m21, float m22, float m23, 
00017                                 float m30, float m31, float m32, float m33, 
00018                                 float xdim,float ydim,float zdim) {
00019                 
00020                 super(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31,     m32, m33, xdim, ydim, zdim);
00021         }
00022 
00023         public Fork(Matrix4d pose, Vector3d dim){
00024                 super(pose, dim);
00025         }
00026         
00027         @Override
00028         public void drawIt(Canvas c) {
00029 
00030                 c.pushMatrix();
00031                 
00032                         c.scale(0.01f);
00033                         
00034                         (new ConePrimitive(new Vector3f(-7.8f, 0f, -1.04f), new Vector3f(1.69f, 0f, -1.04f), 1.04f)).draw(c);  // main spree
00035                 
00036                         c.beginShape(PConstants.QUAD_STRIP);
00037                         c.vertex(1.3f,1.04f,-0.39f); c.vertex(1.3f,1.04f,0.39f);
00038                         c.vertex(2.6f,1.04f,-0.39f); c.vertex(2.6f,1.04f,0.39f);
00039                         c.vertex(2.6f,2.34f,-0.39f); c.vertex(2.6f,2.34f,0.39f);
00040                         c.vertex(9.1f,2.34f,-0.39f); c.vertex(9.1f,2.34f,0.39f);
00041                         c.vertex(9.1f,1.56f,-0.39f); c.vertex(9.1f,1.56f,0.39f);
00042                         c.vertex(3.9f,1.56f,-0.39f); c.vertex(3.9f,1.56f,0.39f);
00043                         c.vertex(3.9f,0.52f,-0.39f); c.vertex(3.9f,0.52f,0.39f);
00044                         c.vertex(9.1f,0.52f,-0.39f); c.vertex(9.1f,0.52f,0.39f);
00045                         c.vertex(9.1f,-0.52f,-0.39f); c.vertex(9.1f,-0.52f,0.39f);
00046                         c.vertex(3.9f,-0.52f,-0.39f); c.vertex(3.9f,-0.52f,0.39f);
00047                         c.vertex(3.9f,-1.56f,-0.39f); c.vertex(3.9f,-1.56f,0.39f);
00048                         c.vertex(9.1f,-1.56f,-0.39f); c.vertex(9.1f,-1.56f,0.39f);
00049                         c.vertex(9.1f,-2.34f,-0.39f); c.vertex(9.1f,-2.34f,0.39f);
00050                         c.vertex(2.6f,-2.34f,-0.39f); c.vertex(2.6f,-2.34f,0.39f);
00051                         c.vertex(2.6f,-1.04f,-0.39f); c.vertex(2.6f,-1.04f,0.39f);
00052                         c.vertex(1.3f,-1.04f,-0.39f); c.vertex(1.3f,-1.04f,0.39f);
00053                         c.endShape(PConstants.CLOSE);
00054                         
00055                         c.beginShape();
00056                         c.vertex(1.3f,1.04f,-0.39f);
00057                         c.vertex(2.6f,1.04f,-0.39f);
00058                         c.vertex(2.6f,2.34f,-0.39f);
00059                         c.vertex(9.1f,2.34f,-0.39f);
00060                         c.vertex(9.1f,1.56f,-0.39f);
00061                         c.vertex(3.9f,1.56f,-0.39f);
00062                         c.vertex(3.9f,0.52f,-0.39f);
00063                         c.vertex(9.1f,0.52f,-0.39f);
00064                         c.vertex(9.1f,-0.52f,-0.39f);
00065                         c.vertex(3.9f,-0.52f,-0.39f);
00066                         c.vertex(3.9f,-1.56f,-0.39f);
00067                         c.vertex(9.1f,-1.56f,-0.39f);
00068                         c.vertex(9.1f,-2.34f,-0.39f);
00069                         c.vertex(2.6f,-2.34f,-0.39f);
00070                         c.vertex(2.6f,-1.04f,-0.39f);
00071                         c.vertex(1.3f,-1.04f,-0.39f);
00072                         c.endShape(PConstants.CLOSE);
00073                         
00074                         c.beginShape();
00075                         c.vertex(1.3f,1.04f,0.39f);
00076                         c.vertex(2.6f,1.04f,0.39f);
00077                         c.vertex(2.6f,2.34f,0.39f);
00078                         c.vertex(9.1f,2.34f,0.39f);
00079                         c.vertex(9.1f,1.56f,0.39f);
00080                         c.vertex(3.9f,1.56f,0.39f);
00081                         c.vertex(3.9f,0.52f,0.39f);
00082                         c.vertex(9.1f,0.52f,0.39f);
00083                         c.vertex(9.1f,-0.52f,0.39f);
00084                         c.vertex(3.9f,-0.52f,0.39f);
00085                         c.vertex(3.9f,-1.56f,0.39f);
00086                         c.vertex(9.1f,-1.56f,0.39f);
00087                         c.vertex(9.1f,-2.34f,0.39f);
00088                         c.vertex(2.6f,-2.34f,0.39f);
00089                         c.vertex(2.6f,-1.04f,0.39f);
00090                         c.vertex(1.3f,-1.04f,0.39f);
00091                         c.endShape(PConstants.CLOSE);   
00092 
00093                 c.popMatrix();
00094                 
00095         }
00096 
00097 
00098 }


mod_vis
Author(s): Moritz Tenorth, Jakob Engel
autogenerated on Mon Oct 6 2014 01:30:00