Public Types | |
| typedef std::vector< vtkIdType > | TVTKIds |
Public Member Functions | |
| TPolySimulation (SalomeApp_Application *app) | |
| void | SetPosition (SMESH_Actor *theActor, vtkIdType theType, const TVTKIds &theIds, bool theReset=true) |
| void | ResetGrid (bool theReset=true) |
| void | SetVisibility (bool theVisibility) |
| ~TPolySimulation () | |
Private Attributes | |
| SVTK_ViewWindow * | myViewWindow |
| SALOME_Actor * | myPreviewActor |
| vtkDataSetMapper * | myMapper |
| vtkUnstructuredGrid * | myGrid |
Definition at line 90 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
| typedef std::vector<vtkIdType> SMESH.TPolySimulation.TVTKIds |
Definition at line 133 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
| SMESH.TPolySimulation.TPolySimulation | ( | SalomeApp_Application * | app | ) |
Definition at line 100 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
References SMESH.GetColor(), SMESH.TPolySimulation.myGrid, SMESH.TPolySimulation.myMapper, SMESH.TPolySimulation.myPreviewActor, and SMESH.TPolySimulation.myViewWindow.
{
SUIT_ViewManager* mgr = app->activeViewManager();
myViewWindow = mgr ? dynamic_cast<SVTK_ViewWindow*>( mgr->getActiveView() ) : NULL;
myGrid = vtkUnstructuredGrid::New();
// Create and display actor
myMapper = vtkDataSetMapper::New();
myMapper->SetInput( myGrid );
myPreviewActor = SALOME_Actor::New();
myPreviewActor->PickableOff();
myPreviewActor->VisibilityOff();
myPreviewActor->SetMapper( myMapper );
myPreviewActor->SetRepresentation( 3 );
vtkFloatingPointType anRGB[3];
vtkProperty* aProp = vtkProperty::New();
GetColor( "SMESH", "selection_element_color", anRGB[0], anRGB[1], anRGB[2], QColor( 0, 170, 255 ) );
aProp->SetColor(anRGB[0],anRGB[1],anRGB[2]);
myPreviewActor->SetProperty( aProp );
vtkFloatingPointType aFactor,aUnits;
myPreviewActor->SetResolveCoincidentTopology(true);
myPreviewActor->GetPolygonOffsetParameters(aFactor,aUnits);
myPreviewActor->SetPolygonOffsetParameters(aFactor,0.2*aUnits);
aProp->Delete();
myViewWindow->AddActor( myPreviewActor );
}
| SMESH.TPolySimulation.~TPolySimulation | ( | ) |
Definition at line 171 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
References SMESH.TPolySimulation.myGrid, SMESH.TPolySimulation.myMapper, SMESH.TPolySimulation.myPreviewActor, and SMESH.TPolySimulation.myViewWindow.
{
if( myViewWindow )
myViewWindow->RemoveActor(myPreviewActor);
myPreviewActor->Delete();
myMapper->RemoveAllInputs();
myMapper->Delete();
myGrid->Delete();
}
| void SMESH.TPolySimulation.ResetGrid | ( | bool | theReset = true | ) |
Definition at line 161 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
References SMESH.TPolySimulation.myGrid.
Referenced by SMESHGUI_CreatePolyhedralVolumeDlg.displaySimulation(), and SMESH.TPolySimulation.SetPosition().
{
if (theReset) myGrid->Reset();
}
| void SMESH.TPolySimulation.SetPosition | ( | SMESH_Actor * | theActor, |
| vtkIdType | theType, | ||
| const TVTKIds & | theIds, | ||
| bool | theReset = true |
||
| ) |
Definition at line 134 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
References SMESH_BelongToGeom.anIds, SMESH_Actor.GetUnstructuredGrid(), SMESH.TPolySimulation.myGrid, SMESH.TPolySimulation.ResetGrid(), and SMESH.TPolySimulation.SetVisibility().
Referenced by SMESHGUI_CreatePolyhedralVolumeDlg.displaySimulation().
{
vtkUnstructuredGrid *aGrid = theActor->GetUnstructuredGrid();
myGrid->SetPoints(aGrid->GetPoints());
ResetGrid(theReset);
vtkIdList *anIds = vtkIdList::New();
for (int i = 0, iEnd = theIds.size(); i < iEnd; i++)
anIds->InsertId(i,theIds[i]);
myGrid->InsertNextCell(theType,anIds);
if(theIds.size()!=0){
myGrid->InsertNextCell(theType,anIds);
myGrid->Modified();
}
anIds->Delete();
SetVisibility(true);
}
| void SMESH.TPolySimulation.SetVisibility | ( | bool | theVisibility | ) |
Definition at line 165 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
References SMESH.TPolySimulation.myPreviewActor, and SMESH.RepaintCurrentView().
Referenced by SMESHGUI_CreatePolyhedralVolumeDlg.ClickOnCancel(), SMESHGUI_CreatePolyhedralVolumeDlg.ConstructorsClicked(), SMESHGUI_CreatePolyhedralVolumeDlg.DeactivateActiveDialog(), SMESHGUI_CreatePolyhedralVolumeDlg.displaySimulation(), SMESHGUI_CreatePolyhedralVolumeDlg.onTextChange(), SMESHGUI_CreatePolyhedralVolumeDlg.SelectionIntoArgument(), and SMESH.TPolySimulation.SetPosition().
{
myPreviewActor->SetVisibility(theVisibility);
RepaintCurrentView();
}
vtkUnstructuredGrid* SMESH.TPolySimulation.myGrid [private] |
Definition at line 96 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
Referenced by SMESH.TPolySimulation.ResetGrid(), SMESH.TPolySimulation.SetPosition(), SMESH.TPolySimulation.TPolySimulation(), and SMESH.TPolySimulation.~TPolySimulation().
vtkDataSetMapper* SMESH.TPolySimulation.myMapper [private] |
Definition at line 95 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
Referenced by SMESH.TPolySimulation.TPolySimulation(), and SMESH.TPolySimulation.~TPolySimulation().
SALOME_Actor* SMESH.TPolySimulation.myPreviewActor [private] |
Definition at line 94 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
Referenced by SMESH.TPolySimulation.SetVisibility(), SMESH.TPolySimulation.TPolySimulation(), and SMESH.TPolySimulation.~TPolySimulation().
SVTK_ViewWindow* SMESH.TPolySimulation.myViewWindow [private] |
Definition at line 92 of file SMESHGUI_CreatePolyhedralVolumeDlg.cxx.
Referenced by SMESH.TPolySimulation.TPolySimulation(), and SMESH.TPolySimulation.~TPolySimulation().