Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
CGoGN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Thomas Pitiot
CGoGN
Commits
24437f2d
Commit
24437f2d
authored
Jul 22, 2011
by
Maire Nicolas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Création d'une nouvelle appli pour clipping avec picking.
parent
14baf27c
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
1644 additions
and
38 deletions
+1644
-38
Apps/Tuto/CMakeLists.txt
Apps/Tuto/CMakeLists.txt
+6
-0
Apps/Tuto/stage_shader.cpp
Apps/Tuto/stage_shader.cpp
+1
-2
Apps/Tuto/stage_shader.ui
Apps/Tuto/stage_shader.ui
+20
-36
Apps/Tuto/stage_shader_reloaded.cpp
Apps/Tuto/stage_shader_reloaded.cpp
+630
-0
Apps/Tuto/stage_shader_reloaded.h
Apps/Tuto/stage_shader_reloaded.h
+167
-0
Apps/Tuto/stage_shader_reloaded.ui
Apps/Tuto/stage_shader_reloaded.ui
+820
-0
No files found.
Apps/Tuto/CMakeLists.txt
View file @
24437f2d
...
...
@@ -72,6 +72,12 @@ add_executable( stage_shader stage_shader.cpp ${stage_shader_ui} ${stage_shader_
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
}
)
...
...
Apps/Tuto/stage_shader.cpp
View file @
24437f2d
...
...
@@ -508,12 +508,11 @@ void StageShader::cb_initGL()
registerShader
(
m_shader
);
// setup clipping
m_shader
->
insertClippingCode
();
m_shader
->
setClipPlanesDisplayColor
(
Geom
::
Vec3f
(
1.0
,
0.0
,
0.0
));
m_shader
->
setClipPlanesDisplayXRes
(
10
);
m_shader
->
setClipPlanesDisplayYRes
(
5
);
m_shader
->
setClipSpheresDisplayColor
(
Geom
::
Vec3f
(
0.0
,
0.4
,
1.0
));
m_shader
->
setClipSpheresDisplayXRes
(
20
);
m_shader
->
setClipSpheresDisplayYRes
(
15
);
...
...
Apps/Tuto/stage_shader.ui
View file @
24437f2d
...
...
@@ -87,7 +87,7 @@
<layout
class=
"QGridLayout"
name=
"gridLayout_3"
>
<item
row=
"1"
column=
"0"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_2"
>
<item
row=
"
3"
column=
"2
"
>
<item
row=
"
1"
column=
"1
"
>
<widget
class=
"QDoubleSpinBox"
name=
"explod_phi2"
>
<property
name=
"maximum"
>
<double>
1.000000000000000
</double>
...
...
@@ -100,7 +100,7 @@
</property>
</widget>
</item>
<item
row=
"
5"
column=
"2
"
>
<item
row=
"
2"
column=
"1
"
>
<widget
class=
"QDoubleSpinBox"
name=
"explod_phi3"
>
<property
name=
"maximum"
>
<double>
1.000000000000000
</double>
...
...
@@ -113,21 +113,21 @@
</property>
</widget>
</item>
<item
row=
"
3
"
column=
"0"
>
<item
row=
"
1
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_faces"
>
<property
name=
"text"
>
<string>
Faces
</string>
</property>
</widget>
</item>
<item
row=
"
5
"
column=
"0"
>
<item
row=
"
2
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_volumes"
>
<property
name=
"text"
>
<string>
Volumes
</string>
</property>
</widget>
</item>
<item
row=
"
2"
column=
"2
"
>
<item
row=
"
0"
column=
"1
"
>
<widget
class=
"QDoubleSpinBox"
name=
"explod_phi1"
>
<property
name=
"prefix"
>
<string/>
...
...
@@ -143,7 +143,7 @@
</property>
</widget>
</item>
<item
row=
"
2
"
column=
"0"
>
<item
row=
"
0
"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label_edges"
>
<property
name=
"text"
>
<string>
Edges
</string>
...
...
@@ -152,36 +152,7 @@
</item>
</layout>
</item>
</layout>
</widget>
</item>
<item>
<widget
class=
"QGroupBox"
name=
"groupBox_rotate"
>
<property
name=
"title"
>
<string>
Rotate
</string>
</property>
<property
name=
"checkable"
>
<bool>
true
</bool>
</property>
<property
name=
"checked"
>
<bool>
false
</bool>
</property>
<layout
class=
"QGridLayout"
name=
"gridLayout_5"
>
<item
row=
"0"
column=
"0"
>
<layout
class=
"QGridLayout"
name=
"gridLayout_4"
>
<item
row=
"0"
column=
"0"
>
<widget
class=
"QLabel"
name=
"label"
>
<property
name=
"text"
>
<string>
Speed
</string>
</property>
</widget>
</item>
<item
row=
"0"
column=
"1"
>
<widget
class=
"QDoubleSpinBox"
name=
"doubleSpinBox"
/>
</item>
</layout>
</item>
<item
row=
"1"
column=
"0"
>
<item
row=
"2"
column=
"0"
>
<spacer
name=
"verticalSpacer"
>
<property
name=
"orientation"
>
<enum>
Qt::Vertical
</enum>
...
...
@@ -766,6 +737,19 @@
</property>
</widget>
</item>
<item
row=
"2"
column=
"1"
>
<spacer
name=
"verticalSpacer_2"
>
<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>
</item>
</layout>
...
...
Apps/Tuto/stage_shader_reloaded.cpp
0 → 100644
View file @
24437f2d
This diff is collapsed.
Click to expand it.
Apps/Tuto/stage_shader_reloaded.h
0 → 100644
View file @
24437f2d
/*******************************************************************************
* 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_RELOADED_H__
#define __STAGE_SHADER_RELOADED_H__
#include <iostream>
#include "Utils/qtSimple.h"
#include "ui_stage_shader_reloaded.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/frameManipulator.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
StageShaderReloaded
:
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
;
// Clipping
Utils
::
LineDrawable
*
m_planeDrawable
;
Utils
::
LineDrawable
*
m_sphereDrawable
;
Utils
::
FrameManipulator
*
m_frameManipulator
;
std
::
vector
<
Utils
::
Pickable
*>
m_pickables
;
StageShaderReloaded
();
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
Apps/Tuto/stage_shader_reloaded.ui
0 → 100644
View file @
24437f2d
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment