For the TRIANGLE_STRIP_ARRAY primitive you must set the stripCounts
with GeometryInfo.setStripCounts().  The stripCounts array is an array
of integers that indicate how many vertices are to be used for each
strip.  For example, an array of {5, 4, 6} indicates that there are
three strips of length 5, 4, and 6, and therefore it would expect to
have 15 vertices.

If you are sending in individual triangles that you want to convert to
strips with the stripifier, set the primitive to TRIANGLE_ARRAY and
let the stripifier change it to TRIANGLE_STRIP_ARRAY.

-Paul

> Delivered-To: [EMAIL PROTECTED]
> X-Accept-Language: en
> MIME-Version: 1.0
> Content-Transfer-Encoding: 7bit
> Date: Sun, 21 Oct 2001 17:38:41 +0300
> From: Kostantinos Rekalidis <[EMAIL PROTECTED]>
> Subject: [JAVA3D] Geometry Info class
> To: [EMAIL PROTECTED]
>
> Hi all
> I have 3 arrays with the vertices and their normals and colors
> respectively. Some element of these arrays are the same. For example the
> 2nd, 4th, 7th, 24th, 36th, and 49th vertex, but it belong in other
> triangle every time. I use the GeometryInfo class to make the geometry
> of that shape like that:
>
> Appearance appearance = new Appearance();
> PolygonAttributes polyAttrib = new PolygonAttributes();
>   polyAttrib.setCullFace(PolygonAttributes.CULL_BACK);
>   appearance.setPolygonAttributes(polyAttrib);
>   appearance.setMaterial(null);
>
>   GeometryInfo gi = new GeometryInfo(GeometryInfo.TRIANGLE_STRIP_ARRAY);
>
>    gi.setCoordinates(totalVertex);
>   gi.setColors(totalExitance);
>   gi.setNormals(totalNormal);
>
>      Stripifier st = new Stripifier();
>      st.stripify(gi);
>
>   GeometryArray geometry = gi.getGeometryArray();
>
>      Shape3D shape = new Shape3D();
>         shape.setAppearance(appearance);
>      shape.setGeometry(geometry);
>
> Unfortunately i take the run time exception : StripCounts insonsistent
> with primitive
>
> What is going wrong?
>
> Thanks in advance
>
> P.S Is anyone have ever made a radiosity rendering engine in Java3D ?
>
> ===========================================================================
> 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".

Reply via email to