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,17 +31,7 @@
<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>
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox_vertices">
......@@ -152,42 +142,27 @@
</item>
</layout>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</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">
<layout class="QVBoxLayout" name="verticalLayout_3" stretch="0">
<item>
<widget class="QGroupBox" name="groupBox_PlanesDisplayParams">
<widget class="QGroupBox" name="groupBox_clipPlanes">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Display Parameters</string>
<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">
......@@ -223,46 +198,26 @@
</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>
<widget class="QWidget" name="tab_SphereClipping">
<attribute name="title">
<string>Sphere Clip</string>
</attribute>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="3,1">
<layout class="QVBoxLayout" name="verticalLayout_5" stretch="0">
<item>
<widget class="QGroupBox" name="groupBox_SpheresDisplayParams">
<widget class="QGroupBox" name="groupBox_clipSpheres">
<property name="enabled">
<bool>true</bool>
</property>
<property name="title">
<string>Display Parameters</string>
<string>Clipping Spheres</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
<widget class="QPushButton" name="pushButton_addSphere">
<property name="text">
<string>Add</string>
</property>
</widget>
</item>
<item>
<layout class="QGridLayout" name="gridLayout_13">
<item row="0" column="0">
......@@ -298,149 +253,90 @@
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="groupBox_SpheresSelection_2">
<property name="title">
<string>Spheres Selection</string>
</property>
<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>
</property>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_GlobalClipping">
<attribute name="title">
<string>Global Clip</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QVBoxLayout" name="verticalLayout_8">
<item>
<widget class="QGroupBox" name="groupBox_ClippingMode">
<property name="title">
<string>Clipping Mode</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_9">
<item>
<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>
</item>
<item>
<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>
</item>
</layout>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_10">
<item>
<widget class="QGroupBox" name="groupBox_ColorAttenuation">
<property name="title">
<string>Color Attenuation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QLabel" name="label_ColorAttenuationFactor">
<property name="geometry">
<rect>
<x>10</x>
<y>30</y>
<width>38</width>
<height>41</height>
</rect>
</property>
<property name="text">
<string>Color Att.</string>
<string>Color Att. Factor :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDoubleSpinBox" name="doubleSpinBox_ColorAttenuationFactor">
<property name="geometry">
<rect>
<x>60</x>
<y>40</y>
<width>73</width>
<height>28</height>
</rect>
</property>
<property name="singleStep">
<double>1.000000000000000</double>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_ColorAttenuationMode">
<property name="geometry">
<rect>
<x>10</x>
<y>80</y>
<width>41</width>
<height>61</height>
</rect>
</property>
<property name="text">
<string>Color Att. Mode</string>
<string>Color Att. Mode :</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_ColorAttenuationModeLinear">
<property name="geometry">
<rect>
<x>70</x>
<y>90</y>
<width>117</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Linear</string>
</property>
</widget>
</item>
<item>
<widget class="QRadioButton" name="radioButton_ColorAttenuationModeQuadratic">
<property name="geometry">
<rect>
<x>70</x>
<y>110</y>
<width>117</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Quadratic</string>
</property>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
......
Supports Markdown
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