Commit cf57535b authored by Maire Nicolas's avatar Maire Nicolas

Suppression des deux autres applis stage_shader, elles sont devenues obsolètes.

parent d6ae7f40
......@@ -65,25 +65,12 @@ add_executable( tuto5 tuto5.cpp ${tuto5_ui} ${tuto5_moc})
target_link_libraries( tuto5
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
QT4_WRAP_UI( stage_shader_ui stage_shader.ui )
QT4_WRAP_CPP(stage_shader_moc stage_shader.h)
add_executable( stage_shader stage_shader.cpp ${stage_shader_ui} ${stage_shader_moc})
target_link_libraries( stage_shader
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
QT4_WRAP_UI( stage_shader_reloaded_ui stage_shader_reloaded.ui )
QT4_WRAP_CPP(stage_shader_reloaded_moc stage_shader_reloaded.h)
add_executable( stage_shader_reloaded stage_shader_reloaded.cpp ${stage_shader_reloaded_ui} ${stage_shader_reloaded_moc})
target_link_libraries( stage_shader_reloaded
${CGoGN_LIBS_D} ${COMMON_LIBS} ${QT_LIBRARIES} )
QT4_WRAP_UI( stage_shader_number_two_ui stage_shader_number_two.ui )
QT4_WRAP_CPP( stage_shader_number_two_moc stage_shader_number_two.h )
add_executable( stage_shader_number_two stage_shader_number_two.cpp ${stage_shader_number_two_moc} ${stage_shader_number_two_ui})
target_link_libraries( stage_shader_number_two
${CGoGN_LIBS_D} ${NUMERICAL_LIBS} ${COMMON_LIBS} ${QT_LIBRARIES} )
#add_executable( tuto_subdivision tuto_subdivision.cpp)
#target_link_libraries( tuto_subdivision
......
This diff is collapsed.
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009-2011, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: http://cgogn.u-strasbg.fr/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#ifndef __STAGE_SHADER_H__
#define __STAGE_SHADER_H__
#include <iostream>
#include "Utils/qtSimple.h"
#include "ui_stage_shader.h"
// inclure qtui.h juste après le ui_xxx.h
#include "Utils/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map3.h"
#include "Topology/generic/embeddedMap3.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
#include "Geometry/bounding_box.h"
#include "Algo/Import/import.h"
//#include "Algo/Export/export.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Algo/Render/GL2/topo3Render.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/cgognStream.h"
#include "Utils/drawer.h"
#include <string>
#include <sstream>
using namespace CGoGN ;
struct PFP: public PFP_STANDARD
{
// definition of the map
typedef EmbeddedMap3<Map3> MAP;
};
class StageShader: public Utils::QT::SimpleQT
{
Q_OBJECT
public:
typedef PFP::MAP MAP;
typedef PFP::TVEC3 TVEC3;
//Manip Carte
MAP myMap ;
SelectorTrue allDarts ;
TVEC3 position;
Dart dglobal;
//Render
bool m_drawVertices;
bool m_drawLines;
bool m_drawFaces;
bool m_drawTopo;
Algo::Render::GL2::MapRender* m_render;
Algo::Render::GL2::Topo3RenderMapD* m_render_topo;
Geom::BoundingBox<PFP::VEC3> m_bb;
Utils::VBO* m_positionVBO;
Utils::ShaderSimpleColor* m_shader;
Utils::Drawer* influence_area;
Utils::Drawer* chips_area;
Geom::Vec3f m_coeffTopoExplod;
Geom::Vec3f gPosObj ;
float gWidthObj ;
//QT
Utils::QT::uiDockInterface dock;
StageShader();
void initGUI();
void cb_Open();
void updateVBOprimitives(int upType);
void cb_initGL();
void cb_redraw();
void cb_mousePress(int button, int x, int y);
void cb_keyPress(int code);
void importMesh(std::string& filename);
public slots:
void slot_drawVertices(bool b);
void slot_drawLines(bool b);
void slot_drawFaces(bool b);
void slot_drawTopo(bool b);
void slot_explodTopoPhi1(double c);
void slot_explodTopoPhi2(double c);
void slot_explodTopoPhi3(double c);
void slot_pushButton_addPlane();
void slot_pushButton_deletePlane();
void slot_comboBox_PlaneIndexChanged(int newIndex);
void slot_doubleSpinBox_PlaneVec1(double c);
void slot_doubleSpinBox_PlaneVec2(double c);
void slot_doubleSpinBox_PlaneOrigin(double c);
void slot_doubleSpinBox_GridDisplaySize(double c);
void slot_spinBox_GridResolutionX(int i);
void slot_spinBox_GridResolutionY(int i);
void slot_doubleSpinBox_GridColor(double c);
void slot_pushButton_addSphere();
void slot_pushButton_deleteSphere();
void slot_comboBox_SphereIndexChanged(int newIndex);
void slot_doubleSpinBox_SphereCenter(double c);
void slot_doubleSpinBox_SphereRadius(double c);
void slot_spinBox_SphereGridResolutionX(int i);
void slot_spinBox_SphereGridResolutionY(int i);
void slot_doubleSpinBox_SphereGridColor(double c);
void slot_doubleSpinBox_ColorAttenuationFactor(double c);
void slot_horizontalSlider_ClippingMode(int i);
void button_compile();
};
#endif
This diff is collapsed.
This diff is collapsed.
/*******************************************************************************
* CGoGN: Combinatorial and Geometric modeling with Generic N-dimensional Maps *
* version 0.1 *
* Copyright (C) 2009, IGG Team, LSIIT, University of Strasbourg *
* *
* This library is free software; you can redistribute it and/or modify it *
* under the terms of the GNU Lesser General Public License as published by the *
* Free Software Foundation; either version 2.1 of the License, or (at your *
* option) any later version. *
* *
* This library is distributed in the hope that it will be useful, but WITHOUT *
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or *
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License *
* for more details. *
* *
* You should have received a copy of the GNU Lesser General Public License *
* along with this library; if not, write to the Free Software Foundation, *
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *
* *
* Web site: https://iggservis.u-strasbg.fr/CGoGN/ *
* Contact information: cgogn@unistra.fr *
* *
*******************************************************************************/
#include <iostream>
#include "Utils/qtSimple.h"
#include "ui_stage_shader_number_two.h"
#include "Utils/qtui.h"
#include "Topology/generic/parameters.h"
#include "Topology/map/map2.h"
#include "Topology/generic/embeddedMap2.h"
#include "Geometry/vector_gen.h"
#include "Geometry/matrix.h"
#include "Algo/Import/import.h"
#include "Algo/Render/GL2/mapRender.h"
#include "Utils/Shaders/shaderPhong.h"
#include "Utils/Shaders/shaderFlat.h"
#include "Utils/Shaders/shaderSimpleColor.h"
#include "Utils/Shaders/shaderVectorPerVertex.h"
#include "Utils/pointSprite.h"
#include "Algo/Geometry/boundingbox.h"
#include "Algo/Geometry/normal.h"
using namespace CGoGN ;
struct PFP: public PFP_STANDARD
{
// definition of the map
typedef EmbeddedMap2<Map2> MAP ;
};
typedef PFP::MAP MAP ;
class Stage_shader_number_two : public Utils::QT::SimpleQT
{
Q_OBJECT
public:
MAP myMap ;
SelectorTrue allDarts ;
Utils::QT::uiDockInterface dock ;
enum renderMode { FLAT, PHONG } ;
Geom::Vec4f colDif ;
Geom::Vec4f colSpec ;
Geom::Vec4f colClear ;
Geom::Vec4f colNormal ;
float shininess ;
Geom::BoundingBox<PFP::VEC3> bb ;
float normalBaseSize ;
float normalScaleFactor ;
float vertexBaseSize ;
float vertexScaleFactor ;
float faceShrinkage ;
int m_renderStyle ;
bool m_drawVertices ;
bool m_drawEdges ;
bool m_drawFaces ;
bool m_drawNormals ;
PFP::TVEC3 position ;
PFP::TVEC3 normal ;
Algo::Render::GL2::MapRender* m_render ;
Utils::VBO* m_positionVBO ;
Utils::VBO* m_normalVBO ;
Utils::ShaderPhong* m_phongShader ;
Utils::ShaderFlat* m_flatShader ;
Utils::ShaderVectorPerVertex* m_vectorShader ;
Utils::ShaderSimpleColor* m_simpleColorShader ;
Utils::PointSprite* m_pointSprite ;
Stage_shader_number_two() ;
void initGUI() ;
void cb_initGL() ;
void cb_redraw() ;
void cb_Open() ;
void cb_keyPress(int code);
void cb_mousePress(int button, int x, int y);
void cb_mouseMove(int button, int x, int y);
void importMesh(std::string& filename) ;
int m_mouseLastX, m_mouseLastY;
public slots:
void slot_drawVertices(bool b) ;
void slot_verticesSize(int i) ;
void slot_drawEdges(bool b) ;
void slot_drawFaces(bool b) ;
void slot_faceLighting(int i) ;
void slot_drawNormals(bool b) ;
void slot_normalsSize(int i) ;
void slot_doubleSpinBox_ColorAttenuationFactor(double c);
};
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>DockWidget</class>
<widget class="QDockWidget" name="DockWidget">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>174</width>
<height>393</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>174</width>
<height>393</height>
</size>
</property>
<property name="windowTitle">
<string>Commands</string>
</property>
<widget class="QWidget" name="dockWidgetContents">
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
<string>Visu</string>
</attribute>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="check_drawVertices">
<property name="text">
<string>draw vertices</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="slider_verticesSize">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_drawEdges">
<property name="text">
<string>draw edges</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_drawFaces">
<property name="text">
<string>draw faces</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="combo_faceLighting">
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<item>
<property name="text">
<string>FLAT</string>
</property>
</item>
<item>
<property name="text">
<string>PHONG</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QCheckBox" name="check_drawNormals">
<property name="text">
<string>draw normals</string>
</property>
</widget>
</item>
<item>
<widget class="QSlider" name="slider_normalsSize">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
</widget>
</item>
<item>
<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>
<widget class="QWidget" name="tab_2">
<attribute name="title">
<string>Clipping</string>
</attribute>
<widget class="QLabel" name="label_color_attenuation">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>141</width>
<height>18</height>
</rect>
</property>
<property name="text">
<string>Color attenuation :</string>
</property>
</widget>
<widget class="QDoubleSpinBox" name="doubleSpinBox_color_attenuation">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>63</width>
<height>28</height>
</rect>
</property>
</widget>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
<resources/>
<connections>
<connection>
<sender>check_drawNormals</sender>
<signal>toggled(bool)</signal>
<receiver>slider_normalsSize</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>75</x>
<y>191</y>
</hint>
<hint type="destinationlabel">
<x>75</x>
<y>222</y>
</hint>
</hints>
</connection>
<connection>
<sender>check_drawVertices</sender>
<signal>toggled(bool)</signal>
<receiver>slider_verticesSize</receiver>
<slot>setVisible(bool)</slot>
<hints>
<hint type="sourcelabel">
<x>75</x>
<y>44</y>
</hint>
<hint type="destinationlabel">
<x>75</x>
<y>75</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