Hi, I'm trying (for a long time) to make a LineStripArray with color, but it
appear black. I'm using a lit scene, so coloring attributes are ignored.
I make a geometry colors and material color, but none of them seems to work.
I have an ambient and a directional light. I put spheres and they are
correctly rendered (with colors).
thanks,
//the code is...
Point3d puntosRef[] = {
new Point3d(2.0d,-1.0d,0.0d),
new Point3d(0.0d,0.0d,0.0d),
new Point3d(-1.0d,0.0d,0.0d),
};
Point3d coords[]=new Point3d[puntosRef.length];
int i;
for (i=0;i<puntosRef.length;i++){
coords[i]=puntosRef[i];
}
Appearance polyAppear = new Appearance();
Color3f color = new Color3f(0.0f,0.0f,1.0f);
Material mat = new Material(new
Color3f(0.2f,0.2f,0.2f),_cblack,color,_cwhite,0.5f);
polyAppear.setMaterial(mat);
Color3f colores[] = {color,color,color};
int stripCounts[]={3};
LineStripArray polylineBase = new LineStripArray (puntosRef.length,
LineStripArray.COORDINATES|LineStripArray.NORMALS|LineStripArray.COLOR_3
,stripCounts);
polylineBase.setCoordinates(0,coords);
polylineBase.setColors(0,colores);
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".