Commit d11304b9 authored by Pierre Kraemer's avatar Pierre Kraemer

SCHNApps: select dynamically the vertex attribute to use to compute the map bounding box

parent ba254fb4
......@@ -64,7 +64,7 @@ public:
* the management of holes is shared by all attributes
*/
class CGoGN_CONTAINER_API AttributeContainer
class CGoGN_CONTAINER_API AttributeContainer
{
public:
/**
......@@ -156,7 +156,7 @@ public:
void setRegistry(std::map<std::string, RegisteredBaseAttribute*>* re);
void setContainerBrowser(ContainerBrowser* bro) { m_currentBrowser = bro;}
void setContainerBrowser(ContainerBrowser* bro) { m_currentBrowser = bro; }
bool hasBrowser() { return m_currentBrowser != NULL; }
......@@ -176,7 +176,6 @@ public:
/// special version for marker
AttributeMultiVector<MarkerBool>* addMarkerAttribute(const std::string& attribName);
/**
* add a new attribute to the container
* @param typeName type of the new attribute in a string
......@@ -185,7 +184,6 @@ public:
*/
AttributeMultiVectorGen* addAttribute(const std::string& typeName, const std::string& attribName);
protected:
/**
* add a new attribute with a given index (for load only)
......@@ -275,8 +273,6 @@ public:
*/
void next(unsigned int &it) const;
/**
* return the index of the first line of the container
*/
......@@ -293,7 +289,6 @@ public:
*/
void realNext(unsigned int &it) const;
/**
* return the index of the last line of the container
*/
......@@ -334,7 +329,7 @@ public:
* @return number of blocks
*/
template<typename T>
unsigned int getAttributeBlocksPointers(unsigned int attrIndex, std::vector<T*>& vect_ptr, unsigned int& byteBlockSize);
unsigned int getAttributeBlocksPointers(unsigned int attrIndex, std::vector<T*>& vect_ptr, unsigned int& byteBlockSize) const;
/**
* fill a vector with attributes names
......@@ -343,13 +338,12 @@ public:
*/
unsigned int getAttributesNames(std::vector<std::string>& names) const;
/**
* fill a vector with attribute type names
* @param types vector of type names
* @return number of attributes
*/
unsigned int getAttributesTypes(std::vector<std::string>& types);
unsigned int getAttributesTypes(std::vector<std::string>& types) const;
std::vector<AttributeMultiVector<MarkerBool>*>& getMarkerAttributes();
......@@ -468,7 +462,6 @@ public:
inline AttributeMultiVectorGen* getVirtualDataVector(unsigned int attrIndex);
/**
* get an AttributeMultiVector
* @param attribName name of the attribute
......@@ -508,8 +501,6 @@ public:
template <typename T>
void setData(unsigned int attrIndex, unsigned int eltIndex, const T& data);
/**************************************
* SAVE & LOAD *
**************************************/
......@@ -548,19 +539,14 @@ public:
void dumpCSV() const;
void dumpByLines() const;
};
} // namespace CGoGN
#include "attributeContainer.hpp"
#include "Container/attributeContainer.hpp"
#endif
///**
//* Container for AttributeMultiVectors
//* All the attributes always have the same size and
......
......@@ -198,7 +198,7 @@ bool AttributeContainer::removeAttribute(unsigned int index)
}
template <typename T>
unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrIndex, std::vector<T*>& vect_ptr, unsigned int& byteBlockSize)
unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrIndex, std::vector<T*>& vect_ptr, unsigned int& byteBlockSize) const
{
assert(attrIndex < m_tableAttribs.size() || !"getAttributeBlocksPointers: attribute index out of bounds");
assert(m_tableAttribs[attrIndex] != NULL || !"getAttributeBlocksPointers: attribute does not exist");
......@@ -208,7 +208,6 @@ unsigned int AttributeContainer::getAttributeBlocksPointers(unsigned int attrInd
return atm->getBlocksPointers(vect_ptr, byteBlockSize);
}
/**************************************
* INFO ABOUT THE CONTAINER *
**************************************/
......@@ -316,7 +315,6 @@ inline void AttributeContainer::realNext(unsigned int &it) const
} while ((it < m_maxSize) && (!used(it)));
}
inline unsigned int AttributeContainer::realRBegin() const
{
unsigned int it = m_maxSize-1;
......@@ -338,9 +336,6 @@ inline void AttributeContainer::realRNext(unsigned int &it) const
} while ((it !=0xffffffff) && (!used(it)));
}
/**************************************
* LINES MANAGEMENT *
**************************************/
......@@ -362,7 +357,6 @@ inline void AttributeContainer::initMarkersOfLine(unsigned int index)
}
}
inline void AttributeContainer::copyLine(unsigned int dstIndex, unsigned int srcIndex)
{
for(unsigned int i = 0; i < m_tableAttribs.size(); ++i)
......@@ -375,7 +369,6 @@ inline void AttributeContainer::copyLine(unsigned int dstIndex, unsigned int src
{
m_tableMarkerAttribs[i]->copyElt(dstIndex, srcIndex);
}
}
inline void AttributeContainer::refLine(unsigned int index)
......@@ -452,7 +445,6 @@ AttributeMultiVector<T>* AttributeContainer::getDataVector(const std::string& at
return atm;
}
inline CGoGNCodeType AttributeContainer::getTypeCode(const std::string& attribName) const
{
unsigned int index = getAttributeIndex(attribName) ;
......@@ -461,8 +453,6 @@ inline CGoGNCodeType AttributeContainer::getTypeCode(const std::string& attribNa
return m_tableAttribs[index]->getTypeCode();
}
inline AttributeMultiVectorGen* AttributeContainer::getVirtualDataVector(const std::string& attribName)
{
unsigned int index = getAttributeIndex(attribName) ;
......@@ -511,12 +501,9 @@ inline void AttributeContainer::setData(unsigned int attrIndex, unsigned int elt
atm->operator[](eltIndex) = data;
}
inline std::vector<AttributeMultiVector<MarkerBool>*>& AttributeContainer::getMarkerAttributes()
{
return m_tableMarkerAttribs;
}
} // namespace CGoGN
......@@ -81,7 +81,6 @@ template <typename VEC>
typename VEC::DATA_TYPE BoundingBox<VEC>::maxSize() const
{
assert(m_initialized || !"Bounding box not initialized");
typename VEC::DATA_TYPE max = m_pMax[0] - m_pMin[0] ;
for(unsigned int i = 1; i < m_pMax.dimension(); ++i)
{
......@@ -96,7 +95,6 @@ template <typename VEC>
typename VEC::DATA_TYPE BoundingBox<VEC>::minSize() const
{
assert(m_initialized || !"Bounding box not initialized");
typename VEC::DATA_TYPE min = m_pMax[0] - m_pMin[0] ;
for(unsigned int i = 1; i < m_pMax.dimension(); ++i)
{
......
......@@ -47,7 +47,6 @@
#include "Topology/dll.h"
namespace CGoGN
{
......
......@@ -92,7 +92,6 @@ namespace CGoGN
return m_tableAttribs[index]->getName() ;
}
unsigned int AttributeContainer::getAttributesNames(std::vector<std::string>& names) const
{
names.clear() ;
......@@ -107,23 +106,20 @@ namespace CGoGN
return m_nbAttributes ;
}
unsigned int AttributeContainer::getAttributesTypes(std::vector<std::string>& types)
unsigned int AttributeContainer::getAttributesTypes(std::vector<std::string>& types) const
{
types.clear() ;
types.reserve(m_nbAttributes) ;
for (unsigned int i = 0; i < m_tableAttribs.size(); ++i)
{
if(m_tableAttribs[i] != NULL)
if (m_tableAttribs[i] != NULL)
types.push_back(m_tableAttribs[i]->getTypeName()) ;
}
return m_nbAttributes ;
}
/**************************************
* CONTAINER MANAGEMENT *
**************************************/
......
......@@ -35,25 +35,25 @@ void MapParameters::start(MapHandlerGen* mhg)
{
MapHandler<PFP2>* mh = static_cast<MapHandler<PFP2>*>(mhg);
positionInit = mh->getAttribute<PFP2::VEC3, VERTEX>("positionInit", false);
positionInit = mh->getAttribute<PFP2::VEC3, VERTEX>("positionInit");
if(!positionInit.isValid())
positionInit = mh->addAttribute<PFP2::VEC3, VERTEX>("positionInit", false);
positionInit = mh->addAttribute<PFP2::VEC3, VERTEX>("positionInit");
diffCoord = mh->getAttribute<PFP2::VEC3, VERTEX>("diffCoord", false);
diffCoord = mh->getAttribute<PFP2::VEC3, VERTEX>("diffCoord");
if(!diffCoord.isValid())
diffCoord = mh->addAttribute<PFP2::VEC3, VERTEX>("diffCoord", false);
diffCoord = mh->addAttribute<PFP2::VEC3, VERTEX>("diffCoord");
vertexRotationMatrix = mh->getAttribute<Eigen_Matrix3f, VERTEX>("vertexRotationMatrix", false);
vertexRotationMatrix = mh->getAttribute<Eigen_Matrix3f, VERTEX>("vertexRotationMatrix");
if(!vertexRotationMatrix.isValid())
vertexRotationMatrix = mh->addAttribute<Eigen_Matrix3f, VERTEX>("vertexRotationMatrix", false);
vertexRotationMatrix = mh->addAttribute<Eigen_Matrix3f, VERTEX>("vertexRotationMatrix");
rotatedDiffCoord = mh->getAttribute<PFP2::VEC3, VERTEX>("rotatedDiffCoord", false);
rotatedDiffCoord = mh->getAttribute<PFP2::VEC3, VERTEX>("rotatedDiffCoord");
if(!rotatedDiffCoord.isValid())
rotatedDiffCoord = mh->addAttribute<PFP2::VEC3, VERTEX>("rotatedDiffCoord", false);
rotatedDiffCoord = mh->addAttribute<PFP2::VEC3, VERTEX>("rotatedDiffCoord");
vIndex = mh->getAttribute<unsigned int, VERTEX>("vIndex", false);
vIndex = mh->getAttribute<unsigned int, VERTEX>("vIndex");
if(!vIndex.isValid())
vIndex = mh->addAttribute<unsigned int, VERTEX>("vIndex", false);
vIndex = mh->addAttribute<unsigned int, VERTEX>("vIndex");
PFP2::MAP* map = static_cast<MapHandler<PFP2>*>(mh)->getMap();
......@@ -174,7 +174,6 @@ void Surface_Deformation_Plugin::keyPress(View* view, QKeyEvent* event)
{
asRigidAsPossible(mh);
mh->notifyAttributeModification(p.positionAttribute);
static_cast<MapHandler<PFP2>*>(mh)->updateBB(p.positionAttribute);
view->updateGL();
}
}
......@@ -225,7 +224,6 @@ void Surface_Deformation_Plugin::mouseMove(View* view, QMouseEvent* event)
{
asRigidAsPossible(mh);
mh->notifyAttributeModification(p.positionAttribute);
static_cast<MapHandler<PFP2>*>(mh)->updateBB(p.positionAttribute);
}
}
......
......@@ -38,7 +38,7 @@ private slots:
void computeNormalFromDialog();
void computeCurvatureFromDialog();
void appsFinished();
void schnappsClosing();
public slots:
void computeNormal(const QString& mapName,
......
......@@ -37,7 +37,7 @@ bool Surface_DifferentialProperties_Plugin::enable()
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
connect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
......@@ -60,7 +60,7 @@ void Surface_DifferentialProperties_Plugin::disable()
disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
disconnect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
}
void Surface_DifferentialProperties_Plugin::mapAdded(MapHandlerGen *map)
......@@ -309,7 +309,7 @@ void Surface_DifferentialProperties_Plugin::computeCurvature(
}
}
void Surface_DifferentialProperties_Plugin::appsFinished()
void Surface_DifferentialProperties_Plugin::schnappsClosing()
{
m_computeNormalDialog->close();
m_computeCurvatureDialog->close();
......
......@@ -30,7 +30,7 @@ private slots:
void openComputeDistanceDialog();
void computeDistanceFromDialog();
void appsFinished();
void schnappsClosing();
public slots:
void computeDistance(
......
......@@ -28,8 +28,8 @@ Dialog_ComputeDistance::Dialog_ComputeDistance(SCHNApps* s) :
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
{
QListWidgetItem* item1 = new QListWidgetItem(map->getName(), list_maps_1);
QListWidgetItem* item2 = new QListWidgetItem(map->getName(), list_maps_2);
list_maps_1->addItem(map->getName());
list_maps_2->addItem(map->getName());
}
}
......@@ -109,8 +109,8 @@ void Dialog_ComputeDistance::selectedMap2Changed()
void Dialog_ComputeDistance::addMapToList(MapHandlerGen* map)
{
QListWidgetItem* item1 = new QListWidgetItem(map->getName(), list_maps_1);
QListWidgetItem* item2 = new QListWidgetItem(map->getName(), list_maps_2);
list_maps_1->addItem(map->getName());
list_maps_2->addItem(map->getName());
}
void Dialog_ComputeDistance::removeMapFromList(MapHandlerGen* map)
......
......@@ -26,7 +26,7 @@ bool Surface_Distance_Plugin::enable()
connect(m_computeDistanceDialog, SIGNAL(accepted()), this, SLOT(computeDistanceFromDialog()));
connect(m_computeDistanceDialog->button_apply, SIGNAL(clicked()), this, SLOT(computeDistanceFromDialog()));
connect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
connect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
return true;
}
......@@ -38,7 +38,7 @@ void Surface_Distance_Plugin::disable()
disconnect(m_computeDistanceDialog, SIGNAL(accepted()), this, SLOT(computeDistanceFromDialog()));
disconnect(m_computeDistanceDialog->button_apply, SIGNAL(clicked()), this, SLOT(computeDistanceFromDialog()));
disconnect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
disconnect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
}
void Surface_Distance_Plugin::openComputeDistanceDialog()
......@@ -133,7 +133,7 @@ void Surface_Distance_Plugin::computeDistance(
mh2->notifyAttributeModification(distance2);
}
void Surface_Distance_Plugin::appsFinished()
void Surface_Distance_Plugin::schnappsClosing()
{
m_computeDistanceDialog->close();
}
......
......@@ -39,15 +39,13 @@ MapHandlerGen* Surface_Import_Plugin::importFromFile(const QString& fileName)
std::vector<std::string> attrNames;
Algo::Surface::Import::importMesh<PFP2>(*map, fileName.toStdString(), attrNames);
// get vertex position attribute
VertexAttribute<PFP2::VEC3, PFP2::MAP> position = map->getAttribute<PFP2::VEC3, VERTEX, PFP2::MAP>(attrNames[0]);
mh->registerAttribute(position);
// update corresponding VBO & emit attribute update signal
mh->notifyAttributeModification(position);
// compute map bounding box
mh->updateBB(position);
AttributeContainer& cont = map->getAttributeContainer<VERTEX>();
std::vector<std::string> names;
std::vector<std::string> types;
cont.getAttributesNames(names);
cont.getAttributesTypes(types);
for(unsigned int i = 0; i < names.size(); ++i)
mhg->registerAttribute(VERTEX, QString::fromStdString(names[i]), QString::fromStdString(types[i]));
}
return mhg;
}
......
......@@ -251,8 +251,7 @@ void Surface_Modelisation_Plugin::createNewFace(MapHandlerGen* mhg)
}
mh->notifyConnectivityModification();
mh->notifyAttributeModification(position);
mh->updateBB(position);
mh->notifyAttributeModification(position);
collectedVertices.clear();
}
else QMessageBox::information(0, "Attention", "To create a face you need at least 3 vertices");
......@@ -271,9 +270,7 @@ void Surface_Modelisation_Plugin::addCube(MapHandlerGen *mhg)
Algo::Surface::Modelisation::embedPrism<PFP2>(*map, position, 4, true, 0.7f, 0.7f, 1.0f);
mh->notifyAttributeModification(position);
mh->notifyConnectivityModification();
// compute map bounding box
mh->updateBB(position);
mh->notifyConnectivityModification();
}
}
......@@ -417,8 +414,7 @@ void Surface_Modelisation_Plugin::extrudeRegion(MapHandlerGen *mhg)
Algo::Surface::Modelisation::extrudeRegion<PFP2>(*map, p.positionAttribute, selectedDarts[0], p.faceSelector->getMarker());
mh->notifyConnectivityModification();
mh->notifyAttributeModification(p.positionAttribute);
mh->updateBB(p.positionAttribute);
mh->notifyAttributeModification(p.positionAttribute);
}
}
......@@ -739,8 +735,7 @@ void Surface_Modelisation_Plugin::extrudeFace(MapHandlerGen *mhg)
Algo::Surface::Modelisation::extrudeFace<PFP2>(*map, p.positionAttribute, d, dist);
mh->notifyConnectivityModification();
mh->notifyAttributeModification(p.positionAttribute);
mh->updateBB(p.positionAttribute);
mh->notifyAttributeModification(p.positionAttribute);
}
}
......@@ -790,13 +785,11 @@ void Surface_Modelisation_Plugin::pathExtrudeFace(MapHandlerGen *mhg)
}
mh->notifyConnectivityModification();
mh->notifyAttributeModification(position);
mh->updateBB(position);
mh->notifyAttributeModification(position);
collectedVertices.clear();
}
}
Q_EXPORT_PLUGIN2(Surface_Modelisation_Plugin, Surface_Modelisation_Plugin)
} // namespace SCHNApps
......
......@@ -217,9 +217,6 @@ MapHandlerGen* Surface_Radiance_Plugin::importFromFile(const QString& fileName)
VertexAttribute<PFP2::VEC3, PFP2::MAP> position = map->getAttribute<PFP2::VEC3, VERTEX, PFP2::MAP>("position") ;
VertexAttribute<PFP2::VEC3, PFP2::MAP> normal = map->getAttribute<PFP2::VEC3, VERTEX, PFP2::MAP>("normal");
mh->registerAttribute(position);
mh->registerAttribute(normal);
// update corresponding VBO & emit attribute update signal
mh->notifyAttributeModification(position);
mh->notifyAttributeModification(normal);
......@@ -271,9 +268,6 @@ MapHandlerGen* Surface_Radiance_Plugin::importFromFile(const QString& fileName)
mapParams.radiancePerVertexShader = new Utils::ShaderRadiancePerVertex(Utils::SphericalHarmonics<PFP2::REAL, PFP2::VEC3>::get_resolution());
registerShader(mapParams.radiancePerVertexShader);
// compute map bounding box
mh->updateBB(position);
}
return mhg;
}
......
......@@ -95,7 +95,7 @@ private slots:
void vboAdded(Utils::VBO* vbo);
void vboRemoved(Utils::VBO* vbo);
void appsFinished();
void schnappsClosing();
public slots:
// slots for Python calls
......
......@@ -12,7 +12,7 @@ namespace SCHNApps
bool Surface_Render_Plugin::enable()
{
// magic line that init static variables of GenericMap in the plugins
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
GenericMap::copyAllStatics(m_schnapps->getStaticPointers());
m_dockTab = new Surface_Render_DockTab(m_schnapps, this);
m_schnapps->addPluginDockTab(this, m_dockTab, "Surface_Render");
......@@ -41,7 +41,7 @@ bool Surface_Render_Plugin::enable()
connect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
connect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
connect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapAdded(map);
......@@ -62,7 +62,7 @@ void Surface_Render_Plugin::disable()
disconnect(m_schnapps, SIGNAL(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)), this, SLOT(selectedMapChanged(MapHandlerGen*, MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapAdded(MapHandlerGen*)), this, SLOT(mapAdded(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(mapRemoved(MapHandlerGen*)), this, SLOT(mapRemoved(MapHandlerGen*)));
disconnect(m_schnapps, SIGNAL(appsFinished()), this, SLOT(appsFinished()));
disconnect(m_schnapps, SIGNAL(schnappsClosing()), this, SLOT(schnappsClosing()));
foreach(MapHandlerGen* map, m_schnapps->getMapSet().values())
mapRemoved(map);
......@@ -108,8 +108,6 @@ void Surface_Render_Plugin::drawMap(View* view, MapHandlerGen* map)
if(p.renderEdges)
{
glLineWidth(1.0f);
CGoGN::Geom::Vec4f c(0.1f, 0.1f, 0.1f, 1.0f);
m_simpleColorShader->setColor(c);
m_simpleColorShader->setAttributePosition(p.positionVBO);
m_simpleColorShader->setColor(p.simpleColor);
map->draw(m_simpleColorShader, CGoGN::Algo::Render::GL2::LINES);
......@@ -140,10 +138,6 @@ void Surface_Render_Plugin::selectedMapChanged(MapHandlerGen *prev, MapHandlerGe
{
DEBUG_SLOT();
m_dockTab->updateMapParameters();
if (cur==NULL)
m_dockTab->setDisabled(true);
else
m_dockTab->setDisabled(false);
}
void Surface_Render_Plugin::mapAdded(MapHandlerGen *map)
......@@ -401,7 +395,7 @@ void Surface_Render_Plugin::changeVertexColor(const QString& view, const QString
void Surface_Render_Plugin::appsFinished()
void Surface_Render_Plugin::schnappsClosing()
{
m_dockTab->m_colorDial->close();
}
......
......@@ -72,7 +72,7 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
View* view = m_schnapps->getSelectedView();
MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map)
if (view && map)
{
m_plugin->h_viewParameterSet[view][map].diffuseColor = rgbCol;
view->updateGL();
......@@ -89,7 +89,7 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
View* view = m_schnapps->getSelectedView();
MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map)
if (view && map)
{
m_plugin->h_viewParameterSet[view][map].simpleColor = rgbCol;
view->updateGL();
......@@ -106,7 +106,7 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
View* view = m_schnapps->getSelectedView();
MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map)
if (view && map)
{
m_plugin->h_viewParameterSet[view][map].vertexColor = rgbCol;
view->updateGL();
......@@ -120,11 +120,11 @@ void Surface_Render_DockTab::colorSelected(const QColor& col)
void Surface_Render_DockTab::positionVBOChanged(int index)
{
if(!b_updatingUI)
if (!b_updatingUI)
{
View* view = m_schnapps->getSelectedView();
MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map)
if (view && map)
{
m_plugin->h_viewParameterSet[view][map].positionVBO = map->getVBO(combo_positionVBO->currentText());
view->updateGL();
......@@ -134,11 +134,11 @@ void Surface_Render_DockTab::positionVBOChanged(int index)
void Surface_Render_DockTab::normalVBOChanged(int index)
{
if(!b_updatingUI)
if (!b_updatingUI)
{
View* view = m_schnapps->getSelectedView();
MapHandlerGen* map = m_schnapps->getSelectedMap();
if(view && map)
if (view && map)
{
m_plugin->h_viewParameterSet[view][map].normalVBO = map->getVBO(combo_normalVBO->currentText());
view->updateGL();
......@@ -148,11 +148,11 @@ void Surface_Render_DockTab::normalVBOChanged(int index)
void Surface_Render_DockTab::renderVerticesChanged(bool b)
{
if(!b_updatingUI)