Commit 2eef53bd authored by Jan Möbius's avatar Jan Möbius
Browse files

Updated addNode PluginFunctions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@7325 383ad7c9-94d9-4d36-a494-682f7c89f535
parent e8098d8a
......@@ -124,7 +124,6 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
// Check which points of the new face lie inside the sphere
uint fVertices = 0;
bool lastVertexInside = false;
std::vector<typename MeshT::VertexHandle> vertex_handles;
std::vector<typename MeshT::EdgeHandle> edge_handles;
......@@ -139,11 +138,8 @@ void SelectionPlugin::paintSphereSelection( MeshT* _mesh ,
if ( ( _mesh->point(_mesh->to_vertex_handle( fh_it.handle() ) ) - _hitpoint).sqrnorm() <= sqr_radius )
edge_handles.push_back( _mesh->edge_handle( fh_it.handle() ) );
lastVertexInside = true;
}else
lastVertexInside = false;
}
fVertices++;
}
......
......@@ -156,7 +156,8 @@ void SelectionPlugin::initializePlugin() {
emit addToolbox("Selections",tool_);
// create sphere for paint sphere selection
sphere_mat_node_ = new ACG::SceneGraph::MaterialNode(PluginFunctions::getRootNode(), tr("Sphere Color").toStdString());
sphere_mat_node_ = new ACG::SceneGraph::MaterialNode(0, tr("Selection Plugin: Selection Sphere Material").toStdString());
PluginFunctions::addGlobalNode(sphere_mat_node_);
sphere_mat_node_->applyProperties( MaterialNode::Blending |
MaterialNode::Material |
MaterialNode::AlphaTest |
......@@ -166,7 +167,7 @@ void SelectionPlugin::initializePlugin() {
sphere_mat_node_->disable_alpha_test();
sphere_mat_node_->enable_backface_culling();
sphere_node_ = new ACG::SceneGraph::GlutPrimitiveNode(ACG::SceneGraph::GlutPrimitiveNode::SPHERE, sphere_mat_node_, tr("Sphere").toStdString());
sphere_node_ = new ACG::SceneGraph::GlutPrimitiveNode(ACG::SceneGraph::GlutPrimitiveNode::SPHERE, sphere_mat_node_, tr("Selection Plugin: Selection Sphere").toStdString());
sphere_node_->drawMode(ACG::SceneGraph::DrawModes::SOLID_SMOOTH_SHADED);
sphere_node_->hide();
......@@ -174,8 +175,8 @@ void SelectionPlugin::initializePlugin() {
sphere_selection_ = false;
line_node_ = new ACG::SceneGraph::LineNode (ACG::SceneGraph::LineNode::PolygonMode,
PluginFunctions::getRootNode(), tr("Lasso line").toStdString());
line_node_ = new ACG::SceneGraph::LineNode (ACG::SceneGraph::LineNode::PolygonMode,0, tr("Selection Plugin: Lasso Selection Line").toStdString());
PluginFunctions::addGlobalNode(line_node_);
line_node_->set_line_width (2.0);
line_node_->depthFunc (GL_ALWAYS);
line_node_->setTraverseMode (BaseNode::NodeFirst | BaseNode::SecondPass);
......
Supports Markdown
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