Hi,

i have a j3d/swing app and i utilize the ColorChooser from swing
to control the color of shapes in a J3D scene.  is there some sort
of mapping between the two? I utilize java.awt.Color and
javax.vecmath.Color3f.. what i believe should be a blue in Color
is a light blue in Color3f... if it is a light color (light red, light blue,
etc)
in java.awt.Color, it translates to white in javax.vecmath.Color3f..

just curious if anyone has any info in what i'm doing wrong because
it's driving me nuts!

*****
sample code
*****

Color currentColor ;
Color3f objColor ;

 public void setColor(float x, float y, float z)
 {
        currentColor = new Color (x, y, z) ;
        objColor = new Color3f( x, y, z) ;
        ColoringAttributes colAttrib = new ColoringAttributes() ;
        colAttrib.setColor(objColor) ;
        highlightAppearance = new Appearance() ;
        highlightAppearance.setColoringAttributes(colAttrib) ;
        shape3d.setAppearance(highlightAppearance) ;

    } // setColor()

*******
end code
*******

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