RoomInAConstruction.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 
00009 public class RoomInAConstruction extends Item {
00010     
00011         public RoomInAConstruction(float m00, float m01, float m02, float m03, float m10,
00012                         float m11, float m12, float m13, float m20, float m21, float m22,
00013                         float m23, float m30, float m31, float m32, float m33, 
00014                              float xdim, float ydim, float zdim){
00015                 
00016 
00017                 super(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31,
00018                                 m32, m33, xdim, ydim, zdim);
00019         }
00020         public RoomInAConstruction(Matrix4d pose, Vector3d dim){
00021                 super(pose, dim);
00022         }
00023 
00024         @Override
00025         public void drawIt(Canvas c) {
00026 
00027       c.translate(0,0,-zdim/2 - 0.05f);
00028       //c.stroke(50,50,50);
00029       
00030       // ground plane
00031       c.box(this.xdim, this.ydim, 0.02f);
00032       c.fill(127, 127, 127, 100);
00033       c.translate(0,0,zdim/2);
00034       c.box(this.xdim, this.ydim, this.zdim);
00035       
00036       
00037       // center of room
00038       //c.fill(0,0,200);
00039 //      c.box(xdim/15,ydim/15,0.1f);
00040 
00041       // float diff_x = - (this.trafoMatrix[3] - xtrans); 
00042       // float diff_y = - (this.trafoMatrix[7] - ytrans);
00043       // // rotation only works since it is a 180 degree rotation!?
00044       // float rot_x = trafoMatrix[0] * diff_x + trafoMatrix[1] * diff_y;
00045       // float rot_y = trafoMatrix[4] * diff_x + trafoMatrix[5] * diff_y;      
00046       // // origin
00047       // //c.translate(rot_x,rot_y,8f);
00048       // //c.stroke(250,200,0);
00049       // //c.noFill();
00050       // //c.strokeWeight(1f);
00051       // //c.box(1f, 8f, 16f);
00052       // c.translate(rot_x,rot_y,0f);
00053       // c.fill(250,200,0);
00054       // c.box(20f,20f,20f);
00055      
00056   }
00057 }


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