Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

Commit bb2f7ff2 authored by Kenneth Vanhoey's avatar Kenneth Vanhoey
Browse files

Merge branch 'master' of cgogn:~cgogn/CGoGN

parents 314f67ce 5502db65
......@@ -965,7 +965,7 @@ void Clipping::cb_keyPress(int code)
}
}
void Clipping::cb_mousePress(int button, int x, int y)
void Clipping::cb_mousePress(int /*button*/, int x, int y)
{
// Check if no animation is active
if (m_lastAnimatedClippingPreset != NULL)
......
......@@ -145,7 +145,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (!Shift())
return;
......@@ -249,7 +249,7 @@ void MyQT::cb_mouseMove(int buttons, int x, int y)
}
void MyQT::cb_wheelEvent(int delta, int x, int y)
void MyQT::cb_wheelEvent(int delta, int /*x*/, int /*y*/)
{
if (!Shift())
return;
......
......@@ -157,17 +157,17 @@ void TexView::cb_keyPress(int code)
updateGL();
}
void TexView::init(char *fnm, char* fnt)
void TexView::init(const std::string& fnm, const std::string& fnt)
{
if (fnm == NULL)
if (fnm.empty() )
{
computeTore();
m_fileNameTex = std::string(fnt);
m_fileNameTex = fnt;
}
else
{
m_fileNameMesh = std::string(fnm);
m_fileNameTex = std::string(fnt);
m_fileNameMesh = fnm;
m_fileNameTex = fnt;
std::vector<std::string> attrNames;
m_obj.import(m_fileNameMesh,attrNames);
......@@ -260,11 +260,11 @@ int main(int argc, char**argv)
}
else if (argc == 2)
{
tv.init(NULL, argv[1]);
tv.init("", argv[1]);
}
else
{
tv.init(NULL,"x");
tv.init("","x");
}
......
......@@ -89,7 +89,7 @@ public:
~TexView();
void init(char* fnm, char* fnt);
void init(const std::string& fnm, const std::string& fnt);
// callbacks of simpleQT to overdefine:
void cb_redraw();
......
......@@ -33,24 +33,26 @@
#include "Utils/chrono.h"
#include "Algo/Export/exportVol.h"
PFP::MAP myMap;
VertexAttribute<PFP::VEC3> position ;
VolumeAttribute<PFP::VEC3> color ;
void MyQT::volumes_onoff(bool x)
void MyQT::volumes_onoff(bool /*x*/)
{
render_volumes = !render_volumes;
updateGL();
}
void MyQT::edges_onoff(bool x)
void MyQT::edges_onoff(bool /*x*/)
{
render_edges = !render_edges;
updateGL();
}
void MyQT::topo_onoff(bool x)
void MyQT::topo_onoff(bool /*x*/)
{
render_topo = !render_topo;
if (render_topo)
......@@ -88,7 +90,7 @@ void MyQT::clipping_onoff(bool x)
updateGL();
}
void MyQT::hide_onoff(bool x)
void MyQT::hide_onoff(bool /*x*/)
{
hide_clipping = !hide_clipping;
updateGL();
......@@ -270,7 +272,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (!Shift())
return;
......@@ -299,7 +301,7 @@ void MyQT::cb_mousePress(int button, int x, int y)
}
}
void MyQT::cb_mouseRelease(int button, int x, int y)
void MyQT::cb_mouseRelease(int /*button*/, int /*x*/, int /*y*/)
{
if (hide_clipping || !clip_volume)
......@@ -418,6 +420,12 @@ int main(int argc, char **argv)
color[i][0] /= maxV;
color[i][2] = 1.0f - color[i][0];
}
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test2.nas");
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
// Algo::Volume::Export::exportTet<PFP>(myMap,position,"/tmp/test2.tet");
// Algo::Volume::Export::exportNodeEle<PFP>(myMap,position,"/tmp/test2");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test4.vtu");
}
else
{
......@@ -437,6 +445,9 @@ int main(int argc, char **argv)
TraversorW<PFP::MAP> tra(myMap);
for (Dart d = tra.begin(); d != tra.end(); d = tra.next())
color[d] = position[d] + PFP::VEC3(0.5,0.5,0.5);
// Algo::Volume::Export::exportMSH<PFP>(myMap,position,"/tmp/test2.msh");
// Algo::Volume::Export::exportNAS<PFP>(myMap,position,"/tmp/test1.nas");
// Algo::Volume::Export::exportVTU<PFP>(myMap,position,"/tmp/test3.vtu");
}
// un peu d'interface
QApplication app(argc, argv);
......
......@@ -140,7 +140,7 @@ void MyQT::cb_redraw()
m_drawer.callList();
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -38,21 +38,21 @@ MAP myMap;
VertexAttribute<VEC3> position ;
Dart dglobal;
void MyQT::balls_onoff(bool x)
void MyQT::balls_onoff(bool /*x*/)
{
render_balls = !render_balls;
updateGL();
CGoGNerr << " balls_onoff "<< CGoGNendl;
}
void MyQT::vectors_onoff(bool x)
void MyQT::vectors_onoff(bool /*x*/)
{
render_vectors = !render_vectors;
updateGL();
CGoGNerr << " vectors_onoff "<< CGoGNflush;
}
void MyQT::text_onoff(bool x)
void MyQT::text_onoff(bool /*x*/)
{
render_text = !render_text;
updateGL();
......@@ -60,7 +60,7 @@ void MyQT::text_onoff(bool x)
}
void MyQT::topo_onoff(bool x)
void MyQT::topo_onoff(bool /*x*/)
{
render_topo = !render_topo;
updateGL();
......@@ -211,7 +211,7 @@ void MyQT::cb_redraw()
}
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -146,7 +146,7 @@ public:
FunctorAttribThreaded(),m_positions(pos),m_positions2(pos2)
{}
void run(unsigned int i, unsigned int threadID)
void run(unsigned int i, unsigned int /*threadID*/)
{
m_positions2[i] = 1.1f * m_positions[i];
}
......@@ -181,7 +181,7 @@ public:
m_positions(pos),m_positions2(pos2)
{}
void run(Dart d, unsigned int threadID)
void run(Dart d, unsigned int /*threadID*/)
{
typename XXX::VEC3 Q(0,0,0);
int nb=0;
......@@ -232,7 +232,7 @@ public:
unsigned int getNb() { return m_nb;}
void run(Dart d, unsigned int threadID)
void run(Dart d, unsigned int /*threadID*/)
{
Dart dd = this->m_map.phi2(d);
typename XXX::VEC3 V = m_positions[dd] - m_positions[d];
......
......@@ -88,7 +88,7 @@ void MyQT::clipping_onoff(bool x)
updateGL();
}
void MyQT::hide_onoff(bool x)
void MyQT::hide_onoff(bool /*x*/)
{
hide_clipping = !hide_clipping;
updateMap();
......@@ -253,7 +253,7 @@ void MyQT::operation(int x)
dock.listOper->setCurrentRow(-1);
}
void MyQT::createMap(int n)
void MyQT::createMap(int /*n*/)
{
myMap.clear(true);
position = myMap.getAttribute<VEC3, VERTEX>("position");
......@@ -440,7 +440,7 @@ void MyQT::cb_mousePress(int button, int x, int y)
}
}
void MyQT::cb_mouseRelease(int button, int x, int y)
void MyQT::cb_mouseRelease(int /*button*/, int /*x*/, int /*y*/)
{
if (hide_clipping || !clip_volume)
......
......@@ -42,7 +42,7 @@ VertexAttribute<VEC3> position ;
DartAttribute<VEC3> middleDarts;
void MyQT::text_onoff(bool x)
void MyQT::text_onoff(bool /*x*/)
{
render_text = !render_text;
updateGL();
......@@ -162,7 +162,7 @@ void MyQT::cb_redraw()
}
void MyQT::cb_mousePress(int button, int x, int y)
void MyQT::cb_mousePress(int /*button*/, int x, int y)
{
if (Shift())
{
......
......@@ -138,8 +138,9 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
# set(CMAKE_CONFIGURATION_TYPES "Release Debug" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -fPIC")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fPIC")
# SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wclobbered -Wempty-body -Wignored-qualifiers -Wmissing-field-initializers -Wsign-compare -Wtype-limits -Wuninitialized -fPIC")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Woverride-init -fPIC")
add_subdirectory(Release)
add_subdirectory(Debug)
add_subdirectory(${CGoGN_ROOT_DIR}/Apps Apps)
......
......@@ -6,12 +6,7 @@ cmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev q
Pour compiler CGoGN:
- on compile d'abord les bibliothèques annexes :
cd CGoGN/ThirdParty/build
cmake ..
make (-j x si vous avez x cores)
make install
- aller dans ThirdParty, cd build, taper "cmake .", puis make ( avec -j x si vous avez x core sur votre machine) suivi de make install
On peut fixer certaines option pour ne pas tout compiler (cf le README.TXT dans ThirdParty)
......@@ -54,7 +49,6 @@ install the following packages:
ccmake libXi-dev libXmu-dev libglew-dev libxml2-dev libboost-all-dev zlib1g-dev qt4-designer qt4-dev-tools uuid-dev libgsl0-dev libsuitesparse-dev
To compile CGoGN:
- first compile third-party libraries:
cd CGoGN/ThirdParty/build
......
......@@ -105,7 +105,7 @@ IF(WIN32)
set(CMAKE_CONFIGURATION_TYPES Release Debug)
set(CMAKE_CONFIGURATION_TYPES "${CMAKE_CONFIGURATION_TYPES}" CACHE STRING "Only Release or Debug" FORCE)
ELSE(WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra ")
ENDIF(WIN32)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/bin)
......
......@@ -26,6 +26,9 @@
#define __EXPORT_H__
#include "Topology/generic/attributeHandler.h"
#include "Algo/Import/importFileTypes.h"
#include <stdint.h>
namespace CGoGN
......
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2012, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library 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 Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.unistra.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __EXPORT_VOL_H__
#define __EXPORT_VOL_H__
#include "Topology/generic/attributeHandler.h"
#include <stdint.h>
namespace CGoGN
{
namespace Algo
{
namespace Volume
{
namespace Export
{
/**
* Export a mesh choosing the format according to filename extension
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportMesh(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const std::string& filename) ;
/**
* export the map into a .nas (nastran file)
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportNAS(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ;
/**
* export the map into a vtu file (vtk unstructured grid)
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportVTU(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ;
/**
* export the map into a .msh (gmesh file)
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportMSH(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ;
/**
* export the map into a .tet file
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportTet(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ;
/**
* export the map into a .node/.ele file pair
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
* @return true
*/
template <typename PFP>
bool exportNodeEle(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename) ;
/**
* export in binary volume file (nb_vert,nb_tetra,nb_hexa, vertices, tetra, hexa)
* @param the_map map to be exported
* @param position the position container
* @param filename filename of mesh file
*/
template <typename PFP>
bool exportVolBinGz(typename PFP::MAP& map, const VertexAttribute<typename PFP::VEC3>& position, const char* filename);
} // namespace Export
}
} // namespace Algo
} // namespace CGoGN
#include "Algo/Export/exportVol.hpp"
#endif
This diff is collapsed.
......@@ -133,14 +133,13 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
typedef typename PFP::VEC3 VEC3 ;
typedef typename PFP::REAL REAL;
bool inside = true;
std::list<Dart> visitedFaces; // Faces that are traversed
visitedFaces.push_back(d); // Start with the face of d
std::list<Dart>::iterator face;
VEC3 N;
DartMarkerStore mark(map); // Lock a marker
for (face = visitedFaces.begin(); inside && face != visitedFaces.end(); ++face)
for (face = visitedFaces.begin(); face != visitedFaces.end(); ++face)
{
if (!mark.isMarked(*face))
{
......@@ -149,10 +148,10 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
if(CCW)
{
if(o3d == Geom::OVER)
inside = false;
return false;
}
else if(o3d == Geom::UNDER)
inside = false;
return false;
Dart dNext = *face ;
do
......@@ -166,8 +165,7 @@ bool isPointInConvexVolume(typename PFP::MAP& map, Dart d, const VertexAttribute
}
}
//if the point is in the volume there is an odd number of intersection with all faces with any direction
return inside;
return true;
}
template <typename PFP>
......@@ -176,8 +174,6 @@ bool isPointInConvexFace(typename PFP::MAP& map, Dart d, const VertexAttribute<t
typedef typename PFP::VEC3 VEC3 ;
typedef typename PFP::REAL REAL;
bool inside = true;
Geom::Plane3D<REAL> pl = Geometry::facePlane<PFP>(map, d, position);
Geom::Orientation3D o3d = pl.orient(point);
if(o3d == Geom::ON)
......@@ -193,12 +189,12 @@ bool isPointInConvexFace(typename PFP::MAP& map, Dart d, const VertexAttribute<t
if(CCW)
{
if(o3d == Geom::UNDER)
inside = false;
return false;
}
else if(o3d == Geom::OVER)
inside = false;
return false;
}
return inside;
return true;
}
return false;
......@@ -212,7 +208,6 @@ bool isPointInConvexFace2D(typename PFP::MAP& map, Dart d, const VertexAttribute
// CGoGNout << "point " << point << "d " << d << "faceDeg " << map.faceDegree(d) << CGoGNendl;
bool convex=true;
Geom::Orientation2D o2d;
Traversor2FV<typename PFP::MAP> tfv(map, d) ;
......@@ -222,13 +217,13 @@ bool isPointInConvexFace2D(typename PFP::MAP& map, Dart d, const VertexAttribute
if(CCW)
{
if(o2d == Geom::RIGHT)
convex= false;
return false;
}
else if(o2d == Geom::LEFT)
return false;
}
return convex;
return true;
}
template <typename PFP>
......
......@@ -193,6 +193,12 @@ public:
*/
Dart faceOldestDart(Dart d) ;
//! Test if dart d and e belong to the same face
/*! @param d a dart
* @param e a dart
*/
bool sameFace(Dart d, Dart e) ;
/**
* Return true if the edge of d in the current level map
* has already been subdivided to the next level
......
......@@ -174,7 +174,7 @@ inline void ImplicitHierarchicalMap::next(Dart& d) const
} while(d != Map2::end() && m_dartLevel[d] > m_curLevel) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d;
do
......@@ -186,7 +186,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_vertex(Dart d, FunctorType&
return false;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f, unsigned int /*thread*/)
{
if (f(d))
return true;
......@@ -198,7 +198,7 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_edge(Dart d, FunctorType& f
return false;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int thread)
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, FunctorType& f, unsigned int /*thread*/)
{
Dart dNext = d ;
do
......@@ -212,12 +212,12 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_face(Dart d, Funct
inline bool ImplicitHierarchicalMap::foreach_dart_of_face(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_face(d, f) ;
return foreach_dart_of_oriented_face(d, f,thread) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_volume(Dart d, FunctorType& f, unsigned int thread)
{
DartMarkerStore mark(*this); // Lock a marker
DartMarkerStore mark(*this,thread); // Lock a marker
bool found = false; // Last functor return value
std::list<Dart> visitedFaces; // Faces that are traversed
......@@ -253,12 +253,12 @@ inline bool ImplicitHierarchicalMap::foreach_dart_of_oriented_volume(Dart d, Fun
inline bool ImplicitHierarchicalMap::foreach_dart_of_volume(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
return foreach_dart_of_oriented_volume(d, f, thread) ;
}
inline bool ImplicitHierarchicalMap::foreach_dart_of_cc(Dart d, FunctorType& f, unsigned int thread)
{
return foreach_dart_of_oriented_volume(d, f) ;
return foreach_dart_of_oriented_volume(d, f, thread) ;
}
/***************************************************
......