tCLinkage tExport bool tMeshTriangulator( const char *src_abc_path, const char *dst_abc_path, const MeshTriangulatorConfig *conf) { aiConfig iconf; aeConfig econf; aiContext *ictx = aiCreateContext(0); aiSetConfig(ictx, &iconf); if (!aiLoad(ictx, src_abc_path)) { return false; } aeContext *ectx = aeCreateContext(&econf); if (!aeOpenArchive(ectx, dst_abc_path)) { aiDestroyContext(ictx); return false; } { tContext tctx; tctx.setArchives(ictx, ectx); // todo tctx.doExport(); } aeDestroyContext(ectx); aiDestroyContext(ictx); return false; }
tCLinkage tExport bool tPointsExpander( const char *src_abc_path, const char *dst_abc_path, const PointsExpanderConfig *conf) { if (!src_abc_path || !dst_abc_path || !conf) { tLog("tPointsExpander(): parameter is null\n"); return false; } aiConfig iconf; aeConfig econf; aiContext *ictx = aiCreateContext(0); aiSetConfig(ictx, &iconf); if (!aiLoad(ictx, src_abc_path)) { return false; } aeContext *ectx = aeCreateContext(); if (!aeOpenArchive(ectx, dst_abc_path)) { aiDestroyContext(ictx); return false; } { tContext tctx; tctx.setExportConfig(econf); tctx.setArchives(ictx, ectx); tPointsExpanderConvert(&tctx, conf); } aeDestroyContext(ectx); aiDestroyContext(ictx); return false; }