From bf01793bd88518a541024a1afd321a618eb8aa02 Mon Sep 17 00:00:00 2001 From: cignoni Date: Thu, 6 Oct 2011 14:00:54 +0000 Subject: [PATCH] Added support for point clouds to openctm. Using an hack becouse openctm officially do not want it... --- wrap/io_trimesh/export_ctm.h | 26 +++++++++++++++++--------- wrap/io_trimesh/import_ctm.h | 18 +++++++++++------- 2 files changed, 28 insertions(+), 16 deletions(-) diff --git a/wrap/io_trimesh/export_ctm.h b/wrap/io_trimesh/export_ctm.h index 9befd082..54faee9c 100644 --- a/wrap/io_trimesh/export_ctm.h +++ b/wrap/io_trimesh/export_ctm.h @@ -44,7 +44,7 @@ namespace vcg { std::vector aColors(aVertCount*4); std::vector aQuality(aVertCount*4); std::vector aIndices(aTriCount*3); - + int err; CTMcontext context; // Create a new exporter context context = ctmNewContext(CTM_EXPORT); @@ -54,26 +54,32 @@ namespace vcg { ctmVertexPrecision(context, relativePrecision); } // Prepare vertex and faces - for(int i=0;i::AddVertices(m, vertCount); - for(int i=0;i::AddFaces(m, triCount); - for(int i=0;i