Commit 49d2ddfe authored by Jan Möbius's avatar Jan Möbius
Browse files

Feature to check and disable modeling areas seperatly

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@15577 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 73923a62
...@@ -500,14 +500,21 @@ ...@@ -500,14 +500,21 @@
/** Shows or hides the areas on the object /** Shows or hides the areas on the object
*/ */
template < class MeshT > template < class MeshT >
void MeshObject< MeshT >::hideAreas( bool _hide ) { void MeshObject< MeshT >::hideArea( StatusBits _bit, bool _hide ) {
ACG::SceneGraph::BaseNode::StatusMode status;
if ( _hide ) { if ( _hide ) {
areaNode_->set_status( ACG::SceneGraph::BaseNode::HideNode ); status = ACG::SceneGraph::BaseNode::HideNode;
handleNode_->set_status( ACG::SceneGraph::BaseNode::HideNode ); }else
} else { status = ACG::SceneGraph::BaseNode::Active;
areaNode_->set_status( ACG::SceneGraph::BaseNode::Active );
handleNode_->set_status( ACG::SceneGraph::BaseNode::Active ); if ( _bit & AREA ) {
areaNode_->set_status( status );
} }
if ( _bit & HANDLEAREA )
handleNode_->set_status( status );
} }
template < class MeshT > template < class MeshT >
...@@ -516,8 +523,16 @@ ...@@ -516,8 +523,16 @@
} }
template < class MeshT > template < class MeshT >
bool MeshObject< MeshT >::areasVisible() { bool MeshObject< MeshT >::areaVisible( StatusBits _bit ) {
return ( areaNode_->status() == ACG::SceneGraph::BaseNode::Active ); bool status = true;
if ( _bit & AREA )
status &= ( areaNode_->status() == ACG::SceneGraph::BaseNode::Active );
if ( _bit & HANDLEAREA )
status &= ( handleNode_->status() == ACG::SceneGraph::BaseNode::Active );
return status;
} }
/** Returns a pointer to the mesh node /** Returns a pointer to the mesh node
......
...@@ -200,10 +200,17 @@ class DLLEXPORTONLY MeshObject : public BaseObjectData { ...@@ -200,10 +200,17 @@ class DLLEXPORTONLY MeshObject : public BaseObjectData {
bool featuresVisible( ); bool featuresVisible( );
/// Hide or show the area Nodes of the object /// Hide or show the area Nodes of the object
void hideAreas( bool _hide ); void hideArea( StatusBits _bit, bool _hide );
/// return if the areas are currently visible /** \brief Return if the selected areas are currently visible
bool areasVisible(); *
* \note If the bits contain multiple area bits, than only if all are visible,
* this function will return true
*
* @param _bit Status bit to check
* @return All visible?
*/
bool areaVisible( StatusBits _bit );
/// Get the Scenegraph Mesh Node /// Get the Scenegraph Mesh Node
ACG::SceneGraph::MeshNodeT<MeshT>* meshNode(); 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