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
cd8203c4
Commit
cd8203c4
authored
Apr 24, 2013
by
Mathias Goldau
Browse files
[STYLE
#42
]
parent
c3867660
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/core/common/WHistogram2D.cpp
src/core/common/WHistogram2D.cpp
+8
-8
No files found.
src/core/common/WHistogram2D.cpp
View file @
cd8203c4
...
...
@@ -127,14 +127,14 @@ osg::ref_ptr< osg::Texture2D > WHistogram2D::getTexture()
size_t
imageHeight
=
m_buckets
[
1
];
//get max bin for scaling
size_
t
maxCount
=
0
;
for
(
in
t
j
=
0
;
j
<
imageHeight
;
j
++
)
floa
t
maxCount
=
0
;
for
(
size_
t
j
=
0
;
j
<
imageHeight
;
++
j
)
{
for
(
in
t
i
=
0
;
i
<
imageWidth
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
imageWidth
;
++
i
)
{
if
(
m_bins
(
i
,
j
)
>
maxCount
)
if
(
m_bins
(
i
,
j
)
>
maxCount
)
{
maxCount
=
m_bins
(
i
,
j
);
maxCount
=
static_cast
<
float
>
(
m_bins
(
i
,
j
)
);
}
}
}
...
...
@@ -143,11 +143,11 @@ osg::ref_ptr< osg::Texture2D > WHistogram2D::getTexture()
image
->
setInternalTextureFormat
(
GL_RED
);
float
*
data
=
reinterpret_cast
<
float
*
>
(
image
->
data
()
);
for
(
in
t
j
=
0
;
j
<
imageHeight
;
j
++
)
for
(
size_
t
j
=
0
;
j
<
imageHeight
;
++
j
)
{
for
(
in
t
i
=
0
;
i
<
imageWidth
;
i
++
)
for
(
size_
t
i
=
0
;
i
<
imageWidth
;
++
i
)
{
data
[
i
+
j
*
imageWidth
]
=
(
float
)
m_bins
(
i
,
j
)
/
(
float
)
maxCount
;
data
[
i
+
j
*
imageWidth
]
=
static_cast
<
float
>
(
m_bins
(
i
,
j
)
)
/
maxCount
;
}
}
return
new
osg
::
Texture2D
(
image
);
...
...
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