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
9f583203
Commit
9f583203
authored
Jul 21, 2017
by
Alexander Wiebel
Browse files
[FIX] make it work with point set distributed in two dimensions too.
parent
6881e386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
src/modules/gridRenderer/WMGridRenderer.cpp
src/modules/gridRenderer/WMGridRenderer.cpp
+4
-1
No files found.
src/modules/gridRenderer/WMGridRenderer.cpp
View file @
9f583203
...
...
@@ -155,7 +155,10 @@ void WMGridRenderer::moduleMain()
WBoundingBox
bb
=
dsPoints
->
getBoundingBox
();
// this basically is a fake but we need a grid for WGEGridNode. So we construct one using the BBox
WGridTransformOrtho
gridTransform
(
bb
.
xMax
()
-
bb
.
xMin
(),
bb
.
yMax
()
-
bb
.
yMin
(),
bb
.
zMax
()
-
bb
.
zMin
()
);
const
double
makeFakeNonZero
=
0.000001
;
WGridTransformOrtho
gridTransform
(
bb
.
xMax
()
-
bb
.
xMin
()
+
makeFakeNonZero
,
bb
.
yMax
()
-
bb
.
yMin
()
+
makeFakeNonZero
,
bb
.
zMax
()
-
bb
.
zMin
()
+
makeFakeNonZero
);
gridTransform
.
translate
(
WVector3d
(
bb
.
xMin
(),
bb
.
yMin
(),
bb
.
zMin
()
)
);
regGrid
=
WGridRegular3D
::
SPtr
(
new
WGridRegular3D
(
2
,
2
,
2
,
gridTransform
)
);
}
...
...
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