Hello J3D folks,

I've got an IndexedLineArray defined as such:

IndexedLineArray trajectory = new IndexedLineArray(8, IndexedLineArray.COORDINATES | IndexedLineArray.COLOR_4, 24);

        

trajectory.setCoordinate( 0, new Point3f( 0.0f, -0.5f, 0.0f));
trajectory.setCoordinate( 1, new Point3f( -0.25f, -0.25f, 0.0f));
trajectory.setCoordinate( 2, new Point3f( 0.25f, 0.25f, 0.0f));
trajectory.setCoordinate( 3, new Point3f( 0.0f, 0.5f, 0.0f));

        

trajectory.setCoordinateIndex( 0, 0);
trajectory.setCoordinateIndex( 1, 1);

        

trajectory.setCoordinateIndex( 2, 1);
trajectory.setCoordinateIndex( 3, 2);

        

trajectory.setCoordinateIndex( 4, 2);
trajectory.setCoordinateIndex( 5, 3);

        

Color4f colors[] = new Color4f[1];
colors[0] = new Color4f(1.0f,0.0f,0.0f,0.5f);
colors[1] = new Color4f(0.0f,0.0f,1.0f,0.5f)

        

trajectory.setColor(0,colors[0]);
trajectory.setColor(3,colors[1]);


I can't seem to figure out how to set the first index to one color, the last to a second color, and get the colors in-between to be a gradient of the 2. I thought this was meant to be really easy to do though. Could anyone help me please?


Thanks.

Eli

=========================================================================== 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".

Reply via email to