open class Line3D : Object3D
open class Line3D : Object3D
The Line3D takes a list of Vector3 points, thickness and a color.
Usage:
Stack<Vector3> points = new Stack<Vector3>();
int[] colors = new int[3];
points.add(new Vector3(-2, 0, 1));
points.add(new Vector3(-1, -1, 2));
points.add(new Vector3(0, 2, 4));
colors[0] = 0xffff0000; // red
colors[1] = 0xff00ff00; // green
colors[2] = 0xffffff00; // yellow
Line3D line = new Line3D(points, 1, colors);
SimpleMaterial material = new SimpleMaterial();
material.setUseVertexColor(true);
line.setMaterial(material);
getCurrentScene.addChild(line);
Author
dennis.ippel