VISU::ColoredPrs3d_i
::SetNbColors(CORBA::Long theNbColors)
{
- myScalarMapPL->SetNbColors(theNbColors);
+ struct TEvent: public SALOME_Event {
+ VISU_ScalarMapPL* myMap;
+ int myNbColors;
+ TEvent( VISU_ScalarMapPL* theMap, int theNbColors)
+ :myMap(theMap), myNbColors(theNbColors)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myMap->SetNbColors(myNbColors);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myScalarMapPL, theNbColors));
}
CORBA::Long
#include "VISU_PipeLineUtils.hxx"
#include "SUIT_ResourceMgr.h"
+#include "SALOME_Event.hxx"
#include <vtkAppendPolyData.h>
void VISU::CutLines_i::SetOrientation(VISU::CutPlanes::Orientation theOrient,
CORBA::Double theXAngle, CORBA::Double theYAngle)
{
- myCutLinesPL->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(theOrient),
- theXAngle,theYAngle);
+
+ struct TEvent: public SALOME_Event {
+ VISU_CutLinesPL* myCutLinesPL;
+ CORBA::Double myXAngle, myYAngle;
+ VISU::CutPlanes::Orientation myOrient;
+ TEvent( VISU_CutLinesPL* theCutLines, VISU::CutPlanes::Orientation theOrient,
+ CORBA::Double theXAngle, CORBA::Double theYAngle)
+ :myCutLinesPL(theCutLines), myOrient(theOrient), myXAngle(theXAngle), myYAngle(theYAngle)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myCutLinesPL->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(myOrient),
+ myXAngle, myYAngle);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myCutLinesPL, theOrient, theXAngle, theYAngle));
+
}
+
void VISU::CutLines_i::SetOrientation2(VISU::CutPlanes::Orientation theOrient,
CORBA::Double theXAngle, CORBA::Double theYAngle)
{
- myCutLinesPL->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(theOrient),
- theXAngle,theYAngle,1);
+ struct TEvent: public SALOME_Event {
+ VISU_CutLinesPL* myCutLinesPL;
+ CORBA::Double myXAngle, myYAngle;
+ VISU::CutPlanes::Orientation myOrient;
+ TEvent( VISU_CutLinesPL* theCutLines, VISU::CutPlanes::Orientation theOrient,
+ CORBA::Double theXAngle, CORBA::Double theYAngle)
+ :myCutLinesPL(theCutLines), myOrient(theOrient), myXAngle(theXAngle), myYAngle(theYAngle)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myCutLinesPL->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(myOrient),
+ myXAngle, myYAngle, 1);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myCutLinesPL, theOrient, theXAngle, theYAngle));
+
}
VISU::CutPlanes::Orientation VISU::CutLines_i::GetOrientationType() {
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
+#include "SALOME_Event.hxx"
using namespace VISU;
using namespace std;
void VISU::CutPlanes_i::SetOrientation(VISU::CutPlanes::Orientation theOrient,
CORBA::Double theXAngle, CORBA::Double theYAngle)
{
- myCutPlanesPL->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(theOrient),
- theXAngle,theYAngle);
+ struct TEvent: public SALOME_Event {
+ VISU_CutPlanesPL* myCutPlanes;
+ CORBA::Double myXAngle, myYAngle;
+ VISU::CutPlanes::Orientation myOrient;
+ TEvent( VISU_CutPlanesPL* theCutPlanes, VISU::CutPlanes::Orientation theOrient,
+ CORBA::Double theXAngle, CORBA::Double theYAngle)
+ :myCutPlanes(theCutPlanes), myOrient(theOrient), myXAngle(theXAngle), myYAngle(theYAngle)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myCutPlanes->SetOrientation(VISU_CutPlanesPL::PlaneOrientation(myOrient),
+ myXAngle, myYAngle);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myCutPlanesPL, theOrient, theXAngle, theYAngle));
}
VISU::CutPlanes::Orientation VISU::CutPlanes_i::GetOrientationType() {
void VISU::CutPlanes_i::SetNbPlanes(CORBA::Long theNb) {
- myCutPlanesPL->SetNbParts(theNb);
+
+ struct TEvent: public SALOME_Event {
+ VISU_CutPlanesPL* myCutPlanes;
+ CORBA::Long myNbPlanes;
+ TEvent( VISU_CutPlanesPL* theCutPlanes, int theNbPlanes)
+ :myCutPlanes(theCutPlanes), myNbPlanes(theNbPlanes)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myCutPlanes->SetNbParts(myNbPlanes);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myCutPlanesPL, theNb));
}
+
CORBA::Long VISU::CutPlanes_i::GetNbPlanes() {
return myCutPlanesPL->GetNbParts();
}
return Prs3dOnField<VISU::CutLines_i>(theResult,theMeshName,theEntity,theFieldName,theIteration)._retn();
}
- Table_ptr VISU_Gen_i::CreateTable(const char* theTableEntry){
+ struct CreateTableEvent: public SALOME_Event
+ {
+ SALOMEDS::Study_var myStudyDocument;
+ const char* myTableEntry;
+ typedef Table_ptr TResult;
+ TResult myResult;
+
+ CreateTableEvent(const SALOMEDS::Study_var& theStudy, const char* theTableEntry)
+ {
+ myStudyDocument = theStudy;
+ myTableEntry = theTableEntry;
+ myResult = Table::_nil();
+ }
+
+ virtual
+ void
+ Execute()
+ {
+ Table_i* pPresent = new Table_i(myStudyDocument,myTableEntry);
+ if(pPresent->Create() != NULL)
+ myResult = pPresent->_this();
+ else{
+ pPresent->_remove_ref();
+ myResult = VISU::Table::_nil();
+ }
+ }
+ };
+
+
+ Table_ptr VISU_Gen_i::CreateTable(const char* theTableEntry)
+ {
if(myStudyDocument->GetProperties()->IsLocked())
return Table::_nil();
Mutex mt(myMutex);
- Table_i* pPresent = new Table_i(myStudyDocument,theTableEntry);
- if(pPresent->Create() != NULL)
- return pPresent->_this();
- else{
- pPresent->_remove_ref();
- return VISU::Table::_nil();
- }
+ return ProcessEvent(new CreateTableEvent(myStudyDocument, theTableEntry));
}
Curve_ptr VISU_Gen_i::CreateCurve(Table_ptr theTable,
#include "VISU_Actor.h"
#include "SUIT_ResourceMgr.h"
+#include "SALOME_Event.hxx"
using namespace VISU;
using namespace std;
void VISU::IsoSurfaces_i::SetNbSurfaces(CORBA::Long theNb){
- myIsoSurfacesPL->SetNbParts(theNb);
+
+ struct TEvent: public SALOME_Event {
+ VISU_IsoSurfacesPL* myIsoSurfacesPL;
+ CORBA::Long myNb;
+ TEvent( VISU_IsoSurfacesPL* theIsoSurfacesPL, int theNb)
+ :myIsoSurfacesPL(theIsoSurfacesPL), myNb(theNb)
+ {}
+
+ virtual
+ void
+ Execute()
+ {
+ myIsoSurfacesPL->SetNbParts(myNb);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myIsoSurfacesPL, theNb));
}
+
CORBA::Long VISU::IsoSurfaces_i::GetNbSurfaces(){
return myIsoSurfacesPL->GetNbParts();
}
#include <vtkDataSetMapper.h>
#include <vtkTextProperty.h>
+#include "SALOME_Event.hxx"
+
using namespace VISU;
using namespace std;
{
if(theMin > theMax)
return;
- vtkFloatingPointType aScalarRange[2] = {theMin, theMax};
- myScalarMapPL->SetScalarRange(aScalarRange);
+
+ struct TEvent: public SALOME_Event {
+ VISU_ScalarMapPL* myMap;
+ vtkFloatingPointType myRange[2];
+ TEvent( VISU_ScalarMapPL* theMap, const vtkFloatingPointType& theMin , const vtkFloatingPointType& theMax)
+ :myMap(theMap)
+ {
+ myRange[0] = theMin;
+ myRange[1] = theMax;
+ }
+
+ virtual
+ void
+ Execute()
+ {
+ myMap->SetScalarRange(myRange);
+ }
+ };
+
+ ProcessVoidEvent(new TEvent(myScalarMapPL, theMin, theMax));
myIsFixedRange = true;
}
thePercents,
theDirection,
1);
- if(isAccepted == 1) SetSource(aPrs3di);
+ if(isAccepted == 1)
+ SetSource(aPrs3di);
return isAccepted == 1;
}