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 {
* e.g. selectAllVertices( ObjectId )
*
* @param _functionName the called function
* @param _exists found or not
*/
virtual void scriptInfo( QString /*_functionName*/ ) {};
......
......@@ -153,7 +153,8 @@ EXCLUDE_SYMBOLS =
EXAMPLE_PATH = ./Doxygen/example/
EXAMPLE_PATTERNS = *
EXAMPLE_RECURSIVE = NO
IMAGE_PATH = ./Doxygen/pics/
IMAGE_PATH = ./Doxygen/pics/ \
./Doxygen/screenshots/
INPUT_FILTER =
FILTER_PATTERNS =
FILTER_SOURCE_FILES = NO
......
/** \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 @@
bool SmootherPlugin::initializeToolbox(QWidget*& _widget)
{
// Create the Toolbox Widget
QWidget* toolBox = new QWidget();
// Create the Toolbox Widget
QWidget* toolBox = new QWidget();
QPushButton* smoothButton = new QPushButton("&Smooth",toolBox);
QPushButton* smoothButton = new QPushButton("&Smooth",toolBox);
iterationsSpinbox_ = new QSpinBox(toolBox) ;
iterationsSpinbox_->setMinimum(1);
iterationsSpinbox_->setMaximum(1000);
iterationsSpinbox_->setSingleStep(1);
iterationsSpinbox_ = new QSpinBox(toolBox) ;
iterationsSpinbox_->setMinimum(1);
iterationsSpinbox_->setMaximum(1000);
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( smoothButton , 1, 1);
layout->addWidget( iterationsSpinbox_, 0, 1);
layout->addWidget( label , 0, 0);
layout->addWidget( smoothButton , 1, 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;
return true;
_widget = toolBox;
return true;
}
/** \brief
......@@ -72,12 +72,12 @@ bool SmootherPlugin::initializeToolbox(QWidget*& _widget)
*/
void SmootherPlugin::simpleLaplace() {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS) ; o_it != PluginFunctions::objectsEnd(); ++o_it) {
for ( PluginFunctions::ObjectIterator o_it(PluginFunctions::TARGET_OBJECTS);
o_it != PluginFunctions::objectsEnd(); ++o_it) {
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);
// Property for the active mesh to store original point positions
......@@ -88,43 +88,44 @@ void SmootherPlugin::simpleLaplace() {
for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) {
// Copy original positions to backup ( in Vertex property )
TriMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++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) {
// Copy original positions to backup ( in vertex property )
TriMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
mesh->property( origPositions, v_it ) = mesh->point(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
bool skip = false;
TriMesh::Point point = TriMesh::Point(0.0,0.0,0.0);
// ( .. for each Outoing halfedge .. )
TriMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
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) );
// Flag, to skip boundary vertices
bool skip = false;
// 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;
}
// ( .. for each outgoing halfedge .. )
TriMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
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
// 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
point /= mesh->valence( v_it );
// Devide by the valence of the current vertex
point /= mesh->valence( v_it );
if ( ! skip ) {
// Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point;
}
}
if ( ! skip ) {
// Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point;
}
}
}// Iterations end
......@@ -136,9 +137,9 @@ void SmootherPlugin::simpleLaplace() {
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();
// Property for the active mesh to store original point positions
......@@ -149,43 +150,43 @@ void SmootherPlugin::simpleLaplace() {
for ( int i = 0 ; i < iterationsSpinbox_->value() ; ++i ) {
// Copy original positions to backup ( in Vertex property )
PolyMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++v_it) {
mesh->property( origPositions, v_it ) = mesh->point(v_it);
}
// Copy original positions to backup ( in Vertex property )
PolyMesh::VertexIter v_it, v_end=mesh->vertices_end();
for (v_it=mesh->vertices_begin(); v_it!=v_end; ++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) {
// Do one smoothing step (For each point of the mesh ... )
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
bool skip = false;
// Flag, to skip boundary vertices
bool skip = false;
// ( .. for each Outoing halfedge .. )
PolyMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
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) );
// ( .. for each Outoing halfedge .. )
PolyMesh::VertexOHalfedgeIter voh_it(*mesh,v_it);
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
// If it is, abort and keep the current vertex position
if ( mesh->is_boundary( voh_it.handle() ) ) {
skip = true;
break;
}
// 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
point /= mesh->valence( v_it );
// Devide by the valence of the current vertex
point /= mesh->valence( v_it );
if ( ! skip ) {
// Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point;
}
}
if ( ! skip ) {
// Set new position for the mesh if its not on the boundary
mesh->point(v_it) = point;
}
}
}// Iterations end
......@@ -198,8 +199,9 @@ void SmootherPlugin::simpleLaplace() {
} else {
emit log(LOGERR, "DataType not supported.");
}
emit log(LOGERR, "Data type not supported.");
} // Switch data type
}
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
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