public Main(StlFile stlf) {
for(int i=0; i<stlf.coordArray.length; i+=3) {
- Geom.P p0 = geom.newP(stlf.coordArray[i+0].x,
- stlf.coordArray[i+0].y,
- stlf.coordArray[i+0].z);
- Geom.P p1 = geom.newP(stlf.coordArray[i+1].x,
- stlf.coordArray[i+1].y,
- stlf.coordArray[i+1].z);
- Geom.P p2 = geom.newP(stlf.coordArray[i+2].x,
- stlf.coordArray[i+2].y,
- stlf.coordArray[i+2].z);
- Geom.T t = geom.newT(geom.newE(p0, p1),
- geom.newE(p1, p2),
- geom.newE(p2, p0));
+ Geom.P p0 = geom.newP(stlf.coordArray[i+0].x, stlf.coordArray[i+0].y, stlf.coordArray[i+0].z);
+ Geom.P p1 = geom.newP(stlf.coordArray[i+1].x, stlf.coordArray[i+1].y, stlf.coordArray[i+1].z);
+ Geom.P p2 = geom.newP(stlf.coordArray[i+2].x, stlf.coordArray[i+2].y, stlf.coordArray[i+2].z);
+ Geom.T t = geom.newT(geom.newE(p0, p1), geom.newE(p1, p2), geom.newE(p2, p0));
}
}
display(gld);
}
- /**
- * Take care of drawing here.
- */
+ public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
+ public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
public void display(GLAutoDrawable drawable) {
float red = 0.0f;
float green = 0.0f;
gl.glEnd();
}
}
- public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) { }
- public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) { }
-
public static void main(String[] s) throws Exception {
StlFile stlf = new StlFile();