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
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
5aec16c4
Commit
5aec16c4
authored
Mar 11, 2011
by
Sebastian Eichelbaum
Browse files
[STYLE]
parent
7848ea58
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
src/modules/colormapper/WMColormapper.cpp
src/modules/colormapper/WMColormapper.cpp
+5
-2
No files found.
src/modules/colormapper/WMColormapper.cpp
View file @
5aec16c4
...
...
@@ -132,7 +132,9 @@ void WMColormapper::moduleMain()
// add a colorbar
if
(
dataSet
&&
dataSet
->
isTexture
()
)
{
// TODO(ebaum): this is not the best possible solution. Actually, its a hack. A nice solution would be some more abstract "widget" system
// TODO(ebaum): this is not the best possible solution. Actually, its a hack.
// A nice solution would be some more abstract "widget" system
// create camera oriented 2d projection
m_barProjection
=
new
osg
::
Projection
();
m_barProjection
->
addUpdateCallback
(
new
WGENodeMaskCallback
(
m_showColorbar
)
);
...
...
@@ -149,7 +151,8 @@ void WMColormapper::moduleMain()
osg
::
ref_ptr
<
osg
::
Geode
>
colorBarBorder
=
wge
::
genFinitePlane
(
osg
::
Vec3
(
0.025
-
borderWidth
,
0.1
-
borderWidth
,
0.0
),
osg
::
Vec3
(
0.025
+
2.0
*
borderWidth
,
0.0
,
0.0
),
osg
::
Vec3
(
0.0
,
0.8
+
2.0
*
borderWidth
,
0.0
)
);
m_colorBar
->
getOrCreateStateSet
()
->
addUniform
(
new
WGEPropertyUniform
<
WPropSelection
>
(
"u_colormap"
,
dataSet
->
getTexture2
()
->
colormap
()
)
);
m_colorBar
->
getOrCreateStateSet
()
->
addUniform
(
new
WGEPropertyUniform
<
WPropSelection
>
(
"u_colormap"
,
dataSet
->
getTexture2
()
->
colormap
()
)
);
colormapShader
->
apply
(
m_colorBar
);
// add the label scale
...
...
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