Message 1 of 6
Holes in Polygons possible using FbxMesh?
Not applicable
09-28-2017
07:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello!
I'm trying to read proprietary 3D data and convert it to FBX.
The proprietary format carries it's 3D data as faces with holes. So I have 1 defining polygon boundary which can contain multiple polygons as "holes".
I have found that the FbxMesh seems to support Polygons with holes (at least I found the function "SetPolyHoleFunction", I assumed from the description that I can use it to mark a polygon as a hole.)
Please consider the following code:
FbxMesh * lMsh = FbxMesh::Create(m_pScene, "myname"); lMsh->BeginPolygon(-1, -1, 1, true); lMsh->SetControlPointAt(myPoint1, 1); lMsh->AddPolygon(1); lMsh->SetControlPointAt(myPoint2, 2); lMsh->AddPolygon(2); lMsh->SetControlPointAt(myPoint3, 3); lMsh->AddPolygon(3); lMsh->SetControlPointAt(myPoint4, 4); lMsh->AddPolygon(4); lMsh->EndPolygon(); lMsh->BeginPolygon(-1, -1, 1, true); lMsh->SetControlPointAt(myPoint5, 5); lMsh->AddPolygon(5); lMsh->SetControlPointAt(myPoint6, 6); lMsh->AddPolygon(6); lMsh->SetControlPointAt(myPoint7, 7); lMsh->AddPolygon(7); lMsh->SetControlPointAt(myPoint8, 8); lMsh->AddPolygon(8); lMsh->EndPolygon(); bool ret = lMsh->SetPolyHoleInfo(1, true);
Unfortunately "SetPolyHoleInfo" ALWAYS returns "false" -> So it was unsuccessfull setting the HoleInfo 😞
Is my assumption, of what "SetPolyHoleInfo" is supposed to be used for wrong? Can anybody point me to a direction how I can create Polygons with holes in them?
Thank you so much!