MinchoRendererのへんこう瘢雹
import java.util.*; public class Skeleton { Point[] points; Element[] elements; Annotation[] annotations; Skeleton(Point[] points,Element[] elements,Annotation[] annotations){ this.points=points; this.elements=elements; this.annotations=annotations; } public Point[] getPoints(){ return points;} public Element[] getElements(){ return elements;} public Annotation[] getAnnotations(){ return annotations;} // まずは腕だめしに単純なやつをやってみる public Outline[] makeOutline(Renderer renderer){ Vector v=new Vector(); for(int i=0;i<elements.length;i++){ Outline[] outlines=renderer.elementRenderer(points,elements[i]); if(outlines!=null){ v.add(outlines[0]); v.add(outlines[1]); } } Outline[] ret=new Outline[v.size()]; v.toArray(ret); return ret; } public String toString(){ String ret="Skeleton("; int i,len=points.length; for(i=0;i<len;i++) ret+=points[i].toString()+","; len=elements.length; for(i=0;i<len;i++) ret+=elements[i].toString()+","; return ret+")"; } }
ktanaka Powered by ViewCVS 1.0-dev |
ViewCVS and CVS Help |