Br. Firas
For your second question it is not possible to display the POLYGON_FILL and
POLYGON_LINE at the same time. But if you are really aggressive than there can be some
tricks to do it?
Ahmed
-----Original Message-----
From: John Wright [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 28, 2001 7:28 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Lighting ?
Firas,
Two intriguing things about your DirectionalLight code:
1) You don't set a color for the light. Sun's API doc doesn't state
what the default color of the light is but we can assume from the
documentation for the Light class that the default is (1,1,1) (bright
white).
2) You don't set a direction for the light so you'll get the default of
straight down. Thus if you make rectangular objects, and don't tilt
them at all, only the tops (which you probably aren't looking at) are
going to be influenced by the light.
3) Depending on how you are "coloring" your objects they may or may not
react with light. (Suggestion: apply a material to the appearance).
- John Wright
Starfire Research
firas wrote:
>
> Hello,
>
> I am new to Java3D. In my appli., I create volumes as QuadArrays. I am coloring them
>and put them by order
>
> ones on the others. This works as expected. My problem is when I am trying to use
>some kind of lighting
>
> to give them more natural impression. I tried to use the directional light as in the
>examples delivered
>
> in Java3D, without any success ...?
>
> I tried som thing like the following but with changing values many times :
>
> BoundingSphere bounds = new BoundingSphere();
>
> bounds.setRadius(1000);
>
> DirectionalLight lightD = new DirectionalLight();
> lightD.setInfluencingBounds(bounds);
> objRoot.addChild(lightD);
>
> Background background = new Background();
> background.setColor(1.0f, 1.0f, 1.0f);
> background.setApplicationBounds(bounds);
> objRoot.addChild(background);
>
> the radius is taken as 1000 because of my coordinates which are of
> order :
> 600, 360, ..etc.
>
> Thanx for any help.
>
> Another question :
> I am rebdering the geometry with either POLYGON_FILL or POLYGON_LINE
> :
>
> PolygonAttributes polygonAttributes = new PolygonAttributes ();
> polygonAttributes.setPolygonMode(PolygonAttributes.POLYGON_FILL);
> polygonAttributes.setCullFace(PolygonAttributes.CULL_NONE);
>
> Is it possible to fill the geometry and to show lines in the same time
> ..?
>
> Thanx
> Firas
===========================================================================
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".
===========================================================================
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".