Cone.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 javax.vecmath.Vector3f;
00007 
00008 import edu.tum.cs.ias.knowrob.vis.Canvas;
00009 
00010 public class Cone extends Item {
00011 
00012         private Vector3f direction;
00013         private float radius1;
00014         private float radius2;
00015         private float height;
00016         
00017 
00018 
00019         public Cone(Matrix4d pose, Vector3d dim, Vector3d dir, float radius1, float radius2, float height) {
00020                 super(pose, dim);
00021                 
00022                 this.direction = new Vector3f((float) dir.x, (float) dir.y, (float) dir.z);
00023                 this.radius1 = radius1;
00024                 this.radius2 = radius2;
00025                 this.height = height;
00026         }
00027         
00028         
00029         public Cone(float m00, float m01, float m02, float m03, float m10,
00030                         float m11, float m12, float m13, float m20, float m21, float m22,
00031                         float m23, float m30, float m31, float m32, float m33, float dirX, 
00032                         float dirY, float dirZ, float radius1, float radius2, float height) {
00033                 
00034                 super(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31,
00035                                 m32, m33, 0, 0, 0);
00036                 
00037                 this.direction = new Vector3f(dirX, dirY, dirZ);
00038                 this.radius1 = radius1;
00039                 this.radius2 = radius2;
00040                 this.height = height;
00041                 
00042         }
00043         
00044         public Cone(Matrix4d pose, Vector3d dim){
00045                 super(pose, dim);
00046         }
00047         
00048         @Override
00049         public void drawIt(Canvas c) {          
00050                 new ConePrimitive().cone(c, direction, radius1, radius2, height, true, true);
00051         }
00052 
00053 }


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