Chair.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 edu.tum.cs.ias.knowrob.vis.Canvas;
00007 
00008 public class Chair extends Item {
00009 
00010     private final static float LEG_DIM  = 0.05f;
00011     private final static float SEAT_DIM = 0.02f;
00012     
00013         
00014         public Chair(float m00, float m01, float m02, float m03, float m10,
00015                         float m11, float m12, float m13, float m20, float m21, float m22,
00016                         float m23, float m30, float m31, float m32, float m33, float xdim,
00017                         float ydim, float zdim) {
00018                 
00019                 super(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31,
00020                                 m32, m33, xdim, ydim, zdim);
00021         }
00022         
00023         public Chair(Matrix4d pose, Vector3d dim){
00024                 super(pose, dim);
00025         }
00026         
00027         @Override
00028         public void drawIt(Canvas c) {
00029       
00030       c.box(xdim, ydim, SEAT_DIM);
00031                 
00032       // frontside legs
00033       c.translate(xdim/2 - LEG_DIM, ydim/2-LEG_DIM, -zdim/4);   c.box(LEG_DIM, LEG_DIM, zdim/2);
00034       c.translate(0 ,-(ydim - 2*LEG_DIM),  0);   c.box(LEG_DIM, LEG_DIM, zdim/2);
00035                 
00036       // backside legs
00037       c.translate(- (xdim - 2*LEG_DIM),0, zdim/4);     c.box(LEG_DIM, LEG_DIM, zdim);
00038       c.translate(0, ydim - 2*LEG_DIM, 0);            c.box(LEG_DIM, LEG_DIM, zdim);
00039 
00040       // back rest
00041       c.translate(0.0f, - (ydim/2 - LEG_DIM), 0.75f * zdim/2);   c.box(SEAT_DIM,ydim, zdim/4);
00042       
00043         }
00044 
00045 }


mod_vis
Author(s): Moritz Tenorth, Jakob Engel
autogenerated on Sat Dec 28 2013 17:09:49