Daniel,
This capability is already there, though it's a bit obfuscated now and the
J3D team could help us out here--assuming that this workaround will work.
The PolygonAttributes class allows you to define the rasterization of a
polygon, in other words, how the polygon is represented on the screen. The
options are:
POLYGON_POINT - the polygon is rendered as points drawn at the vertices.
POLYGON_LINE - the polygon is rendered as lines drawn between consecutive
vertices.
POLYGON_FILL - the polygon is rendered by filling the interior between the
vertices. The default mode.
You are essentially looking for a combination of POLYGON_FILL and
POLYGON_LINE. This *is* something that is supported directly by OpenGL but
for some reason J3D isn't supporting it.
I think a workaround (SUN J3D TEAM PLEASE VERIFY) would be to
1) Make a complete copy of your Shape3D and then
- Set the Appearance of the original with PolygonAttributes to
fill the polygons (default)
- Set the Appearance of the copy with PolygonAttributes to draw
the outlines.
2) Set up your SceneGraph such that you can use a SharedGroup and an
alternate appearance for the second instance of the Shape3D.
Important note: You will likely run into issues with Z buffer tests when
this occurs as the lines and the polygons will more than likely end up with
the same Z value. Therefore you should be able to adjust your Z test and
order the rendering of your Shape3D objects as appropriate.
The bottom line is that J3D could change the polygonMode member of
PolygonAttributes to hold multiple modes, not just a single one. Then
everything would work with a single change of the PolygonAttributes.
How about it Sun?
At 11:06 AM 9/29/2000 -0400, you wrote:
>Sorry. My original goal is to put borders around each polygon in a Shape3D.
Mark Ferneau 240-462-6262 (cell)
Director of Adv. Technology 801-437-4608 (efax)
Xtivia Technologies, Inc. 732-469-5954 x629 (NJ office)
[EMAIL PROTECTED] 301-279-5703 (home office)
http://www.xtivia.com/ [EMAIL PROTECTED] (wireless email)
===========================================================================
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".