diff --git a/wrap/io_tetramesh/import_ts.h b/wrap/io_tetramesh/import_ts.h index 3385f374..271a01f1 100644 --- a/wrap/io_tetramesh/import_ts.h +++ b/wrap/io_tetramesh/import_ts.h @@ -1,16 +1,7 @@ -/**************************************************************************** * VCGLib o o * * Visual and Computer Graphics Library o o * * _ O _ * -* Copyright(C) 2004 \/)\/ * * Visual Computing Lab /\/| * * ISTI - Italian National Research Council | * * \ * * All rights reserved. * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License (http://www.gnu.org/licenses/gpl.txt) * * for more details. * * * ****************************************************************************/ -/**************************************************************************** - History - -$Log: not supported by cvs2svn $ -Revision 1.3 2004/05/10 13:14:28 ganovelli -converted to library style (namespaces etc..) - - -****************************************************************************/ #ifndef __VCGLIB_IMPORTERSMF -#define __VCGLIB_IMPORTERSMF #include +#ifndef __VCGLIB_IMPORTERTS +#define __VCGLIB_IMPORTERTS +#define NULL 0 +#include namespace vcg { namespace tetra { @@ -18,17 +9,17 @@ namespace io { template class ImporterTS{ - - typedef typename MESHTYPE::VertexPointer VertexPointer; - typedef typename MESHTYPE::VertexType VertexType; - typedef typename MESHTYPE::TetraType FaceType; - typedef typename MESHTYPE::VertexIterator VertexIterator; - typedef typename MESHTYPE::FaceIterator FaceIterator; - typedef MESHTYPE::ScalarType ScalarType; + typedef typename MESHTYPE Tetramesh; + typedef typename Tetramesh::VertexPointer VertexPointer; + typedef typename Tetramesh::VertexType VertexType; + typedef typename Tetramesh::TetraType FaceType; + typedef typename Tetramesh::VertexIterator VertexIterator; + typedef typename Tetramesh::TetraIterator FaceIterator; + typedef typename Tetramesh::ScalarType ScalarType; typedef Point3 Point3x; - -int Load( MESHTYPE & m, const char * filename ) { +public: +int Load( Tetramesh & m, const char * filename ) { int nvertex; int ntetra; float x; @@ -60,10 +51,10 @@ int Load( MESHTYPE & m, const char * filename ) { //fscanf(f, "%f", &mass ); p1.ClearFlags(); p1.P()=Point3x(x, y,z ); - vert.push_back(p1); + m.vert.push_back(p1); } - tetra.reserve(ntetra*10); - vert.reserve(nvertex*10); + m.tetra.reserve(ntetra*10); + m.vert.reserve(nvertex*10); for (j=0;j