$search
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 import edu.tum.cs.vis.model.ItemModel; 00008 00009 public class CadModelItem extends Item { 00010 00011 public CadModelItem(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, float xdim, 00014 float ydim, float zdim) { 00015 super(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, 00016 m32, m33, xdim, ydim, zdim); 00017 } 00018 00019 public CadModelItem(Matrix4d pose, Vector3d dim){ 00020 super(pose, dim); 00021 } 00022 00023 00024 protected ItemModel model = null; 00025 00026 public ItemModel getModel() { 00027 return model; 00028 } 00029 00030 public void setModel(ItemModel m) { 00031 model = m; 00032 } 00033 00034 @Override 00035 public void drawIt(Canvas c) { 00036 00037 // draw item-internal coordinate system 00038 // c.strokeWeight(1.5f); 00039 // c.stroke(255, 0, 0); c.line(0, 0, 0, 2, 0, 0); 00040 // c.stroke(0, 255, 0); c.line(0, 0, 0, 0, 2, 0); 00041 // c.stroke(0, 0, 255); c.line(0, 0, 0, 0, 0, 2); 00042 // c.stroke(0, 0, 0); 00043 00044 if (model != null) { 00045 model.getParser().getModel().draw(c.g,colorOverride); 00046 } else { 00047 super.draw(c); 00048 } 00049 } 00050 }