ENUM2STRING( aResStr, VISU::TSTREAMLINES );
ENUM2STRING( aResStr, VISU::TPLOT3D );
ENUM2STRING( aResStr, VISU::TANIMATION );
+ ENUM2STRING( aResStr, VISU::TPOINTMAP3D );
}
}
{
VISU_Actor* anActor = NULL;
VISU::Prs3d_i* aPrs3d = NULL;
+ VISU_ActorBase* anActorBase = NULL;
+ VISU::PointMap3d_i* aPointMap3d = NULL;
SVTK_ViewWindow* aViewWindow = NULL;
- if(!GetPrs3dSelectionInfo<TViewer>(theModule, theEntry, aPrs3d, aViewWindow, anActor))
- return QString();
-
- return get(aPrs3d, aViewWindow, anActor);
+ if(GetPrs3dSelectionInfo<TViewer>(theModule, theEntry, aPrs3d, aViewWindow, anActor))
+ return get(aPrs3d, aViewWindow, anActor);
+ else {
+ aViewWindow = GetActiveViewWindow<SVTK_ViewWindow>(theModule);
+ VISU::TSelectionInfo aSelectionInfo = VISU::GetSelectedObjects(theModule);
+ if ( aSelectionInfo.empty() )
+ return QString();
+ VISU::TSelectionItem aSelectionItem = aSelectionInfo.front();
+ aPointMap3d = dynamic_cast<VISU::PointMap3d_i*>(aSelectionItem.myObjectInfo.myBase);
+ anActorBase = VISU::FindActorBase(aViewWindow, aPointMap3d);
+ return getPointMap(aPointMap3d, aViewWindow, anActorBase);
+ }
}
QString
{
return QString();
}
+
+ QString
+ virtual
+ getPointMap(VISU::PointMap3d_i* thePrs3d,
+ SVTK_ViewWindow* theViewWindow,
+ VISU_ActorBase* theActor)
+ {
+ return QString();
+ }
};
ENUM2STRING( aResStr, VISU::INSIDEFRAME );
ENUM2STRING( aResStr, VISU::SURFACEFRAME );
ENUM2STRING( aResStr, VISU::FEATURE_EDGES );
- }
+ }
+ return aResStr;
+ }
+
+ QString
+ virtual
+ getPointMap(VISU::PointMap3d_i* thePrs3d,
+ SVTK_ViewWindow* theViewWindow,
+ VISU_ActorBase* theActorBase)
+ {
+ QString aResStr = "";
+ if (theActorBase) {
+ switch (theActorBase->GetRepresentation()) {
+ ENUM2STRING( aResStr, VISU::WIREFRAME ); // = 1
+ ENUM2STRING( aResStr, VISU::SHADED ); // = 2
+ }
+ }
return aResStr;
}
};
}
//----------------------------------------------------------------------------
-QString VisuGUI_Selection::nbChildren( const int ind ) const
+int VisuGUI_Selection::nbChildren( const int ind ) const
{
- QString aResStr;
- aResStr.setNum( nbChild( ind, false ) );
- return aResStr;
+ return nbChild( ind, false );
}
//----------------------------------------------------------------------------
-QString VisuGUI_Selection::nbNamedChildren( const int ind ) const
+int VisuGUI_Selection::nbNamedChildren( const int ind ) const
{
- QString aResStr;
- aResStr.setNum( nbChild( ind, true ) );
- return aResStr;
+ return nbChild( ind, true );
}
{
return theActor->IsShrunk() ? "1" : "0";
}
+
+ QString
+ virtual
+ getPointMap(VISU::PointMap3d_i* thePointMap,
+ SVTK_ViewWindow* theViewWindow,
+ VISU_ActorBase* theActorBase)
+ {
+ if (theActorBase)
+ return theActorBase->IsShrunk() ? "1" : "0";
+ else return "0";
+ }
};
QString VisuGUI_Selection::isShrunk( const int ind ) const
//----------------------------------------------------------------------------
-QString VisuGUI_Selection::hasActor( const int ind ) const
+bool VisuGUI_Selection::hasActor( const int ind ) const
{
- return representation( ind ).isEmpty() ? "0" : "1";
+ return !representation( ind ).isEmpty();
}
CORBA::Object_var aCORBAObject = VISU::ClientSObjectToObject(refSO);
if(!CORBA::is_nil(aCORBAObject)){
PortableServer::ServantBase_var aServant = VISU::GetServant(aCORBAObject);
- if(VISU::Curve_i* aCurve = dynamic_cast<VISU::Curve_i*>(aServant.in()))
+ if(dynamic_cast<VISU::Curve_i*>(aServant.in()))
return true;
}
}