Commit 31366e50 authored by Maire Nicolas's avatar Maire Nicolas
Browse files

Petits changement dans l'interface de "clipping".

parent d3ed36fb
......@@ -278,7 +278,7 @@ void Clipping::initGUI()
setCallBack(dock.spinBox_GridResolution, SIGNAL(valueChanged(int)), SLOT(slot_spinBox_GridResolution(int)));
setCallBack(dock.pushButton_changePlanesColor, SIGNAL(clicked()), SLOT(slot_pushButton_changePlanesColor()));
setCallBack(dock.compileButton, SIGNAL(clicked()), SLOT(button_compile()) );
setCallBack(dock.compileButton, SIGNAL(clicked()), SLOT(button_compile()));
dock.vertexEdit->setPlainText(QString(m_shader->getVertexShaderSrc()));
dock.fragmentEdit->setPlainText(QString(m_shader->getFragmentShaderSrc()));
......@@ -296,7 +296,7 @@ void Clipping::initGUI()
unsigned int spheresPrecision1, spheresPrecision2;
m_sphereDrawable->getPrecisionDrawing(spheresPrecision1, spheresPrecision2);
dock.spinBox_GridResolution->setValue(spheresPrecision1);
dock.spinBox_SphereResolution->setValue(spheresPrecision1);
......@@ -408,7 +408,7 @@ void Clipping::cb_initGL()
m_planeDrawable->updatePrecisionDrawing(5);
m_sphereDrawable = new Utils::IcoSphere;
m_sphereDrawable->setColor(Geom::Vec4f(0.0, 0.4, 1.0, 1.0));
m_sphereDrawable->updatePrecisionDrawing(3);
m_sphereDrawable->updatePrecisionDrawing(1);
// setup clipping picking frame
m_frameManipulator = new Utils::FrameManipulator();
......@@ -458,9 +458,21 @@ void Clipping::cb_redraw()
// Display clipping shapes
for (size_t i = 0; i < m_pickablePlanes.size(); i++)
{
if (m_pickablePlanes[i] == m_lastPickedObject)
glLineWidth(5.0);
else
glLineWidth(2.0);
m_pickablePlanes[i]->draw();
}
for (size_t i = 0; i < m_pickableSpheres.size(); i++)
{
if (m_pickableSpheres[i] == m_lastPickedObject)
glLineWidth(5.0);
else
glLineWidth(2.0);
m_pickableSpheres[i]->draw();
}
// Display picking frame
if (m_lastPickedObject)
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>455</width>
<height>468</height>
<width>352</width>
<height>778</height>
</rect>
</property>
<property name="allowedAreas">
......@@ -31,416 +31,312 @@
<string>Visualisation</string>
</attribute>
<layout class="QGridLayout" name="gridLayout_6">
<item row="0" column="1">
<widget class="QTabWidget" name="tabWidget_3">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab_Object">
<attribute name="title">
<string>Object</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox_vertices">
<property name="text">
<string>Vertices</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_lines">
<property name="text">
<string>Lines</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_faces">
<property name="text">
<string>Faces</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_topo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Topo</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="explod_phi2">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="explod_phi3">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_faces">
<property name="text">
<string>Faces</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_volumes">
<property name="text">
<string>Volumes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="explod_phi1">
<property name="prefix">
<string/>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_edges">
<property name="text">
<string>Edges</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0">
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox_vertices">
<property name="text">
<string>Vertices</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_lines">
<property name="text">
<string>Lines</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_faces">
<property name="text">
<string>Faces</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_topo">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Topo</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_3">
<item row="1" column="0">
<layout class="QGridLayout" name="gridLayout_2">
<item row="1" column="1">
<widget class="QDoubleSpinBox" name="explod_phi2">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QDoubleSpinBox" name="explod_phi3">
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_faces">
<property name="text">
<string>Faces</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_volumes">
<property name="text">
<string>Volumes</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QDoubleSpinBox" name="explod_phi1">
<property name="prefix">
<string/>
</property>
<property name="maximum">
<double>1.000000000000000</double>
</property>
<property name="singleStep">
<double>0.100000000000000</double>
</property>
<property name="value">
<double>0.900000000000000</double>
</property>
</widget>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_edges">
<property name="text">
<string>Edges</string>
</property>
</widget>
</item>
</layout>
<widget class="QGroupBox" name="groupBox_clipPlanes">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Clipping Planes</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPushButton" name="pushButton_addPlane">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_12">
<item row="0" column="0">
<widget class="QLabel" name="label_GridResolution">
<property name="text">
<string>Res.</string>
</property>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_GridResolution">
<property name="maximum">
<number>200</number>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_GridColor">
<property name="text">
<string>Color</string>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_PlaneClipping">
<attribute name="title">
<string>Plane Clip</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_4">
<item>
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="3,1">
<item>
<widget class="QGroupBox" name="groupBox_PlanesDisplayParams">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Display Parameters</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<layout class="QGridLayout" name="gridLayout_12">
<item row="0" column="0">
<widget class="QLabel" name="label_GridResolution">
<property name="text">
<string>Res.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_GridResolution">
<property name="maximum">
<number>200</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_GridColor">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_changePlanesColor">
<property name="text">
<string>Change Color</string>
</property>
</widget>
</item>
</layout>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_changePlanesColor">
<property name="text">
<string>Change Color</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_PlanesSelection">
<property name="title">
<string>Planes Selection</string>
</property>
<widget class="QPushButton" name="pushButton_addPlane">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>31</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>+</string>
</property>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_SphereClipping">
<attribute name="title">
<string>Sphere Clip</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0">
<item>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="3,1">
<item>
<widget class="QGroupBox" name="groupBox_SpheresDisplayParams">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Display Parameters</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<widget class="QLabel" name="label_SphereResolution">
<property name="text">
<string>Res.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_SphereResolution">
<property name="maximum">
<number>200</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_GridColor_2">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_changeSpheresColor">
<property name="text">
<string>Change Color</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_SpheresSelection_2">
<property name="title">
<string>Spheres Selection</string>
</property>
<widget class="QGroupBox" name="groupBox_clipSpheres">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Clipping Spheres</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pushButton_addSphere">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>31</width>
<height>28</height>
</rect>
</property>
<property name="text">
<string>+</string>
<string>Add</string>
</property>
</widget>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
<widget class="QLabel" name="label_SphereResolution">
<property name="text">
<string>Res.</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QSpinBox" name="spinBox_SphereResolution">
<property name="maximum">
<number>200</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_GridColor_2">
<property name="text">
<string>Color</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QPushButton" name="pushButton_changeSpheresColor">
<property name="text">
<string>Change Color</string>
</property>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_GlobalClipping">
<attribute name="title">
<string>Global Clip</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QGroupBox" name="groupBox_ClippingMode">
<property name="title">
<string>Clipping Mode</string>
</property>
<widget class="QRadioButton" name="radioButton_ClippingModeAnd">
<property name="geometry">
<rect>
<x>30</x>
<y>30</y>
<width>117</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>AND</string>
</property>
</widget>
<widget class="QRadioButton" name="radioButton_ClippingModeOr">
<property name="geometry">
<rect>
<x>30</x>
<y>60</y>
<width>117</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>OR</string>
</property>
</widget>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<widget class="QRadioButton" name="radioButton_ClippingModeAnd">
<property name="text">
<string>AND</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_ClippingModeOr">
<property name="text">
<string>OR</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QGroupBox" name="groupBox_ColorAttenuation">
<property name="title">