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
fde09285
Commit
fde09285
authored
Feb 19, 2010
by
Mathias Goldau
Browse files
[CHANGE] making the active flag work again in fiberdisplay module
parent
b215ac1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
13 deletions
+20
-13
src/modules/fiberDisplay/WMFiberDisplay.cpp
src/modules/fiberDisplay/WMFiberDisplay.cpp
+13
-13
src/modules/fiberDisplay/WMFiberDisplay.h
src/modules/fiberDisplay/WMFiberDisplay.h
+7
-0
No files found.
src/modules/fiberDisplay/WMFiberDisplay.cpp
View file @
fde09285
...
...
@@ -161,11 +161,22 @@ void WMFiberDisplay::connectors()
WModule
::
connectors
();
// call WModules initialization
}
void
WMFiberDisplay
::
activate
()
{
if
(
m_active
->
get
()
)
{
m_osgNode
->
setNodeMask
(
0xFFFFFFFF
);
}
else
{
m_osgNode
->
setNodeMask
(
0x0
);
}
}
void
WMFiberDisplay
::
properties
()
{
m_properties
->
addString
(
"Fibers Display Module"
,
"Display fibers"
);
// this bool is hidden
m_properties
->
addBool
(
"active"
,
true
,
true
)
->
connect
(
boost
::
bind
(
&
WMFiberDisplay
::
slotPropertyChanged
,
this
,
_1
)
);
m_properties
->
addBool
(
"Local Color"
,
false
)
->
connect
(
boost
::
bind
(
&
WMFiberDisplay
::
slotPropertyChanged
,
this
,
_1
)
);
m_properties
->
addBool
(
"Use Tubes"
,
false
)
->
connect
(
boost
::
bind
(
&
WMFiberDisplay
::
slotPropertyChanged
,
this
,
_1
)
);
}
...
...
@@ -191,18 +202,7 @@ void WMFiberDisplay::toggleTubes()
void
WMFiberDisplay
::
slotPropertyChanged
(
std
::
string
propertyName
)
{
if
(
propertyName
==
"active"
)
{
if
(
m_properties
->
getValue
<
bool
>
(
propertyName
)
)
{
m_osgNode
->
setNodeMask
(
0xFFFFFFFF
);
}
else
{
m_osgNode
->
setNodeMask
(
0x0
);
}
}
else
if
(
propertyName
==
"Local Color"
)
if
(
propertyName
==
"Local Color"
)
{
updateColoring
();
}
...
...
src/modules/fiberDisplay/WMFiberDisplay.h
View file @
fde09285
...
...
@@ -89,6 +89,11 @@ public:
protected:
/**
* Callback for m_active. Overwrite this in your modules to handle m_active changes separately.
*/
virtual
void
activate
();
/**
* Entry point after loading the module. Runs in separate thread.
*/
virtual
void
moduleMain
();
...
...
@@ -119,6 +124,8 @@ protected:
*/
void
updateColoring
();
WPropBool
m_localColor
;
private:
/**
* Input connector for a fiber dataset.
...
...
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