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
86394df2
Commit
86394df2
authored
Feb 22, 2013
by
Sebastian Eichelbaum
Browse files
[FIX
#252
] changed nodemask in the pick handler to avoid very slow picking of the tube-mode quads
parent
5b2eeb73
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
src/core/graphicsEngine/WPickHandler.cpp
src/core/graphicsEngine/WPickHandler.cpp
+1
-1
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+6
-3
No files found.
src/core/graphicsEngine/WPickHandler.cpp
View file @
86394df2
...
...
@@ -242,7 +242,7 @@ void WPickHandler::pick( osgViewer::View* view, const osgGA::GUIEventAdapter& ea
return
;
}
bool
intersetionsExist
=
view
->
computeIntersections
(
x
,
y
,
intersections
);
bool
intersetionsExist
=
view
->
computeIntersections
(
x
,
y
,
intersections
,
0xFFFFFFF0
);
// if something is picked, get the right thing from the list, because it might be hidden.
bool
startPickIsStillInList
=
false
;
...
...
src/modules/fiberDisplay/WMFiberDisplay.cpp
View file @
86394df2
...
...
@@ -389,8 +389,13 @@ void WMFiberDisplay::moduleMain()
// create the fiber geode
osg
::
ref_ptr
<
osg
::
Geode
>
geode
=
new
osg
::
Geode
();
osg
::
ref_ptr
<
osg
::
Geode
>
endCapGeode
=
new
osg
::
Geode
();
// this avoids that the pick handler tries to pick in millions if lines and quads
geode
->
setName
(
"_Line Geode"
);
endCapGeode
->
setName
(
"_Tube Cap Geode"
);
geode
->
setNodeMask
(
0x0000000F
);
endCapGeode
->
setNodeMask
(
0x0000000F
);
createFiberGeode
(
fibers
,
geode
,
endCapGeode
);
// Apply the shader. This is for clipping.
...
...
@@ -721,8 +726,6 @@ void WMFiberDisplay::createFiberGeode( boost::shared_ptr< WDataSetFibers > fiber
void
WMFiberDisplay
::
geometryUpdate
(
osg
::
Drawable
*
geometry
)
{
osg
::
Geometry
*
g
=
static_cast
<
osg
::
Geometry
*
>
(
geometry
);
if
(
m_fiberSelectorChanged
)
{
m_fiberSelectorChanged
=
false
;
...
...
@@ -765,7 +768,7 @@ void WMFiberDisplay::geometryUpdate( osg::Drawable* geometry )
);
}
}
g
->
setSecondaryColorArray
(
attribs
);
static_cast
<
osg
::
Geometry
*
>
(
geometry
)
->
setSecondaryColorArray
(
attribs
);
}
}
...
...
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