From 4568a67fb68049a9b754ec7269d29f373d2c041f Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 27 Oct 2009 15:47:17 +0000 Subject: [PATCH] templated the stuff for fast loading of bbox of ply --- wrap/ply/plystuff.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wrap/ply/plystuff.h b/wrap/ply/plystuff.h index a78b5b0b..e8fd48d2 100644 --- a/wrap/ply/plystuff.h +++ b/wrap/ply/plystuff.h @@ -160,7 +160,8 @@ bool CheckCacheTime( const char * fname, const char * cname ) // restituisce true se il file con la cache del bbox della mesh e' piu' recente del file ply // se fname2 != 0, allora deve essere piu recente anche di fname2. -static bool CheckBBoxCache( const char * fname, Box3d & box, const char *fname2=0 ) +template + static bool CheckBBoxCache( const char * fname, Box3 & box, const char *fname2=0 ) { char d[MAXBPATH]; char n[MAXBPATH]; @@ -259,8 +260,8 @@ struct PlyPoint3d // Calcola il bbox di un file ply - -bool ScanBBox( const char * fname, Box3d & box, bool use_cache=true ) +template +bool ScanBBox( const char * fname, Box3 & box, bool use_cache=true ) { if(use_cache) @@ -304,7 +305,7 @@ bool ScanBBox( const char * fname, Box3d & box, bool use_cache=true ) PlyPoint3d t; pf.Read( (void *)(&t) ); - box.Add( Point3d(t.x,t.y,t.z) ); + box.Add( Point3(t.x,t.y,t.z) ); } } else