Commit 5b8bfdcb authored by Jan Möbius's avatar Jan Möbius

Added functions to mesh node to toggle selectionVisibility

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@3001 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 575129eb
......@@ -326,6 +326,42 @@
return shaderNode_;
}
/** Shows or hides the selections on the object
*/
template < class MeshT , DataType objectDataType >
void MeshObject< MeshT , objectDataType >::hideSelection( bool _hide ) {
if ( _hide ) {
statusNode_->set_status( ACG::SceneGraph::BaseNode::HideNode );
} else {
statusNode_->set_status( ACG::SceneGraph::BaseNode::Active );
}
}
/** Shows or hides the areas on the object
*/
template < class MeshT , DataType objectDataType >
void MeshObject< MeshT , objectDataType >::hideAreaNodes( bool _hide ) {
if ( _hide ) {
areaNode_->set_status( ACG::SceneGraph::BaseNode::HideNode );
handleNode_->set_status( ACG::SceneGraph::BaseNode::HideNode );
} else {
areaNode_->set_status( ACG::SceneGraph::BaseNode::Active );
handleNode_->set_status( ACG::SceneGraph::BaseNode::Active );
}
}
template < class MeshT , DataType objectDataType >
bool MeshObject< MeshT , objectDataType >::selectionVisible() {
return ( statusNode_->status() == ACG::SceneGraph::BaseNode::Active );
}
template < class MeshT , DataType objectDataType >
bool MeshObject< MeshT , objectDataType >::areasVisible() {
return ( areaNode_->status() == ACG::SceneGraph::BaseNode::Active );
}
/** Returns a pointer to the mesh node
* @return Pointer to the mesh node
*/
......
......@@ -163,6 +163,18 @@ class DLLEXPORT MeshObject : public BaseObjectData {
/// Return pointer to the shader node
ACG::SceneGraph::ShaderNode* shaderNode();
/// Hide or show the selection Node of the object
void hideSelection( bool _hide );
/// return if the selections are currently visible
bool selectionVisible();
/// Hide or show the area Nodes of the object
void hideAreaNodes( bool _hide );
/// return if the areas are currently visible
bool areasVisible();
/// Get the Scenegraph Mesh Node
ACG::SceneGraph::MeshNodeT<MeshT>* meshNode();;
......
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