]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Note 0009977 of the issue 0013178: EDF243 VISU : post_processing for fields at nodes StartingPortingMED3 V6_main_20110317 V6_main_20110318
authorouv <ouv@opencascade.com>
Tue, 15 Mar 2011 13:56:27 +0000 (13:56 +0000)
committerouv <ouv@opencascade.com>
Tue, 15 Mar 2011 13:56:27 +0000 (13:56 +0000)
14 files changed:
doc/salome/gui/VISU/images/point_marker_dlg3.png [new file with mode: 0755]
doc/salome/gui/VISU/images/point_sprite_marker.png [new file with mode: 0755]
doc/salome/gui/VISU/input/point_marker.doc
idl/VISU_Gen.idl
resources/Makefile.am
resources/Visu_point_sprite.png [new file with mode: 0755]
src/OBJECT/VISU_IsoSurfActor.cxx
src/OBJECT/VISU_IsoSurfActor.h
src/OBJECT/VISU_ScalarMapAct.cxx
src/OBJECT/VISU_ScalarMapAct.h
src/VISUGUI/VISU_images.ts
src/VISUGUI/VisuGUI.cxx
src/VISU_I/VISU_DumpPython.cc
src/VISU_I/VISU_Prs3d_i.cc

diff --git a/doc/salome/gui/VISU/images/point_marker_dlg3.png b/doc/salome/gui/VISU/images/point_marker_dlg3.png
new file mode 100755 (executable)
index 0000000..bec4a9a
Binary files /dev/null and b/doc/salome/gui/VISU/images/point_marker_dlg3.png differ
diff --git a/doc/salome/gui/VISU/images/point_sprite_marker.png b/doc/salome/gui/VISU/images/point_sprite_marker.png
new file mode 100755 (executable)
index 0000000..ea64630
Binary files /dev/null and b/doc/salome/gui/VISU/images/point_sprite_marker.png differ
index 4df393bfb21ad0811e0678b4f88124503e2e671e..081cfb0ce32b53d001a7b93ed4de974164d50696 100644 (file)
@@ -19,6 +19,23 @@ form) and scale factor (defines shape size).
 
 \image html std_point_marker.png "Presentation with standard point markers"
 
+<br>
+
+There is also an additional type of point marker - Point Sprite marker,
+which allows to display points as OpenGL point sprites with predefined
+shape and alpha mask. This marker is added to the end of the list of
+standard markers.
+
+\note The Point Sprite marker is insensitive to scale factor parameter,
+but it is possible to change its magnification by pressing "m" and "M"
+(Shift + "m") buttons in the view, just like for Gauss Points presentation.
+
+\image html point_marker_dlg3.png
+
+<br>
+
+\image html point_sprite_marker.png "Presentation with Point Sprite marker"
+
 - Custom point markers
 
 It is also possible to load a point marker shape from an external file.
