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
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
David Cazier
CGoGN
Commits
7693a255
Commit
7693a255
authored
Jul 10, 2015
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add color choice of BB (python only)
parent
c9c01aed
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
3 deletions
+62
-3
.gitignore
.gitignore
+2
-1
SCHNApps/include/mapHandler.h
SCHNApps/include/mapHandler.h
+7
-0
SCHNApps/include/mapHandler.hpp
SCHNApps/include/mapHandler.hpp
+1
-1
SCHNApps/include/schnapps.h
SCHNApps/include/schnapps.h
+20
-1
SCHNApps/src/mapHandler.cpp
SCHNApps/src/mapHandler.cpp
+11
-0
SCHNApps/src/schnapps.cpp
SCHNApps/src/schnapps.cpp
+21
-0
No files found.
.gitignore
View file @
7693a255
...
...
@@ -2,4 +2,5 @@
CMakeLists.txt.user
bin/
ThirdParty/bin/
SCHNApps/bin
\ No newline at end of file
SCHNApps/bin/
windows_dependencies/
SCHNApps/include/mapHandler.h
View file @
7693a255
...
...
@@ -106,6 +106,12 @@ public slots:
*/
bool
isBBshown
()
const
;
/**
* @brief [PYTHON] set color for drawing BB the bounding-box
* @param color color name (red,green,...) or color format #rrggbb
*/
void
setBBColor
(
const
QString
&
color
);
/**
* @brief [PYTHON] choose the vertex attribute used to compute the bounding-box
* @param name name of attribute
...
...
@@ -385,6 +391,7 @@ protected:
AttributeMultiVectorGen
*
m_bbVertexAttribute
;
float
m_bbDiagSize
;
Utils
::
Drawer
*
m_bbDrawer
;
glm
::
vec3
m_bbColor
;
Algo
::
Render
::
GL2
::
MapRender
*
m_render
;
Algo
::
Render
::
GL2
::
TopoRender
*
m_topoRender
;
...
...
SCHNApps/include/mapHandler.hpp
View file @
7693a255
...
...
@@ -157,7 +157,7 @@ void MapHandler<PFP>::updateBBDrawer()
bbmax
+=
Geom
::
Vec3f
(
shift
,
shift
,
shift
);
m_bbDrawer
->
newList
(
GL_COMPILE
);
m_bbDrawer
->
color3f
(
0.0
f
,
1.0
f
,
0.0
f
);
m_bbDrawer
->
color3f
(
m_bbColor
[
0
],
m_bbColor
[
1
],
m_bbColor
[
2
]
);
m_bbDrawer
->
lineWidth
(
2.0
f
);
// m_bbDrawer->lineWidth(shift);
m_bbDrawer
->
begin
(
GL_LINE_LOOP
);
...
...
SCHNApps/include/schnapps.h
View file @
7693a255
...
...
@@ -316,10 +316,29 @@ public slots:
void
showHidePluginDock
();
void
showHidePythonDock
();
/**
* @brief [PYTHON] set if control dock is floating or docked
* @param 1: floating / 0: docked
*/
void
setFloatingControlDock
(
bool
f
);
/**
* @brief [PYTHON] set if plugin dock is floating or docked
* @param 1: floating / 0: docked
*/
void
setFloatingPluginDock
(
bool
f
);
/**
* @brief [PYTHON] set if python dock is floating or docked
* @param 1: floating / 0: docked
*/
void
setFloatingPythonDock
(
bool
f
);
/**
* @brief [PYTHON] Load a python script store in a file.
* @param fileName the filename with absolute path or relative to path set with setPythonPath
*
#
return true if reading file ok
*
@
return true if reading file ok
*/
bool
loadPythonScriptFromFile
(
const
QString
&
fileName
);
...
...
SCHNApps/src/mapHandler.cpp
View file @
7693a255
...
...
@@ -16,6 +16,7 @@ MapHandlerGen::MapHandlerGen(const QString& name, SCHNApps* s, GenericMap* map)
m_transfoMatrixInv
(
1.0
f
),
m_bbVertexAttribute
(
NULL
),
m_bbDrawer
(
NULL
),
m_bbColor
(
0
,
1
,
0
),
m_render
(
NULL
),
m_topoRender
(
NULL
)
{
...
...
@@ -108,6 +109,16 @@ bool MapHandlerGen::isBBshown() const
return
m_showBB
;
}
void
MapHandlerGen
::
setBBColor
(
const
QString
&
color
)
{
QColor
col
(
color
);
m_bbColor
[
0
]
=
col
.
redF
();
m_bbColor
[
1
]
=
col
.
greenF
();
m_bbColor
[
2
]
=
col
.
blueF
();
updateBB
();
}
void
MapHandlerGen
::
setBBVertexAttribute
(
const
QString
&
name
)
{
m_bbVertexAttribute
=
m_map
->
getAttributeVectorGen
(
VERTEX
,
name
.
toStdString
());
...
...
SCHNApps/src/schnapps.cpp
View file @
7693a255
...
...
@@ -1000,6 +1000,22 @@ void SCHNApps::showHidePythonDock()
}
void
SCHNApps
::
setFloatingControlDock
(
bool
f
)
{
m_controlDock
->
setFloating
(
f
);
}
void
SCHNApps
::
setFloatingPluginDock
(
bool
f
)
{
m_pluginDock
->
setFloating
(
f
);
}
void
SCHNApps
::
setFloatingPythonDock
(
bool
f
)
{
if
(
m_pythonDock
->
isVisible
())
m_pythonDock
->
setFloating
(
f
);
}
void
SCHNApps
::
execPythonCmd
(
const
QString
&
cmd
)
{
...
...
@@ -1090,6 +1106,11 @@ void SCHNApps::pyRecording()
//windows
out
<<
"schnapps.setWindowSize("
<<
this
->
width
()
<<
", "
<<
this
->
height
()
<<
")"
<<
endl
;
// docks
out
<<
"schnapps.setFloatingControlDock("
<<
m_controlDock
->
isFloating
()
<<
")"
<<
endl
;
out
<<
"schnapps.setFloatingPluginDock("
<<
m_pluginDock
->
isFloating
()
<<
")"
<<
endl
;
out
<<
"schnapps.setFloatingPythonDock("
<<
m_pythonDock
->
isFloating
()
<<
")"
<<
endl
;
m_pyRecFile
->
close
();
delete
m_pyRecording
;
...
...
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