25 #ifndef WMSPLINESURFACE_H
26 #define WMSPLINESURFACE_H
35 #include <osg/Uniform>
37 #include "core/dataHandler/WDataSetScalar.h"
38 #include "core/dataHandler/WGridRegular3D.h"
39 #include "core/dataHandler/datastructures/WFiberCluster.h"
40 #include "core/graphicsEngine/WGEGroupNode.h"
41 #include "core/graphicsEngine/WTriangleMesh.h"
42 #include "core/graphicsEngine/shaders/WGEShader.h"
43 #include "core/kernel/WModule.h"
44 #include "core/kernel/WModuleInputData.h"
45 #include "core/kernel/WModuleOutputData.h"
69 virtual const std::string
getName()
const;
83 virtual std::shared_ptr< WModule >
factory()
const;
137 std::shared_ptr< WModuleInputData< const WFiberCluster > >
m_input;
138 std::shared_ptr< WModuleOutputData< WTriangleMesh > >
m_output;
164 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
181 traverse( node, nv );
Adapter object for realizing callbacks of the node representing the isosurface in the osg.
WMSplineSurface * m_module
Pointer to the module to which the function that is called belongs to.
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
Function that is called by the osg and that call the function in the module.
SplineSurfaceNodeCallback(WMSplineSurface *module)
Constructor of the callback adapter.
Module implementing the marching cubes algorithm with consistent triangulation for data given on regu...
virtual const char ** getXPMIcon() const
Get the icon for this module in XPM format.
WPropBool m_useTextureProp
Property indicating whether to use texturing with scalar data sets.
osg::ref_ptr< osg::Geode > m_surfaceGeode
Pointer to geode containing the surface.
WPropColor m_surfaceColor
Property determining the color for the surface if no textures are displayed.
virtual const std::string getName() const
Gives back the name of this module.
void updateGraphics()
updates textures and shader parameters
virtual void moduleMain()
Entry point after loading the module.
bool save() const
Store the mesh in legacy vtk file format.
osg::ref_ptr< WGEGroupNode > m_moduleNode
Pointer to the modules group node. We need it to be able to update it when callback is invoked.
virtual void properties()
Initialize the properties for this module.
virtual const std::string getDescription() const
Gives back a description of this module.
~WMSplineSurface()
Destructor.
WMSplineSurface()
Standard constructor.
WPropInt m_opacityProp
Property holding the opacity valueassigned to the surface.
std::shared_ptr< WTriangleMesh > m_triMesh
This triangle mesh is provided as output through the connector.
virtual void connectors()
Initialize the connectors this module is using.
std::shared_ptr< WModuleOutputData< WTriangleMesh > > m_output
Input connector required by this module.
WPropGroup m_savePropGroup
Property group containing properties needed for saving the mesh.
void renderMesh()
Prepares and commits everything for rendering with the OSG.
WPropFilename m_meshFile
The mesh will be written to this file.
std::shared_ptr< WModuleInputData< const WFiberCluster > > m_input
Input connector for a fiber cluster.
WPropTrigger m_saveTriggerProp
This property triggers the actual writing,.
std::shared_ptr< WCondition > m_recompute
This condition denotes whether we need to recompute the surface.
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...
Class representing a single module of OpenWalnut.