class LDrawModel extends LDrawPrimitive{ ArrayList data; int col; Vector3D origin; float a, b, c, d, e, f, g, h, i; LDrawModel(){ data = new ArrayList(); origin = new Vector3D( 0.0, 0.0, 0.0); a = 1.0; b = 0.0; c = 0.0; d = 0.0; e = 1.0; f = 0.0; g = 0.0; h = 0.0; i = 1.0; col = 0; }; void draw( int basecol){ for( int i = 0; i < data.size(); i++){ LDrawPrimitive l = (LDrawPrimitive)data.get( i); if( col == 16){ colorlib.findByCode( basecol).setColorFill(); l.draw( basecol); }else if( col != 24){ colorlib.findByCode( col).setColorFill(); l.draw( basecol); }; }; }; void loadByName( String filename){ String lines[] = loadStrings( filename); for (int i=0; i < lines.length; i++) { String[] t = splitTokens( lines[ i].trim(), " "); if( t.length > 1){ // totally ignoring submodels and conditional lines (types 1 and 5) if( t[ 0].equals( "2")){ LDrawPrimitive l = new LDrawLine(); l.readln( lines[ i]); data.add( l); }else if( t[ 0].equals( "3")){ LDrawPrimitive l = new LDrawTri(); l.readln( lines[ i]); data.add( l); }else if( t[ 0].equals( "4")){ LDrawPrimitive l = new LDrawQuad(); l.readln( lines[ i]); data.add( l); } }; }; }; };