Go Back   AC3D Forums > Technical > AC3D Developers
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 16th January 2004, 12:27 PM   #1
Thaellin
Senior Member
Professional user
 
Join Date: Jun 2003
Location: British Columbia, Canada
Posts: 255
Default ac_object_get_triangle_surfaces vs ac_object_get_surfacelist

Hi,

I'm working on a modification to my boolean plugin and notice that, for some tests, I am getting different results when fetching all triangulated surfaces from an object versus getting all surfaces then iterating them and triangulating as I go.

Example:
Code:
List * pObjectSurfaces = ac_object_get_surfacelist( (ACObject *)pSource );
List *pObjectTriangles = ac_object_get_triangle_surfaces((ACObject *)pSource );

List * pSingleSurface = 0;
list_for_each( pObjectSurfaces, pSingleSurface ) {
   List *pTriangulatedSurfaces = surface_get_triangulations( (Surface *)pSingleSurface->data );            

   for ( List *pTriListIterator = pTriangulatedSurfaces; 
          pTriListIterator; 
          pTriListIterator = pTriListIterator->next) 
   {
      // DO "SOMETHING"
   }
   ac_surfacelist_free(&pTriangulatedSurfaces);
}
Now, as presented, I'm triangulating each surface as it comes through. This is causing slightly different results that if I were to use "pObjectTriangles" in place of "pObjectSurfaces". Using the whole object triangulation output causes the correct result - using the per-surface triangulation causes a couple of my test cases to incorrectly classify some surfaces (in/out) later in the logic.

I don't understand why this is happenning, and am pretty much out of ideas. Any information or theories would be welcome.

Thanks,
-- Jeff
Thaellin is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



All times are GMT -4. The time now is 02:36 PM.


AC3D Forum
(C) Inivis Limited 2020