33 #include "core/common/WItemSelection.h"
34 #include "core/common/WItemSelectionItemTyped.h"
35 #include "core/common/WItemSelector.h"
36 #include "core/graphicsEngine/WGEManagedGroupNode.h"
37 #include "core/graphicsEngine/shaders/WGEShader.h"
38 #include "core/kernel/WModule.h"
39 #include "core/kernel/WModuleInputData.h"
40 #include "core/kernel/WModuleOutputData.h"
69 virtual const std::string
getName()
const;
83 virtual std::shared_ptr< WModule >
factory()
const;
131 std::shared_ptr< WModuleInputData< WDataSetSingle > >
m_input;
136 std::shared_ptr< WModuleOutputData< WDataSetSingle > >
m_output;
337 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
376 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
414 virtual std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING >::PropertyConstraint >
clone();
osg::ref_ptr< WGEShader > RefPtr
Convenience typedef for an osg::ref_ptr.
A derivation of WItemSelection which can store a value of any type.
Node callback to change the color of the shapes inside the root node.
SafeUpdateCallback(WMTemplate *module)
Constructor.
bool m_initialUpdate
Denotes whether the update callback is called the first time.
WMTemplate * m_module
Pointer used to access members of the module to modify the node.
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
operator () - called during the update traversal.
This shows how to write custom constraints for your modules.
virtual bool accept(std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING > > property, const WPVBaseTypes::PV_STRING &value)
You need to overwrite this method.
virtual std::shared_ptr< WPropertyVariable< WPVBaseTypes::PV_STRING >::PropertyConstraint > clone()
Method to clone the constraint and create a new one with the correct dynamic type.
Node callback to change the position of the shapes in the coordinate system of the scene.
WMTemplate * m_module
Pointer used to access members of the module to modify the node.
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
operator () - called during the update traversal.
TranslateCallback(WMTemplate *module)
Constructor.
bool m_initialUpdate
Denotes whether the update callback is called the first time.
This module is intended to be a simple template and example module.
WPropColor m_aColor
A color.
osg::ref_ptr< WGEManagedGroupNode > m_rootNode
The root node used for this modules graphics.
WPropPosition m_aPosition
A Property used to store some position.
WPropDouble m_aDouble
A double value.
WPropSelection m_aSingleSelection
A property allowing the user to select ONE item of some list.
WPropSelection m_aSelectionOutput
A Property used to show some selection to the user.
WPropTrigger m_aTriggerOutput
A Property used to show some trigger to the user.
WPropColor m_aColorOutput
A Property used to show some color to the user.
WPropFilename m_aFilenameOutput
A Property used to show some filename to the user.
osg::ref_ptr< osg::Geode > m_geode
The geometry rendered by this module.
WPropInterval m_anInterval
A property allowing you to define whole intervals.
virtual const std::string getDescription() const
Gives back a description of this module.
WPropTrigger m_exceptionTrigger
This causes an exception to be thrown on press to demonstrate how the GUI handles crashing modules.
virtual void requirements()
Initialize requirements for this module.
WPropInt m_aIntOutput
A property simply providing a int value to the outside world.
std::shared_ptr< WItemSelection > m_possibleSelectionsUsingTypes
A list of items that can be selected using m_aSingleSelectionUsingTypes property.
WPropInt m_anInteger
An integer value.
WPropInt m_anIntegerClone
An integer value.
WMTemplate()
Default constructor.
std::shared_ptr< WModuleOutputData< WDataSetSingle > > m_output
The output connector used to provide the calculated data to other modules.
virtual void properties()
Initialize the properties for this module.
WPropTrigger m_hideButton
A Property used to show the callback mechanism avoiding the thread wake up on change.
void hideButtonPressed()
The callback triggering the hide flag of m_aColor for demonstration.
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WPropSelection m_aSingleSelectionUsingTypes
A property allowing the user to select ONE item.
std::shared_ptr< WItemSelection > m_possibleSelections
A list of items that can be selected using m_aSingleSelection or m_aMultiSelection.
WPropDouble m_aDoubleOutput
A property simply providing a double value to the outside world.
WPropBool m_group1Bool
A nice feature trigger inside m_group1.
WPropSelection m_aMultiSelection
A property allowing the user to select multiple elements of a list.
virtual void moduleMain()
Entry point after loading the module.
virtual void activate()
Callback for m_active.
virtual std::shared_ptr< WModule > factory() const
Due to the prototype design pattern used to build modules, this method returns a new instance of this...
WPropGroup m_group1a
To group properties, use WPropGroup.
WPropInt m_aHiddenInt
A int property used to show hide/un-hide feature.
virtual ~WMTemplate()
Destructor.
WPropString m_aStringOutput
A property simply providing some text to the outside world.
virtual const std::string getName() const
Gives back the name of this module.
WPropGroup m_group1
To group properties, use WPropGroup.
WGEShader::RefPtr m_shader
We want some nice shading effects, so we need a nice shader.
WPropGroup m_group2
To group properties, use WPropGroup.
std::shared_ptr< WModuleInputData< WDataSetSingle > > m_input
An input connector used to get datasets from other modules.
WPropInt m_aIntegerOutput
A property simply providing a integer value to the outside world.
WPropFilename m_aFile
A filename.
WPropString m_aString
A string.
WPropTrigger m_aTrigger
A trigger which can be used to trigger some kind of operation.
virtual void connectors()
Initialize the connectors this module is using.
WPropBool m_enableFeature
En/Disables an feature.
std::shared_ptr< WCondition > m_propCondition
A condition used to notify about changes in several properties.
WPropGroup m_aHiddenGroup
A group used to show that even hiding whole groups is possible.
WItemSelectionItemTyped< std::string > MyItemType
You should typedef the item type you use.
Class representing a single module of OpenWalnut.
A named property class with a concrete type.
std::string PV_STRING
base type used for every WPVString