Dave,
The biggest problem you have is specifying the geometry too close
to the viewer (at lest for a SimpleUniverse application).
Try using z values of -1.0f and 1.0f instead of 0.0f, and 2.0f.
I looked at the program and noticed that you have the faces mislabeled
in the comments. The first face specified in the program is a BACK
face, not a BOTTOM. The second is the FRONT, not the TOP.
I didn't notice any vertices specified in the 'wrong' order (to make
outward facing surfaces), but when I used your object in a program,
not all faces were rendered. Make sure all vertices are specified
in counter-clockwise order when viewed from the outside.
Also, you might want to consider writing the class to extend Shape3D
instead of Object. In this way you can avoid the getShape() method.
Also, the new Appearance() is not doing anything visually for you
(It does make one more object in the program).
Cheers,
Dennis
PS it took me slightly more than 5 seconds ;-)
dave frost wrote:
>
> Hi all,
>
> Please give a hand with this, it would only take a knowledgeable person
> 5 seconds,
>
> I have just written a small piece of code, it is supposed to be a sort
> of 3d rectangle with slanted sides, I have the file attatched to this
> mail. I would be greatful for some advice on this. I am not sure if
> there are any rules for specifying the coordinates of a shape. Bu this
> doesn't give what i expect.
>
> Thanks for the help
>
> Dave
>
> ------------------------------------------------------------------------
> Name: testGeom.java
> testGeom.java Type: application/x-unknown-content-type-java_auto_file
> Encoding: base64
=====================================================================
To subscribe/unsubscribe, send mail to [EMAIL PROTECTED]
Java 3D Home Page: http://java.sun.com/products/java-media/3D/