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
d5e83352
Commit
d5e83352
authored
Sep 06, 2021
by
Alexander Wiebel
Browse files
Merge branch '532-sapt-threshold-angle'
parents
13dca83d
c06b771f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
src/modules/pointConnector/WMPointConnector.cpp
src/modules/pointConnector/WMPointConnector.cpp
+4
-2
No files found.
src/modules/pointConnector/WMPointConnector.cpp
View file @
d5e83352
...
...
@@ -92,7 +92,7 @@ void WMPointConnector::properties()
m_enableSAPT
=
assistanceGroup
->
addProperty
(
"Enable SAPT "
,
"Enable Semi-Automatic-Proton-Tracking"
,
true
);
m_enableAdaptiveVisibility
=
assistanceGroup
->
addProperty
(
"Enable adaptive visibility"
,
"Enable adaptive visibility using a cone"
,
true
,
boost
::
bind
(
&
WMPointConnector
::
updatePoints
,
this
)
);
m_adaptiveVisibilityAngle
=
assistanceGroup
->
addProperty
(
"Adaptive visibility angle"
,
"Adaptive visibility angle"
,
45
.0
,
m_adaptiveVisibilityAngle
=
assistanceGroup
->
addProperty
(
"Adaptive visibility angle"
,
"Adaptive visibility angle"
,
10
.0
,
boost
::
bind
(
&
WMPointConnector
::
updatePoints
,
this
)
);
m_adaptiveVisibilityAngle
->
setMin
(
0.0
);
m_adaptiveVisibilityAngle
->
setMax
(
90.0
);
...
...
@@ -324,7 +324,9 @@ bool WMPointConnector::isAdaptivelyHidden( osg::Vec3 vertex )
double
angle
=
WAngleHelper
::
calculateAngle
(
selected
-
before
,
vertex
-
selected
);
double
checkAngle
=
m_adaptiveVisibilityAngle
->
get
();
double
layerDiff
=
abs
(
selected
.
z
()
-
vertex
.
z
()
)
/
5.5
;
// 5.5 is the general layer thickness
double
checkAngle
=
m_adaptiveVisibilityAngle
->
get
()
*
layerDiff
;
return
angle
>
checkAngle
&&
angle
<
(
180.0
-
checkAngle
);
}
...
...
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