Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
02874e6b
Commit
02874e6b
authored
Apr 09, 2013
by
Alexander Wiebel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX
#273
] WTransparentLinesDrawable compiles again
parent
a4d6ca68
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
src/modules/sliceContext/WTransparentLinesDrawable.cpp
src/modules/sliceContext/WTransparentLinesDrawable.cpp
+5
-3
No files found.
src/modules/sliceContext/WTransparentLinesDrawable.cpp
View file @
02874e6b
...
...
@@ -34,7 +34,9 @@ namespace
{
double
depth
(
osg
::
Vec3f
pos
,
WPosition
viewDir
)
{
return
(
pos
-
WPosition
()
)
*
viewDir
;
WVector3d
tmp
=
pos
-
WPosition
();
double
result
=
dot
(
tmp
,
viewDir
);
return
result
;
}
class
MySorting
...
...
@@ -52,8 +54,8 @@ void WTransparentLinesDrawable::drawImplementation( osg::RenderInfo &renderInfo
boost
::
shared_ptr
<
WGraphicsEngine
>
ge
=
WGraphicsEngine
::
getGraphicsEngine
();
boost
::
shared_ptr
<
WGEViewer
>
viewer
;
//!< Stores reference to the main viewer
viewer
=
ge
->
getViewerByName
(
"Main View"
);
WPosition
endPos
=
WPosition
(
wge
::
unprojectFromScreen
(
WPosition
(
0.0
,
0.0
,
1.0
),
viewer
->
getCamera
()
)
);
WPosition
startPos
=
WPosition
(
wge
::
unprojectFromScreen
(
WPosition
(),
viewer
->
getCamera
()
)
);
WPosition
endPos
=
WPosition
(
wge
::
unprojectFromScreen
(
osg
::
Vec3
(
0.0
,
0.0
,
1.0
),
viewer
->
getCamera
()
)
);
WPosition
startPos
=
WPosition
(
wge
::
unprojectFromScreen
(
osg
::
Vec3
(),
viewer
->
getCamera
()
)
);
WPosition
viewDir
=
normalize
(
endPos
-
startPos
);
std
::
vector
<
std
::
pair
<
double
,
size_t
>
>
depthVals
(
_vertexData
.
array
->
getNumElements
()
);
...
...
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