#include "SALOME_InteractiveObject.hxx"
#include "SMESH_ActorUtils.h"
+#include "VTKViewer_ViewFrame.h"
+#include "VTKViewer_RenderWindow.h"
+
+#include <vtkRenderer.h>
+
using namespace std;
myActor->SetInfinitive(true);
myActor->SetMapper( myMapper );
- static float anOpacity = 0.75;
-
vtkProperty* aProp = vtkProperty::New();
float anRGB[3];
anRGB[0] = SMESH::GetFloat("SMESH:SettingsFillColorRed", 0)/255.;
SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg()
{
// no need to delete child widgets, Qt does it all for us
- //cout<<"SMESHGUI_ClippingDlg::~SMESHGUI_ClippingDlg\n";
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(false));
- SMESH::GetCurrentVtkView()->Repaint();
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
aCollection->AddItem(anOrientedPlane);
anOrientedPlane->Delete();
}
-
- myActor->SetVisibility(myActor->GetVisibility());
-
- SMESH::GetCurrentVtkView()->Repaint();
+
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
}
}
}
Sinchronize();
- SMESH::GetCurrentVtkView()->Repaint();
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
// Orientation
SMESH::Orientation anOrientation = aPlane->GetOrientation();
- // Distance and Rotations
- float aDistance;
+ // Rotations
double aRot[2] = {aPlane->myAngle[0], aPlane->myAngle[1]};
// Set plane parameters in the dialog
ClickOnApply();
Sinchronize();
- SMESH::GetCurrentVtkView()->Repaint();
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
myActor->SetPlaneParam(aNormal, getDistance(), aPlane);
- float* anOrig = aPlane->GetOrigin();
vtkDataSet* aDataSet = myActor->GetInput();
float *aPnt = aDataSet->GetCenter();
if(AutoApplyCheckBox->isChecked())
ClickOnApply();
- SMESH::GetCurrentVtkView()->Repaint();
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
void SMESHGUI_ClippingDlg::OnPreviewToggle(bool theIsToggled){
std::for_each(myPlanes.begin(),myPlanes.end(),TSetVisiblity(theIsToggled));
- SMESH::GetCurrentVtkView()->Repaint();
+ SMESH::RenderViewFrame(SMESH::GetCurrentVtkView());
}
}
+ void RepaintViewFrame(VTKViewer_ViewFrame* theFrame)
+ {
+ theFrame->Repaint();
+ }
+
+
+ void RenderViewFrame(VTKViewer_ViewFrame* theFrame)
+ {
+ theFrame->getRW()->getRenderWindow()->Render();
+ theFrame->Repaint();
+ }
+
+
SMESH_Actor* FindActorByEntry(QAD_StudyFrame *theStudyFrame,
const char* theEntry)
{
{
theName = "";
if(theIO->hasEntry()){
- if(SMESH_Actor *anActor = FindActorByEntry(theIO->getEntry())){
+ if(FindActorByEntry(theIO->getEntry())){
TColStd_IndexedMapOfInteger aMapIndex;
theSel->GetIndex(theIO,aMapIndex);
for(int i = 1; i <= aMapIndex.Extent(); i++){
{
theName = "";
if(theIO->hasEntry()){
- if(SMESH_Actor *anActor = FindActorByEntry(theIO->getEntry())){
+ if(FindActorByEntry(theIO->getEntry())){
TColStd_IndexedMapOfInteger aMapIndex;
theSel->GetIndex(theIO,aMapIndex);
typedef std::set<int> TIdContainer;