Création d'un compte pour un collaborateur extérieur au laboratoire depuis l'intranet ICube : https://intranet.icube.unistra.fr/fr/labs/member/profile

stage_shader.h 2.09 KB
Newer Older
untereiner's avatar
untereiner committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
/*
 * stage_shader.h
 *
 *  Created on: 6 juin 2011
 *      Author: untereiner
 */
#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/shaderSimpleColor.h"

#include "Utils/cgognStream.h"
#include "Utils/drawer.h"

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;

	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 dockWidget_topLevelChanged(bool isFloating);

	void button_compile();
};

#endif