diff --git a/README_MAC.TXT b/README_MAC.TXT index b6ceef150093155dfe6f9881325fbde9f71be211..fa9b83fc24c0597822b925cafa1ebe25145592ab 100644 --- a/README_MAC.TXT +++ b/README_MAC.TXT @@ -1,16 +1,24 @@ *** english version below *** -Pour compiler CGoGN sur MAC (testé sur OS X 10.8.2) +Pour compiler CGoGN sur MAC (testé sur OS X 10.8.3) Installer avec homebrew cmake, lzlib, glew, boost149, suite-sparse, qt +Pour pouvoir installer le paquet suite-sparse, il faut avoir +prélablement ajouté le dépôt homebrew/science grâce à la commande suivante : + brew tap homebrew/science + ========================================================================================= ENGLISH VERSION ========================================================================================= -To compile CGoGN on MAC (tested on OSX 10.8.2) +To compile CGoGN on MAC (tested on OSX 10.8.3) Install with homebrew cmake, lzlib, glew, boost149, suite-sparse, qt + +To install suite-sparse package, you must first +add the homebrew/science repository with the following command : + brew tap homebrew/science diff --git a/SCHNApps/Plugins/render/src/renderDockTab.cpp b/SCHNApps/Plugins/render/src/renderDockTab.cpp index 8f9c4679d09908ab5889851276b6f6c7c555755b..469c15a2b497a31d778f2304c7a5b7d48de45fb6 100644 --- a/SCHNApps/Plugins/render/src/renderDockTab.cpp +++ b/SCHNApps/Plugins/render/src/renderDockTab.cpp @@ -97,7 +97,8 @@ void RenderDockTab::positionVBOChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); + if(map) + m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); } } @@ -107,7 +108,8 @@ void RenderDockTab::normalVBOChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeNormalVBO(view, map, map->getVBO(combo_normalVBO->currentText()), true); + if(map) + m_plugin->changeNormalVBO(view, map, map->getVBO(combo_normalVBO->currentText()), true); } } @@ -117,7 +119,8 @@ void RenderDockTab::renderVerticesChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeRenderVertices(view, map, b, true); + if(map) + m_plugin->changeRenderVertices(view, map, b, true); } } @@ -127,7 +130,8 @@ void RenderDockTab::verticesScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeVerticesScaleFactor(view, map, i / 50.0, true); + if(map) + m_plugin->changeVerticesScaleFactor(view, map, i / 50.0, true); } } @@ -137,7 +141,8 @@ void RenderDockTab::renderEdgesChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeRenderEdges(view, map, b, true); + if(map) + m_plugin->changeRenderEdges(view, map, b, true); } } @@ -147,7 +152,8 @@ void RenderDockTab::renderFacesChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeRenderFaces(view, map, b, true); + if(map) + m_plugin->changeRenderFaces(view, map, b, true); } } @@ -157,10 +163,13 @@ void RenderDockTab::faceStyleChanged(QAbstractButton* b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - if(radio_flatShading->isChecked()) - m_plugin->changeFacesStyle(view, map, FLAT, true); - else if(radio_phongShading->isChecked()) - m_plugin->changeFacesStyle(view, map, PHONG, true); + if(map) + { + if(radio_flatShading->isChecked()) + m_plugin->changeFacesStyle(view, map, FLAT, true); + else if(radio_phongShading->isChecked()) + m_plugin->changeFacesStyle(view, map, PHONG, true); + } } } diff --git a/SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp b/SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp index cc1570b1cca83847d65639da68c09e1b767e2487..4046a0d593e412eb3f39748be66d093208f6cd2c 100644 --- a/SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp +++ b/SCHNApps/Plugins/renderExplod/src/renderExplodDockTab.cpp @@ -99,7 +99,8 @@ void RenderExplodDockTab::positionAttributeChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); + if(map) + m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); } } @@ -109,7 +110,8 @@ void RenderExplodDockTab::colorAttributeChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeColorAttribute(view, map, map->getAttribute(combo_colorAttribute->currentText()), true); + if(map) + m_plugin->changeColorAttribute(view, map, map->getAttribute(combo_colorAttribute->currentText()), true); } } @@ -119,7 +121,8 @@ void RenderExplodDockTab::renderEdgesChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeRenderEdges(view, map, b, true); + if(map) + m_plugin->changeRenderEdges(view, map, b, true); } } @@ -129,7 +132,8 @@ void RenderExplodDockTab::renderFacesChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeRenderFaces(view, map, b, true); + if(map) + m_plugin->changeRenderFaces(view, map, b, true); } } @@ -139,7 +143,8 @@ void RenderExplodDockTab::facesScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeFacesScaleFactor(view, map, i, true); + if(map) + m_plugin->changeFacesScaleFactor(view, map, i, true); } } @@ -149,7 +154,8 @@ void RenderExplodDockTab::volumesScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeVolumesScaleFactor(view, map, i, true); + if(map) + m_plugin->changeVolumesScaleFactor(view, map, i, true); } } diff --git a/SCHNApps/Plugins/renderScalar/src/renderScalarDockTab.cpp b/SCHNApps/Plugins/renderScalar/src/renderScalarDockTab.cpp index a180d444f5d906ed8d702c34bbedd97608413b68..dbddb4426c3ad3ebfc9c208cccb8f8086116dc50 100644 --- a/SCHNApps/Plugins/renderScalar/src/renderScalarDockTab.cpp +++ b/SCHNApps/Plugins/renderScalar/src/renderScalarDockTab.cpp @@ -94,7 +94,8 @@ void RenderScalarDockTab::positionVBOChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); + if(map) + m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); } } @@ -104,18 +105,21 @@ void RenderScalarDockTab::selectedScalarVBOChanged() { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - QList selectedItems = list_scalarVBO->selectedItems(); - if(!selectedItems.empty()) + if(map) { - foreach(QListWidgetItem* item, selectedItems) + QList selectedItems = list_scalarVBO->selectedItems(); + if(!selectedItems.empty()) { - if(item != list_scalarVBO->currentItem()) - item->setSelected(false); + foreach(QListWidgetItem* item, selectedItems) + { + if(item != list_scalarVBO->currentItem()) + item->setSelected(false); + } + m_plugin->changeScalarVBO(view, map, map->getVBO(list_scalarVBO->currentItem()->text()), true); } - m_plugin->changeScalarVBO(view, map, map->getVBO(list_scalarVBO->currentItem()->text()), true); + else + m_plugin->changeScalarVBO(view, map, NULL, true); } - else - m_plugin->changeScalarVBO(view, map, NULL, true); } } @@ -125,7 +129,8 @@ void RenderScalarDockTab::colorMapChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeColorMap(view, map, index, true); + if(map) + m_plugin->changeColorMap(view, map, index, true); } } @@ -135,7 +140,8 @@ void RenderScalarDockTab::expansionChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeExpansion(view, map, i, true); + if(map) + m_plugin->changeExpansion(view, map, i, true); } } diff --git a/SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp b/SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp index 2ed86bc339635c1c2769b243eb55710e127b8903..946604bedcc3757d0d1acf6d0ac2229bf78545d3 100644 --- a/SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp +++ b/SCHNApps/Plugins/renderTopoSurface/src/renderTopoSurfaceDockTab.cpp @@ -98,7 +98,8 @@ void RenderTopoSurfaceDockTab::positionAttributeChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); + if(map) + m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); } } @@ -108,7 +109,8 @@ void RenderTopoSurfaceDockTab::drawDartsChanged(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeDrawDarts(view, map, b, true); + if(map) + m_plugin->changeDrawDarts(view, map, b, true); } } @@ -118,7 +120,8 @@ void RenderTopoSurfaceDockTab::dartsColorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeDartsColor(view, map, combo_dartsColor->color(), true); + if(map) + m_plugin->changeDartsColor(view, map, combo_dartsColor->color(), true); } } @@ -128,7 +131,8 @@ void RenderTopoSurfaceDockTab::drawPhi1Changed(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeDrawPhi1(view, map, b, true); + if(map) + m_plugin->changeDrawPhi1(view, map, b, true); } } @@ -138,7 +142,8 @@ void RenderTopoSurfaceDockTab::phi1ColorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePhi1Color(view, map, combo_phi1Color->color(), true); + if(map) + m_plugin->changePhi1Color(view, map, combo_phi1Color->color(), true); } } @@ -148,7 +153,8 @@ void RenderTopoSurfaceDockTab::drawPhi2Changed(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeDrawPhi2(view, map, b, true); + if(map) + m_plugin->changeDrawPhi2(view, map, b, true); } } @@ -158,7 +164,8 @@ void RenderTopoSurfaceDockTab::phi2ColorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePhi2Color(view, map, combo_phi2Color->color(), true); + if(map) + m_plugin->changePhi2Color(view, map, combo_phi2Color->color(), true); } } @@ -168,7 +175,8 @@ void RenderTopoSurfaceDockTab::facesScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeEdgesScaleFactor(view, map, i, true); + if(map) + m_plugin->changeEdgesScaleFactor(view, map, i, true); } } @@ -178,7 +186,8 @@ void RenderTopoSurfaceDockTab::edgesScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeFacesScaleFactor(view, map, i, true); + if(map) + m_plugin->changeFacesScaleFactor(view, map, i, true); } } diff --git a/SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp b/SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp index 4a5ea477d5d9ff843c4cab2267bc4f3ed7323a54..de91436c45386fb17fba32e10d4591ac6210af97 100644 --- a/SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp +++ b/SCHNApps/Plugins/renderVector/src/renderVectorDockTab.cpp @@ -88,7 +88,8 @@ void RenderVectorDockTab::positionVBOChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); + if(map) + m_plugin->changePositionVBO(view, map, map->getVBO(combo_positionVBO->currentText()), true); } } @@ -98,11 +99,14 @@ void RenderVectorDockTab::selectedVectorsVBOChanged() { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - QList currentItems = list_vectorVBO->selectedItems(); - std::vector vbos; - foreach(QListWidgetItem* item, currentItems) - vbos.push_back(map->getVBO(item->text())); - m_plugin->changeSelectedVectorsVBO(view, map, vbos, true); + if(map) + { + QList currentItems = list_vectorVBO->selectedItems(); + std::vector vbos; + foreach(QListWidgetItem* item, currentItems) + vbos.push_back(map->getVBO(item->text())); + m_plugin->changeSelectedVectorsVBO(view, map, vbos, true); + } } } @@ -112,7 +116,8 @@ void RenderVectorDockTab::vectorsScaleFactorChanged(int i) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeVectorsScaleFactor(view, map, i, true); + if(map) + m_plugin->changeVectorsScaleFactor(view, map, i, true); } } diff --git a/SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp b/SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp index 1794855691468832daf90c7b7c7105981ab3ca1e..fe47a1c556824979d8ba662d82664cdec7f187fc 100644 --- a/SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp +++ b/SCHNApps/Plugins/surfaceDeformation/src/surfaceDeformationDockTab.cpp @@ -85,7 +85,8 @@ void SurfaceDeformationDockTab::positionAttributeChanged(int index) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); + if(map) + m_plugin->changePositionAttribute(view, map, map->getAttribute(combo_positionAttribute->currentText()), true); } } @@ -95,7 +96,8 @@ void SurfaceDeformationDockTab::selectLockedVertices(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeVerticesSelectionMode(view, map, LOCKED, true); + if(map) + m_plugin->changeVerticesSelectionMode(view, map, LOCKED, true); } } @@ -105,7 +107,8 @@ void SurfaceDeformationDockTab::selectHandleVertices(bool b) { View* view = m_window->getCurrentView(); MapHandlerGen* map = m_currentParams->selectedMap; - m_plugin->changeVerticesSelectionMode(view, map, HANDLE, true); + if(map) + m_plugin->changeVerticesSelectionMode(view, map, HANDLE, true); } } diff --git a/SCHNApps/src/view.cpp b/SCHNApps/src/view.cpp index fc3f1d25728b650cdb5003d839cfe5f3a5932a13..763544d3b9380fc2f13821272c7dcb8f2d04a5ea 100644 --- a/SCHNApps/src/view.cpp +++ b/SCHNApps/src/view.cpp @@ -215,7 +215,7 @@ void View::mouseMoveEvent(QMouseEvent* event) plugin->mouseMove(this, event); QGLViewer::mouseMoveEvent(event); - QList views = m_window->getViewsList(); + QList views = m_currentCamera->getLinkedViews(); foreach(View* view, views) { if(view != this) @@ -229,7 +229,7 @@ void View::wheelEvent(QWheelEvent* event) plugin->wheelEvent(this, event); QGLViewer::wheelEvent(event); - QList views = m_window->getViewsList(); + QList views = m_currentCamera->getLinkedViews(); foreach(View* view, views) { if(view != this) diff --git a/include/Algo/Modelisation/subdivision3.hpp b/include/Algo/Modelisation/subdivision3.hpp index 2fa39fc30b66b576a8fe4ffada0f3d63b980254e..be7d50144a9bb380c40799db0b9638e11d47e96a 100644 --- a/include/Algo/Modelisation/subdivision3.hpp +++ b/include/Algo/Modelisation/subdivision3.hpp @@ -27,7 +27,7 @@ #include "Algo/Modelisation/extrusion.h" #include "Geometry/intersection.h" #include "NL/nl.h" -#include "Algo/LinearSolving/basic.h" +//#include "Algo/LinearSolving/basic.h" #include "Algo/Geometry/laplacian.h" namespace CGoGN