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
57ab8f1a
Commit
57ab8f1a
authored
Sep 20, 2010
by
Alexander Wiebel
Browse files
[FIX] spelling
parent
792bf945
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
src/modules/template/WMTemplate.cpp
src/modules/template/WMTemplate.cpp
+8
-8
No files found.
src/modules/template/WMTemplate.cpp
View file @
57ab8f1a
...
...
@@ -210,7 +210,7 @@ void WMTemplate::properties()
"A property which gets modified if
\"
Number of shape rows
\"
gets modified."
,
10
);
m_aDouble
=
m_properties
->
addProperty
(
"Shape radii"
,
"Shape radii."
,
20.0
,
m_propCondition
);
m_aString
=
m_properties
->
addProperty
(
"A string"
,
"Something."
,
std
::
string
(
"hello"
),
m_propCondition
);
m_aFile
=
m_properties
->
addProperty
(
"A filen
n
ame"
,
"Description."
,
WPathHelper
::
getAppPath
(),
m_propCondition
);
m_aFile
=
m_properties
->
addProperty
(
"A filename"
,
"Description."
,
WPathHelper
::
getAppPath
(),
m_propCondition
);
m_aColor
=
m_properties
->
addProperty
(
"A color"
,
"Description."
,
WColor
(
1.0
,
0.0
,
0.0
,
1.0
)
);
m_aPosition
=
m_properties
->
addProperty
(
"Somewhere"
,
"Description."
,
wmath
::
WPosition
(
0.0
,
0.0
,
0.0
)
);
...
...
@@ -291,7 +291,7 @@ void WMTemplate::properties()
WPropertyHelper
::
PC_NOTEMPTY
::
addTo
(
m_aString
);
// One last thing to mention is the active property. This property is available in all modules and represents the activation state of the
// module. In
t
the GUI this is simply a checkbox beneath the module. The active property should be taken into account in ALL modules.
// module. In the GUI this is simply a checkbox beneath the module. The active property should be taken into account in ALL modules.
// Visualization modules should turn off their graphics. There are basically three ways to react on changes in m_active, which is the member
// variable for this property.
// 1: overwrite WModule::activate() in your module
...
...
@@ -317,7 +317,7 @@ void WMTemplate::properties()
m_aStringOutput
=
m_group1a
->
addProperty
(
"A message"
,
"A message to the user."
,
message
);
m_aStringOutput
->
setPurpose
(
PV_PURPOSE_INFORMATION
);
// This adds the property m_aStringOutput to your group and sets its purpose. The default purpose for all properties is always
// "PV_PURPOSE_PARAMETER". It simply denotes the meaning of the property - its meant to be used as modifier for the module's behavio
u
r; a
// "PV_PURPOSE_PARAMETER". It simply denotes the meaning of the property - its meant to be used as modifier for the module's behavior; a
// parameter.
//
// Some more examples. Please note: Although every property type can be used as information property, not everything is really useful.
...
...
@@ -336,7 +336,7 @@ void WMTemplate::moduleMain()
// properties(). You always can assume the kernel, the GUI, the graphics engine and the data handler to be initialized and ready. Please keep
// in mind, that this method is running in its own thread.
// You can output log messages everywhere and
every
time in your module. The WModule base class therefore provides debugLog, infoLog, warnLog
// You can output log messages everywhere and
any
time in your module. The WModule base class therefore provides debugLog, infoLog, warnLog
// and errorLog. You can use them very similar to the common std::cout streams.
debugLog
()
<<
"Entering moduleMain()"
;
...
...
@@ -354,7 +354,7 @@ void WMTemplate::moduleMain()
// Remember the condition provided to some properties in properties()? The condition can now be used with this condition set.
m_moduleState
.
add
(
m_propCondition
);
// One note about "setResetable": It might happen, that a condition fires and your thread does not currently waits on it. This would mean,
// that your thread misses the event. The resetable flag for those condition sets can help here. Whenever a condition, managed by the
// that your thread misses the event. The reset
t
able flag for those condition sets can help here. Whenever a condition, managed by the
// condition set, fires, the moduleState variable remembers it. So, the next call to m_moduleState.wait() will immediately return and reset
// the "memory" of the moduleState. For more details, see: http://berkeley.informatik.uni-leipzig.de/trac/ow-public/wiki/HowtoWaitCorrectly
...
...
@@ -506,7 +506,7 @@ void WMTemplate::moduleMain()
new
osg
::
ShapeDrawable
(
new
osg
::
Capsule
(
osg
::
Vec3
(
225
,
128
,
i
*
15
),
radii
,
radii
)
)
);
}
// The old root node needs to be removed safely. The OpenSceneGraph traverses the graph at every frame. This travers
ion
is done in a
// The old root node needs to be removed safely. The OpenSceneGraph traverses the graph at every frame. This travers
al
is done in a
// separate thread. Therefore, adding a node directly may cause the OpenSceneGraph to crash. Thats why the Group node (WGEGroupNode)
// offers safe remove and insert methods. Use them to manipulate the scene node.
// First remove the old node:
...
...
@@ -624,7 +624,7 @@ void WMTemplate::moduleMain()
}
}
// At this point, the container managing this module signal
l
ed to shutdown. The main loop has ended and you should clean up:
// At this point, the container managing this module signaled to shutdown. The main loop has ended and you should clean up:
//
// * remove allocated memory
// * remove all OSG nodes
...
...
@@ -674,7 +674,7 @@ void WMTemplate::TranslateCallback::operator()( osg::Node* node, osg::NodeVisito
bool
WMTemplate
::
StringLength
::
accept
(
boost
::
shared_ptr
<
WPropertyVariable
<
WPVBaseTypes
::
PV_STRING
>
>
/* property */
,
WPVBaseTypes
::
PV_STRING
value
)
{
// This method gets called everytime the m_aString property is going to be changed. It can decide whether the new value is valid or not. If
// This method gets called every
time the m_aString property is going to be changed. It can decide whether the new value is valid or not. If
// the method returns true, the new value is set. If it returns false, the value is rejected.
//
// Note: always use WPVBaseTypes when specializing the WPropertyVariable template.
...
...
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