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
5902cf43
Commit
5902cf43
authored
May 28, 2013
by
Sebastian Eichelbaum
Browse files
[FIX] index-out-of-bounds issue when calculating a WDataSetPoint's bbox.
parent
96a15da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/core/dataHandler/WDataSetPoints.cpp
src/core/dataHandler/WDataSetPoints.cpp
+7
-7
No files found.
src/core/dataHandler/WDataSetPoints.cpp
View file @
5902cf43
...
...
@@ -103,14 +103,14 @@ void WDataSetPoints::init( bool calcBB )
float
maxZ
=
minZ
;
// go through each point
for
(
size_t
pointIdx
=
1
;
pointIdx
<
m_vertices
->
size
();
++
pointIdx
)
for
(
size_t
pointIdx
=
3
;
pointIdx
<
m_vertices
->
size
();
pointIdx
+=
3
)
{
minX
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
*
3
+
0
),
minX
);
minY
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
*
3
+
1
),
minY
);
minZ
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
*
3
+
2
),
minZ
);
maxX
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
*
3
+
0
),
maxX
);
maxY
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
*
3
+
1
),
maxY
);
maxZ
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
*
3
+
2
),
maxZ
);
minX
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
+
0
),
minX
);
minY
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
+
1
),
minY
);
minZ
=
std
::
min
(
m_vertices
->
operator
[](
pointIdx
+
2
),
minZ
);
maxX
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
+
0
),
maxX
);
maxY
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
+
1
),
maxY
);
maxZ
=
std
::
max
(
m_vertices
->
operator
[](
pointIdx
+
2
),
maxZ
);
}
m_bb
=
WBoundingBox
(
minX
,
minY
,
minZ
,
maxX
,
maxY
,
maxZ
);
...
...
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