Hi Jyothi,
Which version of Java3D are you using (DirectX/OpenGL) ?
DirectX version have special challenge to implement Quad
in wireframe mode. It is because DirectX don't support
Quad at all. To simulate it, we break Quad into two triangles
and rendering it by building an index (so vertex will not pass
twice). This works fine for polygon fill and point mode
and has comparable performance with respect to OpenGL.
However for wireframe (line) mode this result in an addtional
line in the diagonal of Quad. This is not acceptable.
If instead we reformat the input and draw the line using
LINESTRIP then all faces will draw without consider back face
culling. This is also not acceptable.
To workaround this, currently we draw Quad one by one using
LINESTRIP and compute the front/back face manually
So drawing wireframe QuadArray/IndexedQuadArray is really
slow in DirectX version. If anyone has a better method
to workaround DirectX limitation, please let us know.
The bug that you found in missing triangle in wireframe mode
is probably due to back face culling. Please set the cull mode
correctly or define the Quad vertex in correct order. You can
also try to use CULL_NONE to verify this.
Thanks.
- Kelvin
------------------
Java 3D Team
Sun Microsystems Inc.
>X-Unix-From: [EMAIL PROTECTED] Fri Jul 6 00:08:24 2001
>Delivered-To: [EMAIL PROTECTED]
>Date: Fri, 6 Jul 2001 17:03:58 +1000
>From: Jyothi Mohan <[EMAIL PROTECTED]>
>Subject: [JAVA3D] Problem with IndexedGeometryArray
>To: [EMAIL PROTECTED]
>
>Hi,
> Can anyone help me. I am trying to use IndexedGeometryArray for
>drawing a box with flaps open. I am able to draw the box successfully
>passing the coordinates by reference & colors.
> box = new IndexedQuadArray(vertexCount, IndexedQuadArray.COORDINATES|
> IndexedQuadArray.COLOR_3|
> IndexedQuadArray.BY_REFERENCE,
> indexCount);
>
> box.setCoordRef3f(indexedP3fVerts);
> box.setColorRef3f(indexedC3fClrs);
> box.setCoordinateIndices(0, indices);
> box.setColorIndices(0, indices);
> box.setCapability(Geometry.ALLOW_INTERSECT);
> setGeometry(box);
> Appearance app = new Appearance();
> setAppearance(app);
>
>I wanted to draw the wire frame model of the same and set the polygon
>attriibutes as follows,
>
> PolygonAttributes pa = new PolygonAttributes();
> pa.setPolygonMode(PolygonAttributes.POLYGON_LINE);
> pa.setCullFace(PolygonAttributes.CULL_NONE);
> app.setPolygonAttributes(pa);
>
>I did not get any output at all. I tried again by removing the
>IndexedQuadArray.COLOR_3 option and the setColorRef3 and SetColorIndices
>from the code and added the following code
> ColoringAtttributes ca = new ColoringArttributes();
> app.setColoringAttributes(ca);
>
>This also doesn't help.
>Is there anything fundamentally wrong? Can I use IndexedGeometryArray only
>for drawing filled polygons?
>Please help
>
>Jyothi
>
>CAUTION - This message may contain privileged and confidential information
intended only for the use of the addressee named above. If you are not the
intended recipient of this message you are hereby notified that any use,
dissemination, distribution or reproduction of this message is prohibited. If
you have received this message in error please notify AMCOR immediately. Any
views expressed in this message are those of the individual sender and may not
necessarily reflect the views of AMCOR.
>
>===========================================================================
>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".