Commit ec78a8e5 authored by Jan Möbius's avatar Jan Möbius

Selection type scripting functions to get active selection type in volume meshes

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17634 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 8fc11717
...@@ -191,6 +191,32 @@ void VolumeMeshSelectionPlugin::updateSlotDescriptions() { ...@@ -191,6 +191,32 @@ void VolumeMeshSelectionPlugin::updateSlotDescriptions() {
//============================================================================================== //==============================================================================================
bool VolumeMeshSelectionPlugin::vertexTypeActive() {
SelectionInterface::PrimitiveType t = 0u;
emit getActivePrimitiveType(t);
return (t & vertexType_) > 0;
}
bool VolumeMeshSelectionPlugin::edgeTypeActive() {
SelectionInterface::PrimitiveType t = 0u;
emit getActivePrimitiveType(t);
return (t & edgeType_) > 0;
}
bool VolumeMeshSelectionPlugin::faceTypeActive() {
SelectionInterface::PrimitiveType t = 0u;
emit getActivePrimitiveType(t);
return (t & faceType_) > 0;
}
bool VolumeMeshSelectionPlugin::cellTypeActive() {
SelectionInterface::PrimitiveType t = 0u;
emit getActivePrimitiveType(t);
return (t & cellType_) > 0;
}
//==============================================================================================
void VolumeMeshSelectionPlugin::slotSelectionOperation(QString _operation) { void VolumeMeshSelectionPlugin::slotSelectionOperation(QString _operation) {
SelectionInterface::PrimitiveType type = 0u; SelectionInterface::PrimitiveType type = 0u;
......
...@@ -177,6 +177,20 @@ public slots: ...@@ -177,6 +177,20 @@ public slots:
* @{ */ * @{ */
//=========================================================================== //===========================================================================
/// Is vertex type active? (for use in plugins that need mesh selection)
bool vertexTypeActive();
/// Is vertex type active? (for use in plugins that need mesh selection)
bool edgeTypeActive();
/// Is face type active? (for use in plugins that need mesh selection)
bool faceTypeActive();
/// Is cell type active? (for use in plugins that need mesh selection)
bool cellTypeActive();
//===========================================================================
/// Select all vertices of a volume mesh /// Select all vertices of a volume mesh
void selectAllVertices(int _objectId); void selectAllVertices(int _objectId);
......
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