Brève interruption de service ce midi pour augmentation de la mémoire 🤞

Commit 9a757bd6 authored by Sylvain Thery's avatar Sylvain Thery

restore tuto5 (error commit)

parent c3d7a637
This diff is collapsed.
......@@ -27,7 +27,7 @@
#include <iostream>
//#define WITH_GMAP 1
#define WITH_GMAP 1
#include "Topology/generic/parameters.h"
#ifdef WITH_GMAP
......@@ -38,14 +38,24 @@
#include "Geometry/vector_gen.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Algo/Render/GL2/topo3Render.h"
#include "Algo/Render/GL2/explodeVolumeRender.h"
#include "Topology/generic/cellmarker.h"
#include "Utils/text3d.h"
#include "Utils/pointSprite.h"
#include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/cgognStream.h"
#include "Utils/Qt/qtSimple.h"
#include "Utils/frameManipulator.h"
#include "ui_tuto5.h"
// inclure qtui.h juste après le ui_xxx.h
#include "Utils/Qt/qtui.h"
......@@ -76,62 +86,65 @@ class MyQT: public Utils::QT::SimpleQT
{
Q_OBJECT
bool render_volumes;
bool render_edges;
bool render_text;
bool render_balls;
bool render_vectors;
bool render_topo;
bool render_topoTemp;
bool clip_volume;
bool hide_clipping;
Algo::Render::GL2::Topo3Render* m_topo_render;
Algo::Render::GL2::ExplodeVolumeRender* m_explode_render;
float m_explode_factor;
// for clipping plane manipulation
Utils::Pickable* m_PlanePick;
Utils::FrameManipulator* m_frame;
unsigned int m_pickedAxis;
int m_begX;
int m_begY;
int clip_id1;
int clip_id2;
public:
float m_WidthObj;
Geom::Vec3f m_PosObj;
Algo::Render::GL2::MapRender* m_render;
Algo::Render::GL2::Topo3Render* m_render_topo;
Utils::VBO* m_positionVBO;
Utils::VBO* m_dataVBO;
Utils::ShaderSimpleColor* m_shader;
Utils::ShaderVectorPerVertex* m_lines;
Utils::Strings3D* m_strings;
Utils::PointSprite* m_sprite;
QTimer *m_timer;
public:
MyQT():
render_volumes(true),
render_edges(true),
render_text(true),
render_balls(true),
render_vectors(true),
render_topo(true),
render_topoTemp(true),
clip_volume(true),
hide_clipping(false),
m_topo_render(NULL),
m_explode_render(NULL),
m_explode_factor(0.8f)
m_render(NULL),
m_render_topo(NULL),
m_positionVBO(NULL),
m_dataVBO(NULL),
m_shader(NULL),
m_lines(NULL),
m_strings(NULL),
m_sprite(NULL),
m_timer(NULL)
{}
Dart m_selected;
protected:
void storeVerticesInfo();
void cb_redraw();
void cb_initGL();
void cb_mouseMove(int buttons, int x, int y);
void cb_mousePress(int button, int x, int y);
void cb_mouseRelease(int button, int x, int y);
void cb_mousePress(int button, int x, int y);
void cb_keyPress(int code);
// slots locaux
public slots:
void volumes_onoff(bool x);
void edges_onoff(bool x);
void balls_onoff(bool x);
void vectors_onoff(bool x);
void text_onoff(bool x);
void topo_onoff(bool x);
void clipping_onoff(bool x);
void hide_onoff(bool x);
void slider_explode(int x);
void slider_pressed();
void slider_released();
void slider_balls(int x);
void slider_vectors(int x);
void slider_text(int x);
void animate();
};
#endif
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>150</width>
<height>272</height>
<height>250</height>
</rect>
</property>
<property name="minimumSize">
......@@ -45,9 +45,9 @@
<item row="0" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="checkBox_volumes">
<widget class="QCheckBox" name="checkBox_balls">
<property name="text">
<string>Volumes</string>
<string>Balls</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -55,19 +55,26 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_edges">
<property name="text">
<string>Edges of volumes</string>
<widget class="QSlider" name="slider_balls">
<property name="value">
<number>50</number>
</property>
<property name="checked">
<bool>true</bool>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_topo">
<widget class="Line" name="line_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_vectors">
<property name="text">
<string>Topo</string>
<string>Vectors</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -75,7 +82,7 @@
</widget>
</item>
<item>
<widget class="QSlider" name="slider_explode">
<widget class="QSlider" name="slider_vectors">
<property name="value">
<number>50</number>
</property>
......@@ -85,19 +92,16 @@
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_plane">
<widget class="QCheckBox" name="checkBox_text">
<property name="text">
<string>clipping</string>
</property>
<property name="checkable">
<bool>true</bool>
<string>Text</string>
</property>
<property name="checked">
<bool>true</bool>
......@@ -105,12 +109,29 @@
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_hide">
<property name="enabled">
<bool>true</bool>
<widget class="QSlider" name="slider_text">
<property name="value">
<number>50</number>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="Line" name="line_3">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="checkBox_topo">
<property name="text">
<string>hide clipping plane</string>
<string>Topo</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
......@@ -133,5 +154,54 @@
</widget>
</widget>
<resources/>
<connections/>
<connections>
<connection>
<sender>checkBox_balls</sender>
<signal>toggled(bool)</signal>
<receiver>slider_balls</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>37</y>
</hint>
<hint type="destinationlabel">
<x>95</x>
<y>63</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_text</sender>
<signal>toggled(bool)</signal>
<receiver>slider_text</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>157</y>
</hint>
<hint type="destinationlabel">
<x>95</x>
<y>183</y>
</hint>
</hints>
</connection>
<connection>
<sender>checkBox_vectors</sender>
<signal>toggled(bool)</signal>
<receiver>slider_vectors</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>95</x>
<y>97</y>
</hint>
<hint type="destinationlabel">
<x>95</x>
<y>123</y>
</hint>
</hints>
</connection>
</connections>
</ui>
Markdown is supported
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