index a5949704173d2494d9505cd2573d76f985d5864b..c7cf388dd202411b9946f4f3464a034d10a5db27 100644 (file)
@@ -92,7 +92,8 @@ module VISU {
     MT_O_PLUS,
     MT_O_STAR,
     MT_O_X,
-    MT_USER
+    MT_USER,
+    MT_POINT_SPRITE /*!< VISU specific */
   };
 
   /*!
index 5ea587cbebd51bac767aca03a92241bc014dc2ce..44856c00290bcfb4251864a0394552595c1d1895 100644 (file)
@@ -57,6 +57,7 @@ Visu_ok.png \
 Visu_plot2d.png \
 Visu_plot3d.png \
 Visu_point_selection.png \
+Visu_point_sprite.png \
 Visu_points.png \
 Visu_recording_stop.png \
 Visu_remove.png \
diff --git a/resources/Visu_point_sprite.png b/resources/Visu_point_sprite.png
new file mode 100755 (executable)
index 0000000..a7bd4aa
Binary files /dev/null and b/resources/Visu_point_sprite.png differ
index 52785d4c4b66836df5041e43d7971bc7c1196b53..1aec598005566ba7dffd0bea4ef1bff3ae61e669 100644 (file)
@@ -133,11 +133,18 @@ int VISU_IsoSurfActor::RenderOpaqueGeometry(vtkViewport *vp)
   return VISU_ScalarMapAct::RenderOpaqueGeometry(vp);
 }
 
-
+#if (VTK_XVERSION < 0x050100)
 int VISU_IsoSurfActor::RenderTranslucentGeometry(vtkViewport *vp)
+#else
+int VISU_IsoSurfActor::RenderTranslucentPolygonalGeometry(vtkViewport *vp)
+#endif
 {
   UpdateLabels();
+#if (VTK_XVERSION < 0x050100)
   return VISU_ScalarMapAct::RenderTranslucentGeometry(vp);
+#else
+  return VISU_ScalarMapAct::RenderTranslucentPolygonalGeometry(vp);
+#endif
 }
 
 void VISU_IsoSurfActor::SetVisibility(int theMode){
index 345e66f98419e98d639c636b7b881898ffd6753d..acbccf5f9ba29b9bc5df2319a2a627ee1889d7d5 100644 (file)
@@ -49,7 +49,11 @@ class VISU_OBJECT_EXPORT VISU_IsoSurfActor : public VISU_ScalarMapAct
   virtual void RemoveFromRender( vtkRenderer* );
 
   virtual int RenderOpaqueGeometry(vtkViewport *viewport);
+#if (VTK_XVERSION < 0x050100)
   virtual int RenderTranslucentGeometry(vtkViewport *viewport);
+#else
+  virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
+#endif
   
   //virtual void SetPipeLine(VISU_PipeLine* thePipeLine);
 
index 35673709de805e610be4ef5f79a751e59cf59274..d26381de01fee6fe9aaf2082bf05f4d7e5e95c80 100644 (file)
 #include <vtkImageData.h>
 
 
+//============================================================================
+class VISU_PointsDeviceActor: public VISU_GaussDeviceActorBase
+{
+ public:
+  vtkTypeMacro(VISU_PointsDeviceActor, VISU_GaussDeviceActorBase);
+
+  static 
+  VISU_PointsDeviceActor* 
+  New();
+
+  //----------------------------------------------------------------------------
+  virtual
+  void
+  SetInput(vtkDataSet* theDataSet)
+  {
+    myGeomFilter->SetInput( theDataSet );
+  }
+
+
+  //----------------------------------------------------------------------------
+  void
+  SetInteractor(vtkRenderWindowInteractor* theInteractor)
+  {
+    if(theInteractor == myInteractor)
+      return;
+
+    if(myInteractor)
+      myInteractor->RemoveObserver(myEventCallbackCommand);
+    
+    if(theInteractor)
+      theInteractor->AddObserver(vtkCommand::CharEvent, 
+                                 myEventCallbackCommand, 
+                                 0.0);
+
+    myInteractor = theInteractor;
+  }
+
+
+  //----------------------------------------------------------------------------
+  void
+  DoMapperShallowCopy( vtkMapper* theMapper,
+                       bool theIsCopyInput )
+  {
+    Superclass::DoMapperShallowCopy( theMapper, theIsCopyInput );
+
+    vtkDataSet* aDataSet = theMapper->GetInput();
+    vtkFloatingPointType aScaleFactor = VISU_DeformedShapePL::GetScaleFactor( aDataSet );
+
+    GetPointSpriteMapper()->SetAverageCellSize( aScaleFactor );
+  }
+
+
+  //----------------------------------------------------------------------------
+  void
+  DeepCopy( VISU_PointsDeviceActor *theActor )
+  {
+    VISU::CopyPointSpriteDataMapper( GetPointSpriteMapper(), theActor->GetPointSpriteMapper(), false );
+  }
+
+ protected:
+  //----------------------------------------------------------------------------
+  VISU_PointsDeviceActor():
+    myGeomFilter( VTKViewer_GeometryFilter::New() ),
+    myEventCallbackCommand( vtkCallbackCommand::New() ),
+    myInteractor( NULL )
+  {
+    myGeomFilter->SetInside(true);
+
+    VISU_OpenGLPointSpriteMapper* aMapper = VISU_OpenGLPointSpriteMapper::New();
+    aMapper->SetInput( myGeomFilter->GetOutput() );
+
+    std::string aRootDir( getenv( "VISU_ROOT_DIR") );
+    std::string aMainTexture = aRootDir + "/share/salome/resources/visu/sprite_texture.bmp";
+    std::string anAlphaTexture = aRootDir + "/share/salome/resources/visu/sprite_alpha.bmp";
+    VISU::TTextureValue aTextureValue = VISU::GetTexture( aMainTexture, anAlphaTexture );
+    aMapper->SetImageData( aTextureValue.GetPointer() );
+
+    aMapper->SetUseLookupTableScalarRange(true);
+    aMapper->SetColorModeToMapScalars();
+    aMapper->SetScalarVisibility(true);
+
+    SetPointSpriteMapper( aMapper );
+
+    aMapper->Delete();
+
+    myEventCallbackCommand->SetClientData( this );
+    myEventCallbackCommand->SetCallback( VISU_PointsDeviceActor::ProcessEvents );
+  }
+
+
+  //----------------------------------------------------------------------------
+  ~VISU_PointsDeviceActor()
+  {
+    SetInteractor( NULL );
+    myGeomFilter->Delete();
+    myEventCallbackCommand->Delete();
+  }
+
+
+  //----------------------------------------------------------------------------
+  static
+  void
+  ProcessEvents(vtkObject* theObject, 
+                unsigned long theEvent,
+                void* theClientData, 
+                void* theCallData)
+  {
+    if ( VISU_PointsDeviceActor* self = reinterpret_cast<VISU_PointsDeviceActor*>( theClientData ) )
+      self->OnInteractorEvent( theEvent );
+  }
+
+
+  //----------------------------------------------------------------------------
+  void
+  OnInteractorEvent(unsigned long theEvent)
+  {
+    switch ( theEvent ) {
+    case vtkCommand::CharEvent: {
+      switch( myInteractor->GetKeyCode() ) {
+      case 'M' :
+      case 'm' : {
+        if ( !GetVisibility() )
+          return;
+
+        static vtkFloatingPointType anIncrement = 2;
+        vtkFloatingPointType aMagnification = GetPointSpriteMapper()->GetPointSpriteMagnification();
+        vtkFloatingPointType coefficient = myInteractor->GetShiftKey() ? anIncrement : 1 / anIncrement;
+
+        GetPointSpriteMapper()->SetPointSpriteMagnification( aMagnification * coefficient );
+
+        myInteractor->CreateTimer(VTKI_TIMER_UPDATE);
+        break;
+      }
+      default:
+        return;
+      }
+      break;
+    }
+    default:
+      return;
+    }
+  }
+
+
+  //----------------------------------------------------------------------------
+  vtkCallbackCommand* myEventCallbackCommand;
+  vtkRenderWindowInteractor* myInteractor;
+  VTKViewer_GeometryFilter* myGeomFilter;
+
+ private:
+  VISU_PointsDeviceActor(const VISU_PointsDeviceActor&); // Not implemented
+  void operator=(const VISU_PointsDeviceActor&); // Not implemented
+};
+
+vtkStandardNewMacro(VISU_PointsDeviceActor);
+
 //----------------------------------------------------------------------------
 vtkStandardNewMacro(VISU_ScalarMapAct);
 static vtkFloatingPointType EPS = 1.0 / VTK_LARGE_FLOAT;
@@ -90,8 +247,14 @@ VISU_ScalarMapAct
   myPointsActor->SetProperty(aProperty);
   myPointsActor->SetUserMatrix(aMatrix);
 
+  myPointSpriteActor = VISU_PointsDeviceActor::New();
+  myPointSpriteActor->SetProperty(aProperty);
+  myPointSpriteActor->SetUserMatrix(aMatrix);
+
   aMatrix->Delete();
 
+  myIsPointSpriteMode = false;
+
   SUIT_ResourceMgr* aResourceMgr = SUIT_Session::session()->resourceMgr();
   //Quadratic 2D elements representation
   if(aResourceMgr) {
@@ -112,6 +275,7 @@ VISU_ScalarMapAct
   myScalarBar->Delete();
 
   myPointsActor->Delete();
+  myPointSpriteActor->Delete();
 
   mySurfaceActor->Delete();
   myEdgeActor->Delete();
@@ -125,6 +289,8 @@ VISU_ScalarMapAct
 
   myEdgeActor->GetMapper()->ScalarVisibilityOff();
 
+  myPointSpriteActor->DoMapperShallowCopy( thePipeLine->GetMapper(), false );
+
   VISU::CopyMapper( myPointsActor->GetMapper(), thePipeLine->GetMapper(), false );
   VISU::CopyMapper( mySurfaceActor->GetMapper(), thePipeLine->GetMapper(), false );
 }
@@ -141,10 +307,12 @@ VISU_ScalarMapAct
 //    myEdgeActor->SetInput( theDataSet );
 
   if (theDataSet->IsA("vtkPolyData")) {
+    myPointSpriteActor->SetInput( myPolyDataExtractor->GetOutput() );
     myPointsActor->SetInput( myPolyDataExtractor->GetOutput() );
     mySurfaceActor->SetInput( myPolyDataExtractor->GetOutput() );
     myEdgeActor->SetInput( myPolyDataExtractor->GetOutput() );
   } else {
+    myPointSpriteActor->SetInput( myExtractor->GetOutput() );
     myPointsActor->SetInput( myExtractor->GetOutput() );
     mySurfaceActor->SetInput( myExtractor->GetOutput() );
     myEdgeActor->SetInput( myExtractor->GetOutput() );
@@ -159,6 +327,7 @@ VISU_ScalarMapAct
   Superclass::SetTransform(theTransform);
 
   myPointsActor->SetTransform(theTransform);
+  myPointSpriteActor->SetTransform(theTransform);
 
   mySurfaceActor->SetTransform(theTransform);
   myEdgeActor->SetTransform(theTransform);
@@ -278,6 +447,9 @@ VISU_ScalarMapAct
 ::SetOpacity(vtkFloatingPointType theValue)
 {
   mySurfaceActor->GetProperty()->SetOpacity(theValue);
+
+  vtkFloatingPointType aPointSpriteOpacity = theValue > 0.0 ? 1.0 : 0.0;
+  myPointSpriteActor->GetPointSpriteMapper()->SetPointSpriteOpacity(aPointSpriteOpacity);
 }
 
 vtkFloatingPointType
@@ -309,6 +481,7 @@ VISU_ScalarMapAct
   if(VISU_ScalarMapAct* anActor = dynamic_cast<VISU_ScalarMapAct*>(theActor)){
     Superclass::DeepCopy(theActor);
     SetBarVisibility(anActor->GetBarVisibility());
+    myPointSpriteActor->DeepCopy( anActor->myPointSpriteActor );
     SetShading(anActor->IsShading());
   }
 }
@@ -321,6 +494,8 @@ VISU_ScalarMapAct
 {
   Superclass::AddToRender(theRenderer);
 
+  myPointSpriteActor->SetInteractor( myInteractor );
+
   if(myScalarBar)
     theRenderer->AddActor2D(myScalarBar);
 }
@@ -334,6 +509,7 @@ VISU_ScalarMapAct
     theRenderer->RemoveActor(myScalarBar);
 
   if ( vtkWindow* aWindow = theRenderer->GetRenderWindow() ) {
+    myPointSpriteActor->ReleaseGraphicsResources( aWindow );
     myPointsActor->ReleaseGraphicsResources( aWindow );
     mySurfaceActor->ReleaseGraphicsResources( aWindow );
     myEdgeActor->ReleaseGraphicsResources( aWindow );
@@ -349,6 +525,7 @@ VISU_ScalarMapAct
 {
   Superclass::SetVisibility( theMode );
 
+  myPointSpriteActor->SetVisibility( theMode );
   myPointsActor->SetVisibility( theMode );
 
   if(myScalarBar) 
@@ -396,6 +573,7 @@ VISU_ScalarMapAct
   else
     mySurfaceActor->SetRepresentation(theMode);
 
+  myPointSpriteActor->SetProperty( mySurfaceActor->GetProperty() );
   myPointsActor->SetProperty( mySurfaceActor->GetProperty() );
 
   SetShading(anIsShanding);
@@ -435,6 +613,7 @@ VISU_ScalarMapAct
   GetMatrix(myEdgeActor->GetUserMatrix());
   GetMatrix(mySurfaceActor->GetUserMatrix());
   GetMatrix(myPointsActor->GetUserMatrix());
+  GetMatrix(myPointSpriteActor->GetUserMatrix());
 
   using namespace SVTK::Representation;
   switch ( GetRepresentation() ) {
@@ -448,8 +627,13 @@ VISU_ScalarMapAct
     break;
 
   case Points:
-    myPointsActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
-    myPointsActor->RenderOpaqueGeometry(ren);
+    if( myIsPointSpriteMode ) {
+      myPointSpriteActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+      myPointSpriteActor->RenderOpaqueGeometry(ren);
+    } else {
+      myPointsActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+      myPointsActor->RenderOpaqueGeometry(ren);
+    }
     break;
 
   default:
@@ -462,7 +646,11 @@ VISU_ScalarMapAct
 
 int
 VISU_ScalarMapAct
+#if (VTK_XVERSION < 0x050100)
 ::RenderTranslucentGeometry(vtkViewport *ren)
+#else
+::RenderTranslucentPolygonalGeometry(vtkViewport *ren)
+#endif
 {
   GetMatrix(myEdgeActor->GetUserMatrix());
   GetMatrix(mySurfaceActor->GetUserMatrix());
@@ -487,12 +675,21 @@ VISU_ScalarMapAct
     break;
 
   case Points:
-    myPointsActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+    if( myIsPointSpriteMode ) {
+      myPointSpriteActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
+#if (VTK_XVERSION < 0x050100)
+      myPointSpriteActor->RenderTranslucentGeometry(ren);
+#else
+      myPointSpriteActor->RenderTranslucentPolygonalGeometry(ren);
+#endif
+    } else {
+      myPointsActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
 #if (VTK_XVERSION < 0x050100)
-    myPointsActor->RenderTranslucentGeometry(ren);
+      myPointsActor->RenderTranslucentGeometry(ren);
 #else
-    myPointsActor->RenderTranslucentPolygonalGeometry(ren);
+      myPointsActor->RenderTranslucentPolygonalGeometry(ren);
 #endif
+    }
     break;
 
   default:
@@ -507,6 +704,46 @@ VISU_ScalarMapAct
   return 1;
 }
 
+//----------------------------------------------------------------------------
+#if (VTK_XVERSION >= 0x050100)
+int
+VISU_ScalarMapAct
+::HasTranslucentPolygonalGeometry()
+{
+  int result = 0; 
+
+  using namespace SVTK::Representation;
+  switch ( GetRepresentation() ) {
+  case Surfaceframe:
+    result |= mySurfaceActor->HasTranslucentPolygonalGeometry();
+    result |= myEdgeActor->HasTranslucentPolygonalGeometry();
+    break;
+  case Points:
+    if( myIsPointSpriteMode )
+      result |= myPointSpriteActor->HasTranslucentPolygonalGeometry();
+    else
+      result |= myPointsActor->HasTranslucentPolygonalGeometry();
+    break;
+  default:
+    result |= mySurfaceActor->HasTranslucentPolygonalGeometry();
+  }
+
+  return result;
+}
+#endif
+
+//----------------------------------------------------------------------------
+unsigned long int
+VISU_ScalarMapAct
+::GetMemorySize()
+{
+  unsigned long int aSize = Superclass::GetMemorySize();
+
+  aSize += myPointSpriteActor->GetMemorySize();
+
+  return aSize;
+}
+
 //----------------------------------------------------------------------------
 
 VISU_Actor::EQuadratic2DRepresentation 
@@ -542,12 +779,16 @@ void VISU_ScalarMapAct::SetMarkerStd( VTK::MarkerType theMarkerType, VTK::Marker
 {
   Superclass::SetMarkerStd( theMarkerType, theMarkerScale );
   myPointsActor->SetMarkerStd( theMarkerType, theMarkerScale );
+
+  myIsPointSpriteMode = theMarkerType == VTK::MT_POINT_SPRITE;
 }
 
 void VISU_ScalarMapAct::SetMarkerTexture( int theMarkerId, VTK::MarkerTexture theMarkerTexture )
 {
   Superclass::SetMarkerTexture( theMarkerId, theMarkerTexture );
   myPointsActor->SetMarkerTexture( theMarkerId, theMarkerTexture );
+
+  myIsPointSpriteMode = false;
 }
 
 /**
index 3233ff90aac61043001b49930a0066eadf6fcffb..00b7b386cb5d3cb3b8dd5281991e69199dcd51b2 100644 (file)
 #include "VISU_OBJECT.h"
 #include "VISU_DataSetActor.h"
 
+namespace VTK
+{
+  const MarkerType MT_POINT_SPRITE = MT_USER + 1;
+}
+
 class VISU_ScalarBarActor;
+class VISU_PointsDeviceActor;
 
 //----------------------------------------------------------------------------
 class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor 
@@ -136,7 +142,15 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
 
   virtual
   int
+#if (VTK_XVERSION < 0x050100)
   RenderTranslucentGeometry(vtkViewport *ren);
+#else
+  RenderTranslucentPolygonalGeometry(vtkViewport *ren);
+
+  virtual
+  int
+  HasTranslucentPolygonalGeometry();
+#endif
 
   virtual
   void
@@ -174,6 +188,11 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
   bool
   IsShading();
 
+  //! Gets memory size used by the instance (bytes).
+  virtual
+  unsigned long int
+  GetMemorySize();
+
   virtual
   void
   SetMarkerStd( VTK::MarkerType, VTK::MarkerScale );
@@ -197,9 +216,12 @@ class VISU_OBJECT_EXPORT VISU_ScalarMapAct : public VISU_DataSetActor
   bool myBarVisibility;
   VISU_ScalarBarActor* myScalarBar;
 
+  VISU_PointsDeviceActor* myPointSpriteActor;
   SVTK_DeviceActor*    myPointsActor;
   SVTK_DeviceActor*    mySurfaceActor;
   SVTK_DeviceActor*    myEdgeActor;
+
+  bool myIsPointSpriteMode;
 };
 //----------------------------------------------------------------------------
 
index c2e31e3c41f03983dd0e8bdbb2729a273b016cfc..aace6561c6995e49bffc89b00198c23c5492c625 100644 (file)
             <source>ICON_POINT_SELECTION</source>
             <translation>Visu_point_selection.png</translation>
         </message>
+        <message>
+            <source>ICON_POINT_SPRITE</source>
+            <translation>Visu_point_sprite.png</translation>
+        </message>
         <message>
             <source>ICON_POINTS</source>
             <translation>Visu_points.png</translation>
index b09336a6b18503221f65d80e54a1816fcc737b60..0377e2866ea41af07ab6d3aa2e63483b5c2e96c7 100644 (file)
@@ -1448,6 +1448,10 @@ VisuGUI
   _PTR(Study) aCStudy = GetCStudy( GetAppStudy( this ) );
   int aStudyId = aCStudy->StudyId();
 
+  QPixmap aPointSpritePixmap;
+  if( SUIT_ResourceMgr* aResourceMgr = VISU::GetResourceMgr() )
+    aPointSpritePixmap = aResourceMgr->loadPixmap( "VISU", tr( "ICON_POINT_SPRITE" ) );
+
   bool update = false;
   for( SALOME_ListIteratorOfListIO It( aListIO ); It.More(); It.Next() )
   {
@@ -1462,6 +1466,8 @@ VisuGUI
 
         aDlg->setCustomMarkerMap( aMarkerMap[ aStudyId ] );
 
+        aDlg->addExtraStdMarker( VTK::MT_POINT_SPRITE, aPointSpritePixmap );
+
         VISU::MarkerType aMarkerTypeCurrent = aPrs->GetMarkerType();
         VISU::MarkerScale aMarkerScaleCurrent = aPrs->GetMarkerScale();
         int aMarkerTextureCurrent = aPrs->GetMarkerTexture();
@@ -4291,6 +4297,8 @@ void VisuGUI::createPreferences()
     aMarkerTypeIndicesList << i;
     aMarkerTypeIconsList << pixmap;
   }
+  aMarkerTypeIndicesList << VTK::MT_POINT_SPRITE;
+  aMarkerTypeIconsList << aResourceMgr->loadPixmap( "VISU", tr( "ICON_POINT_SPRITE" ) );
   setPreferenceProperty( typeOfMarker, "indexes", aMarkerTypeIndicesList );
   setPreferenceProperty( typeOfMarker, "icons",   aMarkerTypeIconsList );
 
index 55b74b230037a11a3ebbf5642d6b08d96ca80e0b..04b04ed9e7e21739cc2560752ea66fd2b86166b2 100644 (file)
@@ -229,6 +229,7 @@ namespace VISU
         case MT_O_PLUS:  aParam1 = "MT_O_PLUS"; break;
         case MT_O_STAR:  aParam1 = "MT_O_STAR"; break;
         case MT_O_X:     aParam1 = "MT_O_X"; break;
+        case MT_POINT_SPRITE: aParam1 = "MT_POINT_SPRITE"; break;
         default:         aParam1 = "MT_NONE"; break;
         }
         switch( aMarkerScale ) {
@@ -245,8 +246,10 @@ namespace VISU
         case MS_60:      aParam2 = "MS_60"; break;
         case MS_65:      aParam2 = "MS_65"; break;
         case MS_70:      aParam2 = "MS_70"; break;
-        default:         aParam2 = "MT_NONE"; break;
+        default:         aParam2 = "MS_NONE"; break;
         }
+        if( aMarkerType == MT_POINT_SPRITE )
+          aParam2 = "MS_NONE";
         theStr<<thePrefix<<theName<<".SetMarkerStd(VISU."<<aParam1<<", VISU."<<aParam2<<")"<<endl;
       }
       else {
index f18c8f35f3d7b010b9c6e323cd36aaf6856436d0..2ad74b3289ec4238e1f7ced4e54e8c8a861ab551 100644 (file)
@@ -779,6 +779,8 @@ VISU::Prs3d_i
 {
   myMarkerType = theMarkerType;
   myMarkerScale = theMarkerScale;
+  if( myMarkerType == VISU::MT_POINT_SPRITE )
+    myMarkerScale = VISU::MS_NONE;
   myParamsTime.Modified();
 }