00001 package org.hfbk.vis.visnode;
00002
00003 import org.dronus.graph.Node;
00004 import org.hfbk.vis.Prefs;
00005 import org.lwjgl.opengl.GL11;
00006 import org.lwjgl.util.vector.Vector3f;
00007
00008
00025 public class VisStructure extends VisNode implements VisUI{
00026
00027
00028
00033 public VisStructure() {
00034 super(null, new Vector3f());
00035 if (Prefs.current.baseURL!=null) add(new VisLog());
00036 radius=1000;
00037
00038 add(new VisBit(null,new Vector3f(0,30,0)));
00039
00040
00041 add(new VisDir(new Node(""), new Vector3f(10,10,-10)));
00042
00043 }
00044
00048 void renderSelf() {
00049
00050 position.y=getRoot().epicenter.y-20;
00051
00052 GL11.glDisable(GL11.GL_TEXTURE_2D);
00053
00054
00055
00056 GL11.glPolygonOffset(1,1);
00057 GL11.glColor4f(0,0,.3f,.21f);
00058 GL11.glBegin(GL11.GL_QUADS);
00059 GL11.glVertex3f(-radius,0, radius);
00060 GL11.glVertex3f( radius,0, radius);
00061 GL11.glVertex3f( radius,0,-radius);
00062 GL11.glVertex3f(-radius,0,-radius);
00063 GL11.glEnd();
00064 GL11.glPolygonOffset(0,0);
00065
00066
00067
00068 GL11.glColor3f(.1f,.8f,.3f);
00069 GL11.glBegin(GL11.GL_LINE_STRIP);
00070 GL11.glVertex3f(-radius,0, radius);
00071 GL11.glVertex3f( radius,0, radius);
00072 GL11.glVertex3f( radius,0,-radius);
00073 GL11.glVertex3f(-radius,0,-radius);
00074 GL11.glVertex3f(-radius,0, radius);
00075 GL11.glEnd();
00076
00077 GL11.glColor3f(.65f,.8f,.65f);
00078 GL11.glBegin(GL11.GL_LINES);
00079 GL11.glVertex3f(0,0,0);
00080 GL11.glVertex3f(radius,0,0);
00081 GL11.glVertex3f(0,0,0);
00082 GL11.glVertex3f(0,0,-radius);
00083 GL11.glVertex3f(0,0,0);
00084 GL11.glVertex3f(0,radius,0);
00085
00086
00087 GL11.glColor4f(.65f,.8f,.65f,.5f);
00088 for (float x=0; x<300; x+=30){
00089 GL11.glVertex3f(x,0, 0);
00090 GL11.glVertex3f(x,0,-radius);
00091 }
00092
00093 GL11.glEnd();
00094 GL11.glColor3f(1f,1f,1f);
00095 GL11.glColor3f(1,1,1);
00096 }
00097 }