// X axis in blue
float[] axis = AxisMaker.makeAxis(0);
LineArray la = new LineArray(axis.length/3, LineArray.COORDINATES);
la.setCoordinates(0,axis);
Appearance a = new Appearance();
a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
ColoringAttributes ca = new ColoringAttributes();
ca.setColor(0.0f,0.0f,1.0f);
a.setColoringAttributes(ca);
Shape3D saxis = new Shape3D(la, a);
saxis.setName("X axis");
rootGroup.addChild(saxis);
// Y axis in green
axis = AxisMaker.makeAxis(1);
la = new LineArray(axis.length/3, LineArray.COORDINATES);
la.setCoordinates(0,axis);
a = new Appearance();
a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
ca = new ColoringAttributes();
ca.setColor(0.0f,1.0f,0.0f);
a.setColoringAttributes(ca);
saxis = new Shape3D(la, a);
saxis.setName("Y axis");
rootGroup.addChild(saxis);
// Z axis in purple
axis = AxisMaker.makeAxis(2);
la = new LineArray(axis.length/3, LineArray.COORDINATES);
la.setCoordinates(0,axis);
a = new Appearance();
a.setPolygonAttributes(new PolygonAttributes(PolygonAttributes.POLYGON_LINE, PolygonAttributes.CULL_NONE, 0));
ca = new ColoringAttributes();
ca.setColor(1.0f,0.0f,1.0f);
a.setColoringAttributes(ca);
saxis = new Shape3D(la, a);
saxis.setName("Z axis");