RE: [Plib-devel] A Second Look Into SSG
Brought to you by:
sjbaker
From: Fay J. F C. AAC/W. <joh...@eg...> - 2004-09-13 14:54:52
|
Gentlemen, I'd like to add another comment about "ssgVtxTable.cxx" in the function "hot_triangles". This, I think, is important enough to stand on its own and not get put at the tail end of another e-mail. Since we can do the "inside the triangle" test with six multiplies, I propose moving it earlier in the list of tests. I also propose checking the "_ssgIsHotTest" variable (see line 674) earlier. The "sgMakePlane" function is rather slow (involving several multiplies and a square root) and should be moved down. I propose the following ordering: (a) Check whether the "_ssgIsHotTest" variable is enabled. This is a boolean test. (Presently on line 674) (b) Check whether the point's x- and y-coordinates are within the triangle's bounding box and whether the point's z-coordinate is below the triangle entirely. This is presently the first test and involves 15 comparisons and 14 boolean operations. (Presently on lines 665-669) (c) Check whether the point's x-and y-coordinates are within the triangle. This is the six-multiply test that I just put into a previous e-mail. (Presently on lines 7094-716) (d) Create the plane of the triangle by calling "sgMakePlane". (Presently on line 672) (e) Test whether the plane is vertical or upside-down. (Presently on line 678) (f) Find the height of the point on the plane of the triangle beneath the specified point and make sure it is less than the height of the specified point itself. (Presently on lines 684 and 688) With the calculation in (c) having already been done, there is no need to perform the test on lines 693-694 as to whether the z-coordinate in the plane of the triangle is outside the triangle's bounding box. Thoughts, anyone? John F. Fay joh...@eg... 850-729-6330 -----Original Message----- From: pli...@li... [mailto:pli...@li...] On Behalf Of Wolfram Kuss Sent: Monday, September 13, 2004 6:53 AM To: pli...@li... Subject: Re: [Plib-devel] A Second Look Into SSG <snip> >(15) In "ssgVtxTable.cxx" on line 704ff, I can do this test with six >multiplies. Is there enough of a demand for it that somebody is willing to >put it into CVS for me? I would guess the FGFS people would appreciate it! >I have some more comments to "ssgVtxTable.cxx" and the geometry functions, >specifically in terms of making them more efficient; does anybody want to >hear them? Certainly, I can not promise any time though. Thank you for your work! Bye bye, Wolfram. ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php _______________________________________________ plib-devel mailing list pli...@li... https://lists.sourceforge.net/lists/listinfo/plib-devel |