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
677374d3
Commit
677374d3
authored
Aug 05, 2010
by
skiunke
Browse files
[Style] again
parent
1941b4ce
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
345 additions
and
385 deletions
+345
-385
src/modules/coordinateHUD/WMCoordinateHUD.cpp
src/modules/coordinateHUD/WMCoordinateHUD.cpp
+217
-250
src/modules/coordinateHUD/WMCoordinateHUD.h
src/modules/coordinateHUD/WMCoordinateHUD.h
+128
-135
No files found.
src/modules/coordinateHUD/WMCoordinateHUD.cpp
View file @
677374d3
This diff is collapsed.
Click to expand it.
src/modules/coordinateHUD/WMCoordinateHUD.h
View file @
677374d3
...
...
@@ -41,144 +41,137 @@
#include "../../kernel/WModuleOutputData.h"
/**
* This module is intended to be a simple template and example module. It can be used for fast creation of new modules by copying and refactoring
* the files. It shows the basic usage of properties, update callbacks and how to wait for data.
*
* \ingroup modules
* This module shows a coordinatesystem as HUD.
* The attenuation can be customized to users needs.
*/
class
WMCoordinateHUD
:
public
WModule
,
public
osg
::
Referenced
{
public:
/**
* Default constructor.
*/
WMCoordinateHUD
();
/**
* Destructor.
*/
virtual
~
WMCoordinateHUD
();
/**
* Gives back the name of this module.
* \return the module's name.
*/
virtual
const
std
::
string
getName
()
const
;
/**
* Gives back a description of this module.
* \return description to module.
*/
virtual
const
std
::
string
getDescription
()
const
;
/**
* Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
* should never be initialized or modified in some other way. A simple new instance is required.
*
* \return the prototype used to create every module in OpenWalnut.
*/
virtual
boost
::
shared_ptr
<
WModule
>
factory
()
const
;
/**
* Get the icon for this module in XPM format.
*/
virtual
const
char
**
getXPMIcon
()
const
;
protected:
/**
* Entry point after loading the module. Runs in separate thread.
*/
virtual
void
moduleMain
();
/**
* Initialize the connectors this module is using.
*/
virtual
void
connectors
();
/**
* Initialize the properties for this module.
*/
virtual
void
properties
();
/**
* Build the geode for colorfull coordinate axis
*/
virtual
void
buildColorAxis
();
/**
* build the geode for black & white coordinate axis
*/
virtual
void
buildBWAxis
();
/**
* build the geode for black & white coordinate cube
*/
virtual
void
buildColorCube
();
/**
* build the geode for black & white coordinate cube
*/
virtual
void
buildBWCube
();
/**
* build the geometry of the cube
*/
virtual
osg
::
Vec3Array
*
buildCubeVertices
();
/**
* build the geometry of the axis
*/
virtual
osg
::
Vec3Array
*
buildAxisVertices
();
/**
* create caption for medical plane
*/
virtual
void
buildCaption
();
/**
* The root node used for this modules graphics. For OSG nodes, always use osg::ref_ptr to ensure proper resource management.
*/
osg
::
ref_ptr
<
WGEManagedGroupNode
>
m_rootNode
;
/**
* The geometry rendered by this module.
*/
osg
::
ref_ptr
<
osg
::
Geode
>
m_geode
;
/**
* The geometry rendered by this module.
*/
osg
::
ref_ptr
<
osg
::
Geode
>
m_txtGeode
;
private:
/**
* the shader
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
/**
* the shader
*/
osg
::
ref_ptr
<
WShader
>
m_txtShader
;
/**
* A condition used to notify about changes in several properties.
*/
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
/**
* A property allowing the user to select ONE item of some list
*/
WPropSelection
m_aSingleSelection
;
/**
* A list of items that can be selected using m_aSingleSelection or m_aMultiSelection.
*/
boost
::
shared_ptr
<
WItemSelection
>
m_possibleSelections
;
public:
/**
* Default constructor.
*/
WMCoordinateHUD
();
/**
* Destructor.
*/
virtual
~
WMCoordinateHUD
();
/**
* Gives back the name of this module.
* \return the module's name.
*/
virtual
const
std
::
string
getName
()
const
;
/**
* Gives back a description of this module.
* \return description to module.
*/
virtual
const
std
::
string
getDescription
()
const
;
/**
* Due to the prototype design pattern used to build modules, this method returns a new instance of this method. NOTE: it
* should never be initialized or modified in some other way. A simple new instance is required.
*
* \return the prototype used to create every module in OpenWalnut.
*/
virtual
boost
::
shared_ptr
<
WModule
>
factory
()
const
;
/**
* Get the icon for this module in XPM format.
*/
virtual
const
char
**
getXPMIcon
()
const
;
protected:
/**
* Entry point after loading the module. Runs in separate thread.
*/
virtual
void
moduleMain
();
/**
* Initialize the connectors this module is using.
*/
virtual
void
connectors
();
/**
* Initialize the properties for this module.
*/
virtual
void
properties
();
/**
* Build the geode for colorfull coordinate axis
*/
virtual
void
buildColorAxis
();
/**
* build the geode for black & white coordinate axis
*/
virtual
void
buildBWAxis
();
/**
* build the geode for black & white coordinate cube
*/
virtual
void
buildColorCube
();
/**
* build the geode for black & white coordinate cube
*/
virtual
void
buildBWCube
();
/**
* build the geometry of the cube
*/
virtual
osg
::
Vec3Array
*
buildCubeVertices
();
/**
* build the geometry of the axis
*/
virtual
osg
::
Vec3Array
*
buildAxisVertices
();
/**
* create caption for medical plane
*/
virtual
void
buildCaption
();
/**
* The root node used for this modules graphics.
*/
osg
::
ref_ptr
<
WGEManagedGroupNode
>
m_rootNode
;
/**
* The geometry rendered by this module.
*/
osg
::
ref_ptr
<
osg
::
Geode
>
m_geode
;
/**
* The caption rendered by this module.
*/
osg
::
ref_ptr
<
osg
::
Geode
>
m_txtGeode
;
private:
/**
* the shader
*/
osg
::
ref_ptr
<
WShader
>
m_shader
;
/**
* A condition used to notify about changes in several properties.
*/
boost
::
shared_ptr
<
WCondition
>
m_propCondition
;
/**
* A property allowing the user to select ONE item of some list
*/
WPropSelection
m_aSingleSelection
;
/**
* A list of items that can be selected using m_aSingleSelection or m_aMultiSelection.
*/
boost
::
shared_ptr
<
WItemSelection
>
m_possibleSelections
;
};
#endif // WMCOORDINATEHUD_H
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