// Module : VISU
//
#include "VISU_Prs3dUtils.hh"
+#include "VISU_Prs3d_i.hh"
+#include "VISU_PointMap3d_i.hh"
#include "SalomeApp_Study.h"
#include "SALOME_Event.h"
{
//----------------------------------------------------------------------------
TSetModified
- ::TSetModified(VISU::Prs3d_i* thePrs3d):
- myPrs3d(thePrs3d)
+ ::TSetModified(VISU::PrsObject_i* thePrsObject):
+ myPrsObject(thePrsObject)
{
this->Modified();
}
void
Execute()
{
- VISU::Prs3d_i* aPrs3d = mySetModified->myPrs3d;
-
- if(!aPrs3d || aPrs3d->GetActorEntry() == "")
- return;
+ VISU::PrsObject_i* aPrsObject = mySetModified->myPrsObject;
+ if(!aPrsObject)
+ return;
+
+ VISU::Prs3d_i* aPrs3d;
+ VISU::PointMap3d_i* aPntMap;
+ SalomeApp_Study* aStudy;
+ unsigned long int time;
+ if( (aPrs3d = dynamic_cast<VISU::Prs3d_i*>(aPrsObject)) && aPrs3d->GetActorEntry() != "" ) {
+ aStudy = aPrs3d->GetGUIStudy();
+ time = aPrs3d->GetMTime();
+ } else if ( aPntMap = dynamic_cast<VISU::PointMap3d_i*>(aPrsObject) ) {
+ aStudy = aPntMap->GetGUIStudy();
+ time = aPntMap->GetMTime();
+ } else
+ return;
- if(aPrs3d->GetMTime() > mySetModified->GetMTime()){
- if(SalomeApp_Study* aStudy = aPrs3d->GetGUIStudy())
+ if(time > mySetModified->GetMTime()){
+ if(aStudy)
aStudy->Modified();
}
- }
- };
+ }
+ };
ProcessVoidEvent(new TEvent(this));
}
#ifndef __VISU_PRS3D_UTILS_H__
#define __VISU_PRS3D_UTILS_H__
-#include "VISU_Prs3d_i.hh"
+#include "VISU_PrsObject_i.hh"
#include <vtkTimeStamp.h>
//----------------------------------------------------------------------------
struct TSetModified: vtkTimeStamp
{
- VISU::Prs3d_i* myPrs3d;
+ VISU::PrsObject_i* myPrsObject;
- TSetModified(VISU::Prs3d_i* thePrs3d);
+ TSetModified(VISU::PrsObject_i* thePrsObject);
~TSetModified();
};
-
- Standard_EXPORT std::string ToFormat( const int thePrec );
- Standard_EXPORT int ToPrecision( const char* theFormat );
-
+
+ VISU_I_EXPORT std::string ToFormat( const int thePrec );
+ VISU_I_EXPORT int ToPrecision( const char* theFormat );
+
//----------------------------------------------------------------------------
}
VISU::Prs3d_i
::SetOffset(const CORBA::Float* theOffsets)
{
+ VISU::TSetModified aModified(this);
myOffset[0] = theOffsets[0];
myOffset[1] = theOffsets[1];
myOffset[2] = theOffsets[2];
CORBA::Float theDy,
CORBA::Float theDz)
{
+ VISU::TSetModified aModified(this);
myOffset[0] = theDx;
myOffset[1] = theDy;
myOffset[2] = theDz;