At 23:56 24.07.00 -0700, you wrote:
>Hi, Everyone,
>
>I modified the HelloJava3Da, I add two ColorCube into the same BG, translate
>them into different spot. It seems only the last added ColorCube is shown. I
>don't know what is wrong with it? Could anybody please help me? Thanks a
>lot!
Hi Grace,
Joerg beat me to it - your first cube is 3 meters up. The second cube, the one
you see, is only 0.2 meters in size, so the first one is 15 times as high
as the
second one is large. You're only standing 2.41 meters back from those cubes,
so the upper cube is more than 45 degrees above "straight ahead". Your viewing
angle isn't that large, so it's out of your field of view. In real life,
you'd need to tilt
your head back to look at it.
I'm ahead of you, though only by a few days. I'm building a little virtual
world and
have managed to build a sky-blue background, a grass-green ground and some
roofless houses. The houses, which are admittedly not pretty at all, would
show you
how to use the GeometryInfo class to build color-able shapes from just the
vertices
of some quadrilaterals. Using those ColorCubes is a start, but it's a dead
end because
you can't DO anything with them other than to change their size.
While my world is ugly and unfinished, it has the advantage of having a simple
navigational interface tacked on to it. Using the mouse on Buttons or the arrow
keys (with CTRL or ALT) on the keyboard allows you to move your X, Y and Z
location in your scene as well as the direction you're looking in and the angle
at which you look up and down (I call it azimuth). All this in under 1000
lines and
only 5 classes (so far). The ability to move around has been very helpful in
finding misplaced scene components like yours.
I don't want to spam the list, but anyone interested in this code can email
me at:
mailto:[EMAIL PROTECTED] and I will reply with a .ZIP of my code. If you
want
to have the same information I used to do this from, you should look at:
http://java.sun.com/products/java-media/3D/collateral/ and download the
tutorial
(8 chapters of Adobe .PDF) that's linked near the top of the page.
Happy hacking!
-Carl-
===========================================================================
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".