|
import java.util.*; |
|
|
public class Skeleton { |
public class Skeleton { |
Point[] points; |
Point[] points; |
public Point[] getPoints(){ return points;} |
public Point[] getPoints(){ return points;} |
public Element[] getElements(){ return elements;} |
public Element[] getElements(){ return elements;} |
public Annotation[] getAnnotations(){ return annotations;} |
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(){ |
public String toString(){ |
String ret="Skeleton("; |
String ret="Skeleton("; |
int i,len=points.length; |
int i,len=points.length; |