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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
KennethVanhoey
CGoGN
Commits
fa14c26f
Commit
fa14c26f
authored
Mar 11, 2013
by
Sylvain Thery
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update QGLViewer usage in simple application
parent
2c6c911f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
8 deletions
+13
-8
include/Utils/Qt/qtQGLV.h
include/Utils/Qt/qtQGLV.h
+5
-2
include/Utils/Qt/qtQGLV_glw.h
include/Utils/Qt/qtQGLV_glw.h
+1
-0
src/Utils/Qt/qtQGLV_glw.cpp
src/Utils/Qt/qtQGLV_glw.cpp
+7
-6
No files found.
include/Utils/Qt/qtQGLV.h
View file @
fa14c26f
...
@@ -195,14 +195,17 @@ public:
...
@@ -195,14 +195,17 @@ public:
*/
*/
void
setParamObject
(
float
width
,
float
*
pos
)
{
m_qglWidget
->
setParamObject
(
width
,
pos
);
}
void
setParamObject
(
float
width
,
float
*
pos
)
{
m_qglWidget
->
setParamObject
(
width
,
pos
);
}
/**
* set BB min & max corner of object to draw
*/
void
setObjectBB
(
float
*
bbmin
,
float
*
bbmax
)
{
m_qglWidget
->
setObjectBB
(
bbmin
,
bbmax
);
}
/**
/**
* @brief get pointer on QGLViewer widget for direct access
* @brief get pointer on QGLViewer widget for direct access
* @return
* @return
*/
*/
QGLViewer
*
getQGLWidget
()
{
return
static_cast
<
QGLViewer
*>
(
m_qglWidget
);
}
QGLViewer
*
getQGLWidget
()
{
return
static_cast
<
QGLViewer
*>
(
m_qglWidget
);
}
// void resetCenterOfRotation(float width, float* pos) { m_qglWidget->resetCenterOfRotation(width, pos); }
/**
/**
* make the contex of glWidget current
* make the contex of glWidget current
*/
*/
...
...
include/Utils/Qt/qtQGLV_glw.h
View file @
fa14c26f
...
@@ -65,6 +65,7 @@ public:
...
@@ -65,6 +65,7 @@ public:
QGLView
(
SimpleQGLV
*
ptr
,
QWidget
*
parent
=
0
);
QGLView
(
SimpleQGLV
*
ptr
,
QWidget
*
parent
=
0
);
~
QGLView
();
~
QGLView
();
void
setObjectBB
(
float
*
bbmin
,
float
*
bbmax
);
void
setParamObject
(
float
width
,
float
*
pos
);
void
setParamObject
(
float
width
,
float
*
pos
);
void
glMousePosition
(
int
&
x
,
int
&
y
);
void
glMousePosition
(
int
&
x
,
int
&
y
);
...
...
src/Utils/Qt/qtQGLV_glw.cpp
View file @
fa14c26f
...
@@ -57,8 +57,14 @@ void QGLView::setParamObject(float width, float* pos)
...
@@ -57,8 +57,14 @@ void QGLView::setParamObject(float width, float* pos)
qglviewer
::
Vec
bbMax
(
pos
[
0
]
+
width
/
2.0
f
,
pos
[
1
]
+
width
/
2.0
f
,
pos
[
2
]
+
width
/
2.0
f
);
qglviewer
::
Vec
bbMax
(
pos
[
0
]
+
width
/
2.0
f
,
pos
[
1
]
+
width
/
2.0
f
,
pos
[
2
]
+
width
/
2.0
f
);
camera
()
->
setSceneBoundingBox
(
bbMin
,
bbMax
);
camera
()
->
setSceneBoundingBox
(
bbMin
,
bbMax
);
camera
()
->
showEntireScene
();
camera
()
->
showEntireScene
();
}
std
::
cout
<<
"w p = "
<<
width
<<
" / "
<<
pos
[
0
]
<<
" , "
<<
pos
[
1
]
<<
" , "
<<
pos
[
2
]
<<
std
::
endl
;
void
QGLView
::
setObjectBB
(
float
*
bbmin
,
float
*
bbmax
)
{
qglviewer
::
Vec
bbMin
(
bbmin
[
0
],
bbmin
[
1
],
bbmin
[
2
]);
qglviewer
::
Vec
bbMax
(
bbmax
[
0
],
bbmax
[
1
],
bbmax
[
2
]);
camera
()
->
setSceneBoundingBox
(
bbMin
,
bbMax
);
camera
()
->
showEntireScene
();
}
}
QSize
QGLView
::
minimumSizeHint
()
const
QSize
QGLView
::
minimumSizeHint
()
const
...
@@ -76,11 +82,6 @@ void QGLView::init()
...
@@ -76,11 +82,6 @@ void QGLView::init()
glewInit
();
glewInit
();
if
(
m_sqgl
)
if
(
m_sqgl
)
m_sqgl
->
cb_initGL
();
m_sqgl
->
cb_initGL
();
qglviewer
::
Vec
bbMin
(
0.0
,
0.0
,
0.0
);
qglviewer
::
Vec
bbMax
(
2.0
,
2.0
,
2.0
);
camera
()
->
setSceneBoundingBox
(
bbMin
,
bbMax
);
camera
()
->
showEntireScene
();
}
}
void
QGLView
::
preDraw
()
void
QGLView
::
preDraw
()
...
...
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