Digital Art Zone

 
     
DzFacetMesh
Posted: 13 October 2012 06:49 AM   [ Ignore ]
New Member
Total Posts:  3
Joined  2011-02-12

I’m trying to update some old 3.x code to 4.5, and I see that DzPolyMesh has been replaced with
DzFacetMesh.  And it looks like DzFacet is limited to triangles and quads.

Are polys supported anymore?  If so, where does that come from now?

// Old 3.x code
 
int numTris  = ((DzPolyMesh*)geom)->getNumTris();
 
int numQuads = ((DzPolyMesh*)geom)->getNumQuads();
 
int numPolys = ((DzPolyMesh*)geom)->getNumPolys(); 
// 4.5 code
 
int numTris=0;
 
int numQuads=0;
 
int numPolys=0// ??

 
DzFacetMesh *dzMesh qobject_cast<DzFacetMesh*>(geom);
 if(
dzMesh{
    
for(int i=0dzMesh->getNumFacets(); i++) {
       DzFacet face 
dzMesh->getFacet(i);
       if(
face.isTri()) numTris++;
       if(
face.isQuad()) numQuads++;
    
}
 } 

This is for the C++ SDK.

Profile
 
 
Posted: 15 October 2012 08:41 AM   [ Ignore ]   [ # 1 ]
Administrator
Avatar
RankRank
Total Posts:  373
Joined  2003-10-09

ngons (polygons with > 4 sides) are no longer supported. Geometry importers are responsible for handling ngons. Those provided by DAZ 3D should already triangulate any ngons they encounter during import.

-Rob

 Signature 

- Documentation Center
- Install Manager
- DAZ Studio 4.x
- DSON Importer
- DSON File Format Specification

Profile
 
 
Posted: 18 October 2012 05:04 PM   [ Ignore ]   [ # 2 ]
New Member
Total Posts:  3
Joined  2011-02-12

Thanks. Got it working. smile

Profile