Commit c6088ade authored by CGoGN GIT Supervisor's avatar CGoGN GIT Supervisor
Browse files

Merge branch 'master' of /home/jund/CGoGN

* 'master' of /home/jund/CGoGN:
  adding mergeFaces on map3
  Resolving bug in MarkerForTraversor and compilation pb for importMoka and exportPov
  import Tet : option to invert, correction of mergeFace gmap2, removing extra createHexa in polyhedron3D
  removing unnecessary check() in subdivision3
  correcting embedding error for edge orbit on splitFace on 3gmap, replacing name functions in gmap1 to use cycle
  using traversor for exportPov, correction of volumic function (slicing and subdivision)
  small modification function sliceConvexVolumes
  problem on polyhedronView
  starting import function for Moka and improving export for povray
  adding slicing function for volume and conversion hexahedrongrid to tetrahedron mesh
  add export obj, function to slice a volume with a plane, extrusion of surfaces to volumes from lionel
parents a4b94aa3 b70ccab9
...@@ -34,27 +34,31 @@ SimpleGMap3::SimpleGMap3() ...@@ -34,27 +34,31 @@ SimpleGMap3::SimpleGMap3()
normal = myMap.addAttribute<VEC3, VERTEX>("normal"); normal = myMap.addAttribute<VEC3, VERTEX>("normal");
volume = myMap.addAttribute<VEC3, VOLUME>("volume"); volume = myMap.addAttribute<VEC3, VOLUME>("volume");
CellMarker<EDGE> mE(myMap);
Algo::Modelisation::Primitive3D<PFP> primCat(myMap,position); Algo::Modelisation::Primitive3D<PFP> primCat(myMap,position);
Dart d = primCat.hexaGrid_topo(3,1,1); Dart d = primCat.hexaGrid_topo(3,1,1);
primCat.embedHexaGrid(2,1,1); primCat.embedHexaGrid(2,1,1);
std::cout << "AAA"<< std::endl;
myMap.check(); myMap.check();
std::cout << "AAA"<< std::endl; // DartMarker markOrient(myMap);
DartMarker markOrient(myMap); // std::vector<Dart> orient;
std::vector<Dart> orient; // FunctorStore fs(orient);
FunctorStore fs(orient);
d = 49; // d = 49;
myMap.foreach_dart_of_oriented_volume(d, fs); // myMap.foreach_dart_of_oriented_volume(d, fs);
// for(std::vector<Dart>::iterator it = orient.begin() ; it != orient.end() ; ++it)
// markOrient.mark(*it);
std::cout << "AAA"<< std::endl; // SelectorMarked sm(markOrient);
// std::cout << "AAA"<< std::endl;
// Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
for(std::vector<Dart>::iterator it = orient.begin() ; it != orient.end() ; ++it) // Geom::Plane3D<PFP::REAL> pl(VEC3(0.5,0.14,0.5),VEC3(1.5,0.45,0.5),VEC3(0.5,0.15,1.5));
markOrient.mark(*it); Geom::Plane3D<PFP::REAL> pl(VEC3(-1,-0.5,-0.5),VEC3(-1,-0.5,0.5),VEC3(1,0.5,0.5));
Algo::Modelisation::sliceConvexVolume<PFP>(myMap, position, d, pl);
SelectorMarked sm(markOrient); myMap.check();
std::cout << "AAA"<< std::endl;
//Algo::Modelisation::catmullClarkVol<PFP,PFP::TVEC3,PFP::VEC3>(myMap, position, sm);
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i)) for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(2,0,0); position[i] += VEC3(2,0,0);
...@@ -77,6 +81,10 @@ SimpleGMap3::SimpleGMap3() ...@@ -77,6 +81,10 @@ SimpleGMap3::SimpleGMap3()
myMap.cutEdge(d); myMap.cutEdge(d);
position[myMap.phi1(d)] = mid; position[myMap.phi1(d)] = mid;
myMap.splitFace(d,myMap.phi1(myMap.phi1(myMap.phi1(d))));
myMap.check();
for(unsigned int i = position.begin() ; i != position.end() ; position.next(i)) for(unsigned int i = position.begin() ; i != position.end() ; position.next(i))
position[i] += VEC3(0,2,0); position[i] += VEC3(0,2,0);
...@@ -112,12 +120,13 @@ void SimpleGMap3::cb_redraw() ...@@ -112,12 +120,13 @@ void SimpleGMap3::cb_redraw()
glDisable(GL_LIGHTING); glDisable(GL_LIGHTING);
glLineWidth(1.0f); glLineWidth(1.0f);
Algo::Render::GL1::renderTopoGMD3<PFP>(myMap, position, true, true, true, true, 0.9f, 0.9f, 0.9f, 0.9f); Algo::Render::GL1::renderTopoGMD3<PFP>(myMap, position, true, true, true, true, 0.9f, 0.9f, 0.9f, 0.9f);
// Algo::Render::GL1::renderTopoMD3<PFP>(myMap, position, true, true, true, 0.9f, 0.9f, 0.9f);
glDisable(GL_LIGHTING); // glDisable(GL_LIGHTING);
glColor3f(1.0f, 1.0f, 1.0f); // glColor3f(1.0f, 1.0f, 1.0f);
glLineWidth(1.0f); // glLineWidth(1.0f);
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); // glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
Algo::Render::GL1::renderTriQuadPoly<PFP>(myMap, Algo::Render::GL1::LINE, 1.0,position, normal); // Algo::Render::GL1::renderTriQuadPoly<PFP>(myMap, Algo::Render::GL1::LINE, 1.0,position, normal);
} }
/********************************************************************************************** /**********************************************************************************************
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#include "Topology/gmap/embeddedGMap3.h" #include "Topology/gmap/embeddedGMap3.h"
//#include "Topology/map/embeddedMap3.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
...@@ -40,6 +41,7 @@ struct PFP: public PFP_STANDARD ...@@ -40,6 +41,7 @@ struct PFP: public PFP_STANDARD
{ {
// definition of the map // definition of the map
typedef EmbeddedGMap3 MAP ; typedef EmbeddedGMap3 MAP ;
// typedef EmbeddedMap3 MAP ;
}; };
typedef PFP::MAP MAP ; typedef PFP::MAP MAP ;
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <iostream> #include <iostream>
#define WITH_GMAP 1 // #define WITH_GMAP 1
#include "Topology/generic/parameters.h" #include "Topology/generic/parameters.h"
#ifdef WITH_GMAP #ifdef WITH_GMAP
......
...@@ -129,15 +129,15 @@ int main(int argc, char **argv) ...@@ -129,15 +129,15 @@ int main(int argc, char **argv)
prim3.transform(trf); prim3.transform(trf);
// create a subdivided cube // create a subdivided cube
Algo::Modelisation::Polyhedron<PFP> prim4(myMap, position); // Algo::Modelisation::Polyhedron<PFP> prim4(myMap, position);
prim4.cube_topo(4, 5, 6); // prim4.cube_topo(4, 5, 6);
prim4.embedCube(50.0f,50.0f, 50.0f); // prim4.embedCube(50.0f,50.0f, 50.0f);
//transform //transform
trf.identity(); trf.identity();
Geom::rotate<float>(1.0f,1.0f,1.0f,0.4f,trf); Geom::rotate<float>(1.0f,1.0f,1.0f,0.4f,trf);
Geom::translate<float>(270.0f,0.0,0.0,trf); Geom::translate<float>(270.0f,0.0,0.0,trf);
prim4.transform(trf); // prim4.transform(trf);
// bounding box // bounding box
Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position); Geom::BoundingBox<PFP::VEC3> bb = Algo::Geometry::computeBoundingBox<PFP>(myMap, position);
......
...@@ -3,7 +3,7 @@ installer les paquets suivants: ...@@ -3,7 +3,7 @@ installer les paquets suivants:
cmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev cmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev
Pour compiler CGoGN: Pour compiler CGoGN:
- aller dans ThirdParty, cd build, taper "cmake ..", puis make ( avec -j x si vous avez x core sur votre machine) - aller dans ThirdParty, cd build, taper "cmake .", puis make ( avec -j x si vous avez x core sur votre machine)
On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty) On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty)
On peut aussi compiler en debug en créant un répertoir qui fini par Debug à la place de build On peut aussi compiler en debug en créant un répertoir qui fini par Debug à la place de build
......
...@@ -68,6 +68,15 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type ...@@ -68,6 +68,15 @@ bool exportPLYnew(typename PFP::MAP& map, const std::vector<VertexAttribute<type
template <typename PFP> template <typename PFP>
bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good = allDarts) ; bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good = allDarts) ;
/**
* export the map into a OBJ file
* @param the_map map to be exported
* @param filename filename of obj file
* @return true
*/
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good = allDarts) ;
/** /**
* export the map into a Trian file * export the map into a Trian file
* @param the_map map to be exported * @param the_map map to be exported
......
...@@ -389,6 +389,72 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3> ...@@ -389,6 +389,72 @@ bool exportOFF(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>
return true ; return true ;
} }
/* /*
template <typename PFP>
bool exportOBJ(typename PFP::MAP& map, const typename PFP::TVEC3& position, const char* filename, const FunctorSelect& good)
{
typedef typename PFP::MAP MAP;
typedef typename PFP::VEC3 VEC3;
std::ofstream out(filename, std::ios::out) ;
if (!out.good())
{
CGoGNerr << "Unable to open file " << CGoGNendl ;
return false ;
}
unsigned int nbDarts = map.getNbDarts() ;
std::vector<unsigned int> facesSize ;
std::vector<std::vector<unsigned int> > facesIdx ;
facesSize.reserve(nbDarts/3) ;
facesIdx.reserve(nbDarts/3) ;
std::map<unsigned int, unsigned int> vIndex ;
unsigned int vCpt = 0 ;
std::vector<unsigned int> vertices ;
vertices.reserve(nbDarts/6) ;
CellMarker<VERTEX> markV(map) ;
TraversorF<MAP> t(map, good) ;
for(Dart d = t.begin(); d != t.end(); d = t.next())
{
std::vector<unsigned int> fidx ;
fidx.reserve(8) ;
Traversor2FV<typename PFP::MAP> tfv(map, d) ;
for(Dart it = tfv.begin(); it != tfv.end(); it = tfv.next())
{
unsigned int vNum = map.getEmbedding(VERTEX, it) ;
if(!markV.isMarked(it))
{
markV.mark(it) ;
vIndex[vNum] = vCpt++ ;
vertices.push_back(vNum) ;
}
fidx.push_back(vIndex[vNum]+1) ;
}
facesIdx.push_back(fidx) ;
}
out << "#OBJ - Export from CGoGN" << std::endl ;
for(unsigned int i = 0; i < vertices.size(); ++i)
{
const VEC3& v = position[vertices[i]] ;
out << "v " << v[0] << " " << v[1] << " " << v[2] << std::endl ;
}
out << std::endl;
for(unsigned int i = 0; i < facesIdx.size(); ++i)
{
out << "f ";
for(unsigned int j = 0; j < facesIdx[i].size(); ++j)
out << " " << facesIdx[i][j] ;
out << std::endl ;
}
out.close() ;
return true ;
}
template <typename PFP> template <typename PFP>
bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good) bool exportPlyPTMgeneric(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename, const FunctorSelect& good)
{ {
......
...@@ -15,13 +15,13 @@ namespace ExportPov ...@@ -15,13 +15,13 @@ namespace ExportPov
{ {
template <typename PFP> template <typename PFP>
void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3) void exportTriangleWire(std::ofstream& out,typename PFP::VEC3& p1,typename PFP::VEC3& p2,typename PFP::VEC3& p3, float width)
{ {
out << "cylinder { <" << p1[0] << "," << p1[2] << "," << p1[1] << ">, <" << p2[0] << "," << p2[2] << "," << p2[1] << ">, 0.5 }" << std::endl; out << "cylinder { <" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << width << "}" << std::endl;
out << "cylinder { <" << p1[0] << "," << p1[2] << "," << p1[1] << ">, <" << p3[0] << "," << p3[2] << "," << p3[1] << ">, 0.5 }" << std::endl; out << "cylinder { <" << p1[0] << "," << p1[1] << "," << p1[2] << ">, <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, " << width << "}" << std::endl;
out << "cylinder { <" << p3[0] << "," << p3[2] << "," << p3[1] << ">, <" << p2[0] << "," << p2[2] << "," << p2[1] << ">, 0.5 }" << std::endl; out << "cylinder { <" << p3[0] << "," << p3[1] << "," << p3[2] << ">, <" << p2[0] << "," << p2[1] << "," << p2[2] << ">, " << width << "}" << std::endl;
} }
template <typename PFP> template <typename PFP>
...@@ -39,33 +39,26 @@ void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, VertexAttribute ...@@ -39,33 +39,26 @@ void exportMeshPlain(std::ofstream& out, typename PFP::MAP& map, VertexAttribute
{ {
out << "#declare " << meshName << "= union {" << std::endl; out << "#declare " << meshName << "= union {" << std::endl;
DartMarkerStore traite(map); TraversorF<typename PFP::MAP > travF(map);
for(Dart d = map.begin() ; d!= map.end() ; map.next(d)) for(Dart d = travF.begin() ; d!= travF.end() ; travF.next(d))
{ {
if(good(d) && !traite.isMarked(d)) if(good(d))
{ {
unsigned int nb = 0; unsigned int nb = map.faceDegree(d);
Dart dd = d;
do
{
traite.mark(dd);
dd = map.phi1(dd);
nb++;
} while(dd != d);
if(nb == 3) if(nb == 3)
Algo::ExportPov::exportTrianglePlain<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]); Algo::ExportPov::exportTrianglePlain<PFP>(out,position[d],position[map.phi1(d)],position[map.phi1(map.phi1(d))]);
else else
{ {
out << "polygon{ " << nb+1 << std::endl; out << "polygon{ " << nb+1 << std::endl;
dd = d; Dart dd = d;
do do
{ {
out << "<" << position[dd][0] << "," << position[dd][2] << "," << position[dd][1] << ">," << std::endl; out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << std::endl;
dd = map.phi1(dd); dd = map.phi1(dd);
} while(dd!=d); } while(dd!=d);
out << "<" << position[d][0] << "," << position[d][2] << "," << position[d][1] << ">" << std::endl; out << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">" << std::endl;
out << "}" << std::endl; out << "}" << std::endl;
} }
} }
...@@ -177,38 +170,18 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, VertexAttribute< ...@@ -177,38 +170,18 @@ void exportMeshWire(std::ofstream& out, typename PFP::MAP& map, VertexAttribute<
{ {
out << "#declare " << meshName << "= union {" << std::endl; out << "#declare " << meshName << "= union {" << std::endl;
DartMarkerStore traite(map); TraversorE<typename PFP::MAP > travE(map);
for(Dart d = map.begin() ; d!= map.end() ; map.next(d)) for(Dart d = travE.begin() ; d!= travE.end() ; d = travE.next())
{ {
if(good(d) && !traite.isMarked(d)) if(good(d))
{ {
unsigned int nb = 0; Dart dd = map.phi2(d);
Dart dd = d;
do
{
traite.mark(dd);
dd = map.phi1(dd);
nb++;
} while(dd != d);
if(nb == 3) out << "cylinder{ " << std::endl;
Algo::ExportPov::exportTriangleWire<PFP>(out,position[dd],position[map.phi1(dd)],position[map.phi1(map.phi1(dd))]); out << "<" << position[d][0] << "," << position[d][1] << "," << position[d][2] << ">," << std::endl;
else out << "<" << position[dd][0] << "," << position[dd][1] << "," << position[dd][2] << ">," << 0.5 << std::endl;
{ out << "}" << std::endl;
dd = d;
do
{
if(position[dd][0]!=position[map.phi1(dd)][0] || position[dd][1]!=position[map.phi1(dd)][1] || position[dd][2]!=position[map.phi1(dd)][2])
{
out << "cylinder{ " << std::endl;
out << "<" << position[dd][0] << "," << position[dd][2] << "," << position[dd][1] << ">," << std::endl;
out << "<" << position[map.phi1(dd)][0] << "," << position[map.phi1(dd)][2] << "," << position[map.phi1(dd)][1] << ">, 0.5" << std::endl;
out << "}" << std::endl;
}
dd = map.phi1(dd);
} while(dd != d);
}
} }
} }
......
...@@ -125,11 +125,11 @@ typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const Vert ...@@ -125,11 +125,11 @@ typename PFP::VEC3 vertexBorderNormal(typename PFP::MAP& map, Dart d, const Vert
CellMarker<FACE> f(map); CellMarker<FACE> f(map);
FunctorStore fs(faces); FunctorStore fs(faces);
map.foreach_dart_of_oriented_vertex(d,fs); map.foreach_dart_of_vertex(d,fs);
for(std::vector<Dart>::iterator it = faces.begin() ; it != faces.end() ; ++it) for(std::vector<Dart>::iterator it = faces.begin() ; it != faces.end() ; ++it)
{ {
if(!f.isMarked(*it) && map.phi3(*it)==*it) if(!f.isMarked(*it) && map.isBoundaryFace(*it))
{ {
f.mark(*it); f.mark(*it);
VEC3 n = faceNormal<PFP>(map, *it, position); VEC3 n = faceNormal<PFP>(map, *it, position);
......
...@@ -79,7 +79,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const ...@@ -79,7 +79,7 @@ typename PFP::REAL convexPolyhedronVolume(typename PFP::MAP& map, Dart d, const
for(typename std::vector<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face) for(typename std::vector<Dart>::iterator face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
{ {
Dart e = *face ; Dart e = *face ;
if(map.isFaceTriangle(e)) if(map.isCycleTriangle(e))
{ {
VEC3 p1 = position[e] ; VEC3 p1 = position[e] ;
VEC3 p2 = position[map.phi1(e)] ; VEC3 p2 = position[map.phi1(e)] ;
......
...@@ -46,7 +46,7 @@ namespace Import ...@@ -46,7 +46,7 @@ namespace Import
* @param filename * @param filename
* @param attrNames attribute names * @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import * @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull * @return a boolean indicating if import was successful
*/ */
template <typename PFP> template <typename PFP>
bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false); bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false);
...@@ -57,23 +57,23 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector ...@@ -57,23 +57,23 @@ bool importMesh(typename PFP::MAP& map, const std::string& filename, std::vector
* @param filename * @param filename
* @param attrNames attribute names * @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import * @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull * @return a boolean indicating if import was successful
*/ */
template <typename PFP> template <typename PFP>
bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false); bool importMeshV(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames, bool mergeCloseVertices = false);
/** /**
* import a mesh and extrud it * import a mesh and extrude it
* @param map the map in which the function imports the mesh * @param map the map in which the function imports the mesh
* @param filename * @param filename
* @param attrNames attribute names * @param attrNames attribute names
* @param mergeCloseVertices a boolean indicating if close vertices should be merged during import * @param mergeCloseVertices a boolean indicating if close vertices should be merged during import
* @return a boolean indicating if import was successfull * @return a boolean indicating if import was successful
*/ */
template <typename PFP> template <typename PFP>
bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames); bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, std::vector<std::string>& attrNames);
/** /*
* import a MOKA file * import a MOKA file
* @param gmap the gmap in which the function imports the mesh * @param gmap the gmap in which the function imports the mesh
* @param filename * @param filename
...@@ -82,7 +82,6 @@ bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, st ...@@ -82,7 +82,6 @@ bool importMeshToExtrude(typename PFP::MAP& map, const std::string& filename, st
template <typename PFP> template <typename PFP>
bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vector<std::string>& attrNames); bool importMoka(typename PFP::MAP& gmap, const std::string& filename, std::vector<std::string>& attrNames);
/** /**
* import a Choupi file * import a Choupi file
* @param map * @param map
...@@ -102,15 +101,13 @@ template <typename PFP> ...@@ -102,15 +101,13 @@ template <typename PFP>
bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenameNode, const std::string& filenameELE, std::vector<std::string>& attrNames); bool importNodeWithELERegions(typename PFP::MAP& map, const std::string& filenameNode, const std::string& filenameELE, std::vector<std::string>& attrNames);
template <typename PFP> template <typename PFP>
bool importTet(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f); bool importTet(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f, bool invertTetra=false);
template <typename PFP> template <typename PFP>
bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f); bool importMoka(typename PFP::MAP& the_gmap, const std::string& filename, std::vector<std::string>& attrNames);
//template <typename PFP> template <typename PFP>
//bool importObjWithTex(typename PFP::MAP& map, const std::string& filename); bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
//
} // namespace Import } // namespace Import
...@@ -119,10 +116,10 @@ bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vect ...@@ -119,10 +116,10 @@ bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vect
} // namespace CGoGN } // namespace CGoGN
#include "Algo/Import/importMesh.hpp" #include "Algo/Import/importMesh.hpp"
#include "Algo/Import/importMoka.hpp"
//#include "Algo/Import/importObjTex.hpp" //#include "Algo/Import/importObjTex.hpp"
#include "Algo/Import/importObjEle.hpp" #include "Algo/Import/importObjEle.hpp"
#include "Algo/Import/importTet.hpp" #include "Algo/Import/importTet.hpp"
#include "Algo/Import/importMoka.hpp"
#include "Algo/Import/importTs.hpp" #include "Algo/Import/importTs.hpp"
#include "Algo/Import/importNodeEle.hpp" #include "Algo/Import/importNodeEle.hpp"
......
...@@ -30,7 +30,6 @@ ...@@ -30,7 +30,6 @@
#include <vector> #include <vector>
#include <string> #include <string>
//#include "Topology/generic/attributeHandler.h"
#include "Geometry/vector_gen.h" #include "Geometry/vector_gen.h"
#include "Geometry/matrix.h" #include "Geometry/matrix.h"
...@@ -57,7 +56,7 @@ namespace Import ...@@ -57,7 +56,7 @@ namespace Import
namespace ImportVolumique namespace ImportVolumique
{ {
enum ImportType { UNKNOWNVOLUME , TET, OFF, TS, NODE}; enum ImportType { UNKNOWNVOLUME , TET, OFF, TS, MOKA, NODE};
} }