public Main(StlFile stlf) {
for(int i=0; i<stlf.coordArray.length; i+=3) {
- Mesh.Vert p0 = goal.register(new Point(stlf.coordArray[i+0].x * MAG, stlf.coordArray[i+0].y * MAG, stlf.coordArray[i+0].z * MAG));
- Mesh.Vert p1 = goal.register(new Point(stlf.coordArray[i+1].x * MAG, stlf.coordArray[i+1].y * MAG, stlf.coordArray[i+1].z * MAG));
- Mesh.Vert p2 = goal.register(new Point(stlf.coordArray[i+2].x * MAG, stlf.coordArray[i+2].y * MAG, stlf.coordArray[i+2].z * MAG));
+ Point p0 = new Point(stlf.coordArray[i+0].x * MAG, stlf.coordArray[i+0].y * MAG, stlf.coordArray[i+0].z * MAG);
+ Point p1 = new Point(stlf.coordArray[i+1].x * MAG, stlf.coordArray[i+1].y * MAG, stlf.coordArray[i+1].z * MAG);
+ Point p2 = new Point(stlf.coordArray[i+2].x * MAG, stlf.coordArray[i+2].y * MAG, stlf.coordArray[i+2].z * MAG);
Vec n = new Vec(stlf.normArray[i/3].x * MAG, stlf.normArray[i/3].y * MAG, stlf.normArray[i/3].z * MAG);
Mesh.T t = goal.newT(p0, p1, p2, n);
}
};
- Mesh.Vert ltf = tile.register(new Point(-(width/2), (height/2), (depth/2)));
- Mesh.Vert mtf = tile.register(new Point( 0.0, (height/2), (depth/2)));
- Mesh.Vert rtf = tile.register(new Point( (width/2), (height/2), (depth/2)));
- Mesh.Vert ltn = tile.register(new Point(-(width/2), (height/2), -(depth/2)));
- Mesh.Vert mtn = tile.register(new Point( 0.0, (height/2), -(depth/2)));
- Mesh.Vert rtn = tile.register(new Point( (width/2), (height/2), -(depth/2)));
- Mesh.Vert lbf = tile.register(new Point(-(width/2), -(height/2), (depth/2)));
- Mesh.Vert mbf = tile.register(new Point( 0.0, -(height/2), (depth/2)));
- Mesh.Vert rbf = tile.register(new Point( (width/2), -(height/2), (depth/2)));
- Mesh.Vert lbn = tile.register(new Point(-(width/2), -(height/2), -(depth/2)));
- Mesh.Vert mbn = tile.register(new Point( 0.0, -(height/2), -(depth/2)));
- Mesh.Vert rbn = tile.register(new Point( (width/2), -(height/2), -(depth/2)));
+ Point ltf = new Point(-(width/2), (height/2), (depth/2));
+ Point mtf = new Point( 0.0, (height/2), (depth/2));
+ Point rtf = new Point( (width/2), (height/2), (depth/2));
+ Point ltn = new Point(-(width/2), (height/2), -(depth/2));
+ Point mtn = new Point( 0.0, (height/2), -(depth/2));
+ Point rtn = new Point( (width/2), (height/2), -(depth/2));
+ Point lbf = new Point(-(width/2), -(height/2), (depth/2));
+ Point mbf = new Point( 0.0, -(height/2), (depth/2));
+ Point rbf = new Point( (width/2), -(height/2), (depth/2));
+ Point lbn = new Point(-(width/2), -(height/2), -(depth/2));
+ Point mbn = new Point( 0.0, -(height/2), -(depth/2));
+ Point rbn = new Point( (width/2), -(height/2), -(depth/2));
- points = new Mesh.Vert[] {
+ Point[] points = new Point[] {
ltf,
mtf,
rtf,