> Hi,
> Rene Weller wrote: >> Hello, >>> Could you please give a bit more details on what results you get >>> and how you obtain your triangle count? >> your code works fine and reports the correct number of 7962 >> triangles. But the stats-Function in the osgSceneViewer reports >> 7990 triangles for the same object. > > ok, thanks, now I can reproduce it. The difference in numbers comes > from the triangle striper that seems to introduce degenerate > triangles (although the stitch parameter is false). The Triangle > iterator skips these degenerate triangles, but since > calcPrimitiveCount (which is used by the statistics code) only > examines the length and type geo properties it counts them. > Actually both numbers are correct in a sense, because > calcPrimitiveCount gives you the number of triangles that are sent > to the graphics card while the TriangleIterator only gives you > "real" triangles. > > @Johannes: Can you comment on this behavior of the striper, please? > Is it expected to generate additional triangles even when stitch is > false? Yes, this behavior is correct. It creates degenerated triangles to swap the order of the last two vertices. Normally the algo tries to extend the strip to build a sequence of left-right turns. If only one adjacent face is available, we have to introduce a swap (i.e. a left-left or right-right turn), and therefore have to insert a degenerated triangle. regards, johannes > > Thanks, > Carsten --- Dr.-Ing. Johannes Behr tel: +49-6151-155-510 Fraunhoferstr. 5 fax: +49-6151-155-196 D-64283 Darmstadt skype: johannesbehr Germany web: www.igd.fhg.de/www/igd-a4/ ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
