--
Vous recevez ce message, car vous êtes abonné au groupe Google Groupes Jzy3d.
Pour vous désabonner de ce groupe et ne plus recevoir d'e-mails le concernant, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
Pour plus d'options, visitez le site https://groups.google.com/groups/opt_out .
--
Vous recevez ce message car vous êtes abonné à un sujet dans le groupe Google Groupes "Jzy3d".
Pour vous désabonner de ce sujet, visitez le site https://groups.google.com/d/topic/jzy3d/kN8-a2W1laY/unsubscribe.
Pour vous désabonner de ce groupe et de tous ses sujets, envoyez un e-mail à l'adresse jzy3d+un...@googlegroups.com.
public class Drawing extends AbstractDemo{
public static void main(String[] args) throws Exception {
DemoLauncher.openDemo(new Drawing());
}
public Drawing(){
}
public void init(){
//int size = 500000;
int size = 10;
float x;
float y;
float z;
LineStrip ls = new LineStrip();
//List<Coord3d> ls =new ArrayList<Coord3d>();
Coord3d[] points = new Coord3d[size];
// Create scatter points
for(int i=0; i<size; i++){
x = (float)Math.random() - 0.5f;
y = (float)Math.random() - 0.5f;
z = (float)Math.random() - 0.5f;
points[i] = new Coord3d(x, y, z);
Point lscolor = new Point(points[i], Color.RED);
ls.add(lscolor);
}
// Create a drawable scatter with a colormap
Scatter scatter = new Scatter(points, Color.YELLOW);
scatter.setWidth(7f);
// Create a chart and add scatter
Chart chart = new Chart();
chart.getAxeLayout().setMainColor(Color.WHITE);
chart.getView().setBackgroundColor(Color.BLACK);
chart.getScene().add(scatter);
ChartLauncher.openChart(chart);
chart.setAxeDisplayed(true);
chart.setViewMode(ViewPositionMode.FREE);
Iterator<LineStrip> lsIterator = this.lineStrips.iterator();
while (lsIterator.hasNext()) {
chart.getScene().getGraph().add(lsIterator.next());
}
}
}
If I define the line like
List<Coord3d> ls =new ArrayList<Coord3d>();
It can not use ls.add to add the point.
But it can use Iterator.
But if I define like
LineStrip ls = new LineStrip();
It can not use the Iterator.
Could you please tell me how to handle it, please?
I really appreciate it.
Best,
Nina