Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
OpenWalnut Core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
44
Issues
44
List
Boards
Labels
Service Desk
Milestones
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
32b502b8
Commit
32b502b8
authored
Oct 03, 2011
by
Alexander Wiebel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[STYLE
#42
] adapt name of module to common use
parent
4cfa4be2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
31 deletions
+26
-31
src/modules/modules-io.toolbox
src/modules/modules-io.toolbox
+1
-1
src/modules/writeGeometry/WMWriteGeometry.cpp
src/modules/writeGeometry/WMWriteGeometry.cpp
+16
-16
src/modules/writeGeometry/WMWriteGeometry.h
src/modules/writeGeometry/WMWriteGeometry.h
+8
-13
src/modules/writeGeometry/WMWriteGeometry.xpm
src/modules/writeGeometry/WMWriteGeometry.xpm
+1
-1
No files found.
src/modules/modules-io.toolbox
View file @
32b502b8
ADD_MODULE( data )
ADD_MODULE( exportGeometry )
ADD_MODULE( readMesh )
ADD_MODULE( readRawData )
ADD_MODULE( writeDendrogram )
ADD_MODULE( writeGeometry )
ADD_MODULE( writeMesh )
ADD_MODULE( writeTracts )
src/modules/
exportGeometry/WMExport
Geometry.cpp
→
src/modules/
writeGeometry/WMWrite
Geometry.cpp
View file @
32b502b8
...
...
@@ -28,47 +28,47 @@
#include "core/common/WPropertyHelper.h"
#include "core/graphicsEngine/WTriangleMesh.h"
#include "core/kernel/WKernel.h"
#include "WM
Export
Geometry.xpm"
#include "WM
Write
Geometry.xpm"
#include "WM
Export
Geometry.h"
#include "WM
Write
Geometry.h"
// This line is needed by the module loader to actually find your module. Do not remove. Do NOT add a ";" here.
W_LOADABLE_MODULE
(
WM
Export
Geometry
)
W_LOADABLE_MODULE
(
WM
Write
Geometry
)
WM
ExportGeometry
::
WMExport
Geometry
()
:
WM
WriteGeometry
::
WMWrite
Geometry
()
:
WModule
()
{
}
WM
ExportGeometry
::~
WMExport
Geometry
()
WM
WriteGeometry
::~
WMWrite
Geometry
()
{
// Cleanup!
}
boost
::
shared_ptr
<
WModule
>
WM
Export
Geometry
::
factory
()
const
boost
::
shared_ptr
<
WModule
>
WM
Write
Geometry
::
factory
()
const
{
// See "src/modules/template/" for an extensively documented example.
return
boost
::
shared_ptr
<
WModule
>
(
new
WM
Export
Geometry
()
);
return
boost
::
shared_ptr
<
WModule
>
(
new
WM
Write
Geometry
()
);
}
const
char
**
WM
Export
Geometry
::
getXPMIcon
()
const
const
char
**
WM
Write
Geometry
::
getXPMIcon
()
const
{
return
WM
Export
Geometry_xpm
;
return
WM
Write
Geometry_xpm
;
}
const
std
::
string
WM
Export
Geometry
::
getName
()
const
const
std
::
string
WM
Write
Geometry
::
getName
()
const
{
// Specify your module name here. This name must be UNIQUE!
return
"
Export
Geometry"
;
return
"
Write
Geometry"
;
}
const
std
::
string
WM
Export
Geometry
::
getDescription
()
const
const
std
::
string
WM
Write
Geometry
::
getDescription
()
const
{
// Specify your module description here. Be detailed. This text is read by the user.
// See "src/modules/template/" for an extensively documented example.
return
"Exports triangle meshes to certain file formats. VRML implemented so far."
;
}
void
WM
Export
Geometry
::
connectors
()
void
WM
Write
Geometry
::
connectors
()
{
m_input
=
boost
::
shared_ptr
<
WModuleInputData
<
WTriangleMesh
>
>
(
new
WModuleInputData
<
WTriangleMesh
>
(
shared_from_this
(),
"Triangle Mesh"
,
"The mesh that will be stored."
)
...
...
@@ -80,7 +80,7 @@ void WMExportGeometry::connectors()
WModule
::
connectors
();
}
void
WM
Export
Geometry
::
properties
()
void
WM
Write
Geometry
::
properties
()
{
m_savePath
=
m_properties
->
addProperty
(
"Save Path"
,
"Where to save the result"
,
boost
::
filesystem
::
path
(
"/tmp/test.wrl"
)
);
WPropertyHelper
::
PC_NOTEMPTY
::
addTo
(
m_savePath
);
...
...
@@ -88,7 +88,7 @@ void WMExportGeometry::properties()
WModule
::
properties
();
}
void
WM
Export
Geometry
::
moduleMain
()
void
WM
Write
Geometry
::
moduleMain
()
{
m_moduleState
.
add
(
m_input
->
getDataChangedCondition
()
);
...
...
@@ -114,7 +114,7 @@ void WMExportGeometry::moduleMain()
}
}
void
WM
Export
Geometry
::
writeFile
()
void
WM
Write
Geometry
::
writeFile
()
{
boost
::
shared_ptr
<
WTriangleMesh
>
mesh
=
m_input
->
getData
();
using
std
::
fstream
;
...
...
src/modules/
exportGeometry/WMExport
Geometry.h
→
src/modules/
writeGeometry/WMWrite
Geometry.h
View file @
32b502b8
...
...
@@ -22,8 +22,8 @@
//
//---------------------------------------------------------------------------
#ifndef WM
EXPORT
GEOMETRY_H
#define WM
EXPORT
GEOMETRY_H
#ifndef WM
WRITE
GEOMETRY_H
#define WM
WRITE
GEOMETRY_H
#include <string>
...
...
@@ -36,29 +36,24 @@
class
WTriangleMesh
;
/**
* Someone should add some documentation here.
* Probably the best person would be the module's
* creator, i.e. "wiebel".
*
* This is only an empty template for a new module. For
* an example module containing many interesting concepts
* and extensive documentation have a look at "src/modules/template"
* This module writes out geomtry, e.g. surfaces to various
* geomtry file formats. At the moment only VRML.
*
* \ingroup modules
*/
class
WM
Export
Geometry
:
public
WModule
class
WM
Write
Geometry
:
public
WModule
{
public:
/**
*
*/
WM
Export
Geometry
();
WM
Write
Geometry
();
/**
*
*/
virtual
~
WM
Export
Geometry
();
virtual
~
WM
Write
Geometry
();
/**
* Gives back the name of this module.
...
...
@@ -118,4 +113,4 @@ private:
WPropFilename
m_savePath
;
//!< Path where geometry should be stored
};
#endif // WM
EXPORT
GEOMETRY_H
#endif // WM
WRITE
GEOMETRY_H
src/modules/
exportGeometry/WMExport
Geometry.xpm
→
src/modules/
writeGeometry/WMWrite
Geometry.xpm
View file @
32b502b8
/* XPM */
static const char * WM
Export
Geometry_xpm[] = {
static const char * WM
Write
Geometry_xpm[] = {
"32 32 27 1",
" c None",
". c #CDCDCD",
...
...
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