Commit 1538d00e authored by untereiner's avatar untereiner

pas mal de modifications sur les IHM3 et l'import pour l'InESS

parent 39c7eaff
......@@ -84,6 +84,13 @@ bool exportCTM(typename PFP::MAP& the_map, const typename PFP::TVEC3& position,
template <typename PFP>
bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename PFP::TVEC3& position, const typename PFP::TVEC3 frame[3], const typename PFP::TVEC3 colorPTM[6], const FunctorSelect& good = SelectorTrue()) ;
/**
* export pout l'InESS
*/
template <typename PFP>
bool exportInESS(typename PFP::MAP& map, const char *filename, const typename PFP::TVEC3& position);
} // namespace Export
} // namespace Algo
......
......@@ -515,6 +515,23 @@ bool exportPLYPTM(typename PFP::MAP& map, const char* filename, const typename P
return true ;
}*/
template <typename PFP>
bool exportInESS(typename PFP::MAP& map, const char *filename, const typename PFP::TVEC3& position)
{
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 ;
}
}
} // namespace Export
} // namespace Algo
......
......@@ -106,17 +106,17 @@ public:
virtual void next(Dart& d) ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f) ;
virtual bool foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread = 0) ;
virtual bool foreach_dart_of_edge(Dart d, FunctorType& f) ;
virtual bool foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread = 0) ;
bool foreach_dart_of_oriented_face(Dart d, FunctorType& f);
virtual bool foreach_dart_of_face(Dart d, FunctorType& f) ;
bool foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread = 0);
virtual bool foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread = 0) ;
bool foreach_dart_of_oriented_volume(Dart d, FunctorType& f);
virtual bool foreach_dart_of_volume(Dart d, FunctorType& f) ;
bool foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread = 0);
virtual bool foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread = 0) ;
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f) ;
virtual bool foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread = 0) ;
/****************************************************
......
......@@ -238,7 +238,7 @@ inline void ImplicitHierarchicalMap3::next(Dart& d)
} while(d != Map3::end() && m_dartLevel[d] > m_curLevel) ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
{
DartMarkerStore mv(*this); // Lock a marker
bool found = false; // Last functor return value
......@@ -276,7 +276,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_vertex(Dart d, FunctorType
return found;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread)
{
Dart dNext = d;
......@@ -296,7 +296,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_edge(Dart d, FunctorType&
return false;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread)
{
Dart dNext = d ;
do
......@@ -308,7 +308,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_face(Dart d, Func
return false ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread)
{
if (foreach_dart_of_oriented_face(d,f)) return true;
......@@ -317,7 +317,7 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_face(Dart d, FunctorType&
return false;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread)
{
DartMarkerStore mark(*this); // Lock a marker
bool found = false; // Last functor return value
......@@ -353,12 +353,12 @@ inline bool ImplicitHierarchicalMap3::foreach_dart_of_oriented_volume(Dart d, Fu
return found;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
}
inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f)
inline bool ImplicitHierarchicalMap3::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
}
......
......@@ -286,7 +286,7 @@ void subdivideVolume(typename PFP::MAP& map, Dart d, typename PFP::TVEC3& positi
map.unsewFaces(map.phi1(map.phi1(e)));
//TODO utile ?
if(map.phi2(map.phi1(e)) != map.phi1(e))
//if(map.phi2(map.phi1(e)) != map.phi1(e))
map.unsewFaces(map.phi1(e));
e = map.phi2(map.phi_1(e));
......
......@@ -72,7 +72,7 @@ template <typename PFP>
bool importTs(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, float scaleFactor = 1.0f);
template <typename PFP>
bool importInESSSurfacique(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames);
bool importInESSSurfacique(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames, std::vector<std::pair<typename PFP::VEC3, typename PFP::VEC3> >& influences);
template <typename PFP>
bool importInESSVolumique(typename PFP::MAP& the_map, const std::string& filename, std::vector<std::string>& attrNames);
......
This diff is collapsed.
......@@ -178,7 +178,7 @@ Dart Polyhedron<PFP>::createOrientedPrism(typename PFP::MAP& the_map)
Dart top = the_map.newOrientedFace(3);
the_map.sewFaces(top,the_map.phi1(the_map.phi1(side1)));
the_map.sewFaces(the_map.phi_1(top),the_map.phi1(the_map.phi1(side2)));
the_map.sewFaces(the_map.phi1(the_map.phi1(top)),the_map.phi1(the_map.phi1(side3)));
the_map.sewFaces(the_map.phi1(top),the_map.phi1(the_map.phi1(side3)));
return base;
}
......
......@@ -37,9 +37,9 @@ namespace Modelisation
namespace Tetrahedron
{
/***********************************************************************************************
* Tetrahedron functions *
***********************************************************************************************/
/************************************************************************************************
* Tetrahedron functions *
************************************************************************************************/
/**
......@@ -51,25 +51,25 @@ template <typename PFP>
bool isTetrahedron(typename PFP::MAP& the_map, Dart d);
/***********************************************************************************************
* Swap Functions *
***********************************************************************************************/
/************************************************************************************************
* Swap Functions *
************************************************************************************************/
/**
* Swap a configuration of 2 Tetrahedron to another one
* @param map
* @param d
* @param d a dart from the face between the two tetahedron to swap
*
* TODO ajouter image
*/
template <typename PFP>
void swap2To2(typename PFP::MAP& the_map, Dart d, typename PFP::TVEC3& positions);
void swap2To2(typename PFP::MAP& map, Dart d);
/**
*
*/
template <typename PFP>
void swap4To4(typename PFP::MAP& the_map, Dart d, typename PFP::TVEC3& positions);
void swap4To4(typename PFP::MAP& map, Dart d);
/**
* Swap a configuration of 3 tetrahedron to another one with 2 tetrahedron
......@@ -80,14 +80,13 @@ void swap4To4(typename PFP::MAP& the_map, Dart d, typename PFP::TVEC3& positions
*
*/
template <typename PFP>
void swap3To2(typename PFP::MAP& the_map, Dart d, typename PFP::TVEC3& positions);
void swap3To2(typename PFP::MAP& map, Dart d);
/**
*
*/
template <typename PFP>
void swap2To3(typename PFP::MAP& the_map, Dart d, typename PFP::TVEC3& positions);
void swap2To3(typename PFP::MAP& map, Dart d);
/**
*
......
This diff is collapsed.
......@@ -94,7 +94,7 @@ bool BoundingBox<VEC>::intersects(const BoundingBox<VEC>& bb)
{
VEC bbmin = bb.min() ;
VEC bbmax = bb.max() ;
for(unsigned int i = 0; i < bbmin.size(); ++i)
for(unsigned int i = 0; i < bbmin.dimension(); ++i)
{
if(m_pMax[i] < bbmin[i])
return false ;
......
......@@ -82,19 +82,6 @@ public:
*/
virtual Dart cutSpike(Dart d);
/**
* Flip the edge of d (rotation in phi1 order)
* WARNING : works only if the edge is owned by exactly one or two volumes
* @param d the edge to flip
*/
//virtual bool flipEdge(Dart d);
/**
* Flip the edge of d (rotation in phi_1 order)
* WARNING : works only if the edge is owned by exactly one or two volumes
* @param d the edge to flip
*/
//virtual bool flipBackEdge(Dart d);
//! Collapse an edge (that is deleted) possibly merging its vertices
/*! If delDegenerateFaces is true, the method checks that no degenerate
......
......@@ -221,33 +221,6 @@ void EmbeddedMap3<MAP3>::cutEdge(Dart d)
// }
}
//template <typename MAP3>
//bool EmbeddedMap3<MAP3>::flipEdge(Dart d)
//{
// unsigned int eEmbd = EMBNULL;;
// unsigned int eEmbd2 = EMBNULL;;
//
// bool res = MAP3::flipEdge(d);
//
// if(MAP3::isOrbitEmbedded(EDGE_ORBIT))
// {
// eEmbd = MAP3::getEmbedding(d, EDGE_ORBIT);
// eEmbd2 = MAP3::getEmbedding(MAP3::phi2(d), EDGE_ORBIT);
// }
//
// return res;
//}
//
//
//template <typename MAP3>
//bool EmbeddedMap3<MAP3>::flipBackEdge(Dart d)
//{
//
// bool res = false;
//
//
// return res;
//}
template <typename MAP3>
int EmbeddedMap3<MAP3>::collapseEdge(Dart d, bool delDegenerateFaces,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment