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
2bb57a50
Commit
2bb57a50
authored
Aug 19, 2021
by
Robin Eschbach
Browse files
[FIX #521] hit hiding is now relative to the path before the selection
parent
b9bd13dc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
src/modules/pointConnector/WMPointConnector.cpp
src/modules/pointConnector/WMPointConnector.cpp
+8
-6
No files found.
src/modules/pointConnector/WMPointConnector.cpp
View file @
2bb57a50
...
...
@@ -321,13 +321,15 @@ bool WMPointConnector::isAdaptivelyHidden( osg::Vec3 vertex )
}
osg
::
Vec3
selected
=
m_connectorData
->
getVertices
()
->
at
(
verIdx
);
WFiberHandler
::
PCFiber
fiber
=
m_fiberHandler
->
getFibers
()
->
at
(
m_fiberHandler
->
getSelectedFiber
()
);
auto
it
=
std
::
find
(
fiber
.
begin
(),
fiber
.
end
(),
selected
);
osg
::
Vec3
before
=
osg
::
Vec3
(
0.0
,
0.0
,
1.0
);
if
(
it
!=
fiber
.
end
()
&&
it
!=
fiber
.
begin
()
)
{
before
=
*
(
--
it
);
}
double
num
=
vertex
.
z
()
-
selected
.
z
();
double
denom
=
(
vertex
.
x
()
-
selected
.
x
()
)
*
(
vertex
.
x
()
-
selected
.
x
()
)
+
(
vertex
.
y
()
-
selected
.
y
()
)
*
(
vertex
.
y
()
-
selected
.
y
()
)
+
(
vertex
.
z
()
-
selected
.
z
()
)
*
(
vertex
.
z
()
-
selected
.
z
()
);
denom
=
sqrt
(
denom
);
double
angle
=
acos
(
num
/
denom
)
*
180.0
/
M_PI
;
double
angle
=
WAngleHelper
::
calculateAngle
(
selected
-
before
,
vertex
-
selected
);
double
checkAngle
=
m_adaptiveVisibilityAngle
->
get
();
if
(
m_enablePhysicalAngle
->
get
()
)
...
...
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