Commit ce556dac authored by Mike Kremer's avatar Mike Kremer

Added screenshots to documentation to outline user interface cvoncepts

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@5409 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 0c5fc5c1
...@@ -63,7 +63,6 @@ class ScriptInterface { ...@@ -63,7 +63,6 @@ class ScriptInterface {
* e.g. selectAllVertices( ObjectId ) * e.g. selectAllVertices( ObjectId )
* *
* @param _functionName the called function * @param _functionName the called function
* @param _exists found or not
*/ */
virtual void scriptInfo( QString /*_functionName*/ ) {}; virtual void scriptInfo( QString /*_functionName*/ ) {};
......
...@@ -153,7 +153,8 @@ EXCLUDE_SYMBOLS = ...@@ -153,7 +153,8 @@ EXCLUDE_SYMBOLS =
EXAMPLE_PATH = ./Doxygen/example/ EXAMPLE_PATH = ./Doxygen/example/
EXAMPLE_PATTERNS = * EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO EXAMPLE_RECURSIVE = NO
IMAGE_PATH = ./Doxygen/pics/ IMAGE_PATH = ./Doxygen/pics/ \
./Doxygen/screenshots/
INPUT_FILTER = INPUT_FILTER =
FILTER_PATTERNS = FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO FILTER_SOURCE_FILES = NO
......
/** \page uiconcept "User Interface Concepts" /** \page uiconcept "User Interface Concepts"
* *
* This page describes the global OpenFlipper user interface concept. * The OpenFlipper user interface is composed of 4 essential widgets
* each accessible and extendable by user plugins:
* *
* -\ref viewport_widget
* -\ref plugin_widget
* -\ref logging_widget
* -\ref tool_bar
*
* \subsection viewport_widget The viewport widget
*
*
*
* \subsection plugin_widget The plugin widget
* \subsection logging_widget The logging widget
* \subsection tool_bar The tool bar
*/ */
...@@ -41,30 +41,30 @@ ...@@ -41,30 +41,30 @@
bool SmootherPlugin::initializeToolbox(QWidget*& _widget) bool SmootherPlugin::initializeToolbox(QWidget*& _widget)
{ {
// Create the Toolbox Widget // Create the Toolbox Widget
QWidget* toolBox = new QWidget(); QWidget* toolBox = new QWidget();
QPushButton* smoothButton = new QPushButton("&Smooth",toolBox); QPushButton* smoothButton = new QPushButton("&Smooth",toolBox);
iterationsSpinbox_ = new QSpinBox(toolBox) ; iterationsSpinbox_ = new QSpinBox(toolBox) ;
iterationsSpinbox_->setMinimum(1); iterationsSpinbox_->setMinimum(1);
iterationsSpinbox_->setMaximum(1000); iterationsSpinbox_->setMaximum(1000);
iterationsSpinbox_->setSingleStep(1); iterationsSpinbox_->setSingleStep(1);
QLabel* label = new QLabel("Iterations:"); QLabel* label = new QLabel("Iterations:");
QGridLayout* layout = new QGridLayout(toolBox); QGridLayout* layout = new QGridLayout(toolBox);
layout->addWidget( label , 0, 0); layout->addWidget( label , 0, 0);
layout->addWidget( smoothButton , 1, 1); layout->addWidget( smoothButton , 1, 1);
layout->addWidget( iterationsSpinbox_, 0, 1); layout->addWidget( iterationsSpinbox_, 0, 1);
layout->addItem(new QSpacerItem(10,10,QSizePolicy::Expanding,QSizePolicy::Expanding),2,0,1,2); layout->addItem(new QSpacerItem(10,10,QSizePolicy::Expanding,QSizePolicy::Expanding),2,0,1,2);
connect( smoothButton, SIGNAL(clicked()), this, SLOT(simpleLaplace()) ); connect( smoothButton, SIGNAL(clicked()), this, SLOT(simpleLaplace()) );
_widget = toolBox; _widget = toolBox;
return true; return true;
} }
/** \brief /** \brief
...@@ -72,12 +72,12 @@ bool SmootherPlugin::initializeToolbox(QWidget*& _widget) ...@@ -72,12 +72,12 @@ bool SmootherPlugin::initializeToolbox(QWidget*& _widget)
*/ */
void SmootherPlugin::simpleLaplace() { void SmootherPlugin::simpleLaplace() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS);
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) { o_it != PluginFunctions::objectsEnd(); ++o_it) {
if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) { if ( o_it->dataType( DATA_TRIANGLE_MESH ) ) {
// Get the mesh to work on // Get the mesh to work on
TriMesh* mesh = PluginFunctions::triMesh(*o_it); TriMesh* mesh = PluginFunctions::triMesh(*o_it);
// Property for the active mesh to store original point positions // Property for the active mesh to store original point positions
...@@ -88,43 +88,44 @@ void SmootherPlugin::simpleLaplace() { ...@@ -88,43 +88,44 @@ void SmootherPlugin::simpleLaplace() {
for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) { for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) {
// Copy original positions to backup ( in Vertex property ) // Copy original positions to backup ( in vertex property )
TriMesh::VertexIter v_it, v_end=mesh->vertices_end(); TriMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) { for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
mesh->property( origPositions, v_it ) = mesh->point(v_it); mesh->property( origPositions, v_it ) = mesh->point(v_it);
} }
// Do one smoothing step (For each point of the mesh ... )
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
TriMesh::Point point = TriMesh::Point(0.0,0.0,0.0); // Do one smoothing step (For each point of the mesh ... )
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
// Flag, to skip boundary vertices TriMesh::Point point = TriMesh::Point(0.0,0.0,0.0);
bool skip = false;
// ( .. for each Outoing halfedge .. ) // Flag, to skip boundary vertices
TriMesh::VertexOHalfedgeIter voh_it(*mesh,v_it); bool skip = false;
for ( ; voh_it; ++voh_it ) {
// .. add the (original) position of the Neighbour ( end of the outgoing halfedge )
point += mesh->property( origPositions, mesh->to_vertex_handle(voh_it) );
// Check if the current Halfedge is a boundary halfedge // ( .. for each outgoing halfedge .. )
// If it is, abort and keep the current vertex position TriMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
if ( mesh->is_boundary( voh_it.handle() ) ) {
skip = true; for ( ; voh_it; ++voh_it ) {
break;
} // .. add the (original) position of the neighbour ( end of the outgoing halfedge )
point += mesh->property( origPositions, mesh->to_vertex_handle(voh_it) );
} // Check if the current Halfedge is a boundary halfedge
// If it is, abort and keep the current vertex position
if ( mesh->is_boundary( voh_it.handle() ) ) {
skip = true;
break;
}
}
// Devide by the valence of the current vertex // Devide by the valence of the current vertex
point /= mesh->valence( v_it ); point /= mesh->valence( v_it );
if ( ! skip ) { if ( ! skip ) {
// Set new position for the mesh if its not on the boundary // Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point; mesh->point(v_it) = point;
} }
} }
}// Iterations end }// Iterations end
...@@ -136,9 +137,9 @@ void SmootherPlugin::simpleLaplace() { ...@@ -136,9 +137,9 @@ void SmootherPlugin::simpleLaplace() {
emit updatedObject( o_it->id() ); emit updatedObject( o_it->id() );
} else if ( o_it->dataType( DATA_POLY_MESH ) ) { } else if ( o_it->dataType( DATA_POLY_MESH ) ) {
// Get the mesh to work on // Get the mesh to work on
PolyMesh* mesh = dynamic_cast< MeshObject< PolyMesh,DATA_POLY_MESH >* > (*o_it)->mesh(); PolyMesh* mesh = dynamic_cast< MeshObject< PolyMesh,DATA_POLY_MESH >* > (*o_it)->mesh();
// Property for the active mesh to store original point positions // Property for the active mesh to store original point positions
...@@ -149,43 +150,43 @@ void SmootherPlugin::simpleLaplace() { ...@@ -149,43 +150,43 @@ void SmootherPlugin::simpleLaplace() {
for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) { for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) {
// Copy original positions to backup ( in Vertex property ) // Copy original positions to backup ( in Vertex property )
PolyMesh::VertexIter v_it, v_end=mesh->vertices_end(); PolyMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) { for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
mesh->property( origPositions, v_it ) = mesh->point(v_it); mesh->property( origPositions, v_it ) = mesh->point(v_it);
} }
// Do one smoothing step (For each point of the mesh ... ) // Do one smoothing step (For each point of the mesh ... )
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) { for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
PolyMesh::Point point = PolyMesh::Point(0.0,0.0,0.0); PolyMesh::Point point = PolyMesh::Point(0.0,0.0,0.0);
// Flag, to skip boundary vertices // Flag, to skip boundary vertices
bool skip = false; bool skip = false;
// ( .. for each Outoing halfedge .. ) // ( .. for each Outoing halfedge .. )
PolyMesh::VertexOHalfedgeIter voh_it(*mesh,v_it); PolyMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
for ( ; voh_it; ++voh_it ) { for ( ; voh_it; ++voh_it ) {
// .. add the (original) position of the Neighbour ( end of the outgoing halfedge ) // .. add the (original) position of the Neighbour ( end of the outgoing halfedge )
point += mesh->property( origPositions, mesh->to_vertex_handle(voh_it) ); point += mesh->property( origPositions, mesh->to_vertex_handle(voh_it) );
// Check if the current Halfedge is a boundary halfedge // Check if the current Halfedge is a boundary halfedge
// If it is, abort and keep the current vertex position // If it is, abort and keep the current vertex position
if ( mesh->is_boundary( voh_it.handle() ) ) { if ( mesh->is_boundary( voh_it.handle() ) ) {
skip = true; skip = true;
break; break;
} }
} }
// Devide by the valence of the current vertex // Devide by the valence of the current vertex
point /= mesh->valence( v_it ); point /= mesh->valence( v_it );
if ( ! skip ) { if ( ! skip ) {
// Set new position for the mesh if its not on the boundary // Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point; mesh->point(v_it) = point;
} }
} }
}// Iterations end }// Iterations end
...@@ -198,8 +199,9 @@ void SmootherPlugin::simpleLaplace() { ...@@ -198,8 +199,9 @@ void SmootherPlugin::simpleLaplace() {
} else { } else {
emit log(LOGERR, "DataType not supported."); emit log(LOGERR, "Data type not supported.");
}
} // Switch data type
} }
} }
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment