]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Bug IPAL22467: TC6.3.0: surfaceframe presentation does not work V6_3_BR20110512 V6_3_BR20110513
authorouv <ouv@opencascade.com>
Wed, 11 May 2011 11:44:13 +0000 (11:44 +0000)
committerouv <ouv@opencascade.com>
Wed, 11 May 2011 11:44:13 +0000 (11:44 +0000)
src/OBJECT/VISU_MeshAct.cxx
src/OBJECT/VISU_MeshAct.h

index f4ad8c6edebaaeee9cbfc6c65fc6a7e2e4eae540..27da7ec9c625b76063a96f2201812ca4688eb75e 100644 (file)
@@ -56,7 +56,6 @@ VISU_MeshAct
   mySurfaceActor = SVTK_DeviceActor::New();
   mySurfaceActor->SetRepresentation(SVTK::Representation::Surface);
   mySurfaceActor->SetUserMatrix(m);
-  mySurfaceActor->SetProperty(GetProperty());
 
   myEdgeActor = SVTK_DeviceActor::New();
   myEdgeActor->SetRepresentation(SVTK::Representation::Wireframe);
@@ -352,6 +351,7 @@ VISU_MeshAct
     myEdgeActor->RenderOpaqueGeometry(ren);
     break;
   case Surface : 
+  case FeatureEdges :
     mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
     mySurfaceActor->RenderOpaqueGeometry(ren);
     break;
@@ -362,17 +362,17 @@ VISU_MeshAct
     myEdgeActor->SetAllocatedRenderTime(this->AllocatedRenderTime/2.0,ren);
     myEdgeActor->RenderOpaqueGeometry(ren);
     break;
-  case FeatureEdges :
-    mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
-    mySurfaceActor->RenderOpaqueGeometry(ren);
-    break;
   }
   return 1;
 }
 
 int
 VISU_MeshAct
+#if (VTK_XVERSION < 0x050100)
 ::RenderTranslucentGeometry(vtkViewport *ren)
+#else
+::RenderTranslucentPolygonalGeometry(vtkViewport *ren)
+#endif
 {
   GetMatrix(myNodeActor->GetUserMatrix());
   GetMatrix(myEdgeActor->GetUserMatrix());
@@ -398,6 +398,7 @@ VISU_MeshAct
 #endif
     break;
   case Surface : 
+  case FeatureEdges :
     mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
 #if (VTK_XVERSION < 0x050100)
     mySurfaceActor->RenderTranslucentGeometry(ren);
@@ -418,20 +419,44 @@ VISU_MeshAct
     myEdgeActor->RenderTranslucentGeometry(ren);
 #else
     myEdgeActor->RenderTranslucentPolygonalGeometry(ren);
-#endif
-    break;
-  case FeatureEdges :
-    mySurfaceActor->SetAllocatedRenderTime(this->AllocatedRenderTime,ren);
-#if (VTK_XVERSION < 0x050100)
-    mySurfaceActor->RenderTranslucentGeometry(ren);
-#else
-    mySurfaceActor->RenderTranslucentPolygonalGeometry(ren);
 #endif
     break;
   }
   return 1;
 }
 
+#if (VTK_XVERSION >= 0x050100)
+int
+VISU_MeshAct
+::HasTranslucentPolygonalGeometry()
+{
+  int result = 0; 
+
+  using namespace SVTK::Representation;
+  switch ( GetRepresentation() ) {
+  case Points:
+    result |= myNodeActor->HasTranslucentPolygonalGeometry();
+    break;
+  case Wireframe: 
+  case Insideframe: 
+    result |= myEdgeActor->HasTranslucentPolygonalGeometry();
+    break;
+  case Surface:
+  case FeatureEdges:
+    result |= mySurfaceActor->HasTranslucentPolygonalGeometry();
+    break;
+  case Surfaceframe:
+    result |= mySurfaceActor->HasTranslucentPolygonalGeometry();
+    result |= myEdgeActor->HasTranslucentPolygonalGeometry();
+    break;
+  default:
+    break;
+  }
+
+  return result;
+}
+#endif
+
 VISU_Actor::EQuadratic2DRepresentation 
 VISU_MeshAct::GetQuadratic2DRepresentation() const
 {
index cbdc3a37b4a8682a08933005eb926d50acb088a6..6f5b4a7102c2f8bcb34e5a0e4428d8fe4eeb2bbe 100644 (file)
@@ -134,7 +134,15 @@ class VISU_OBJECT_EXPORT VISU_MeshAct : public VISU_DataSetActor
 
   virtual
   int
+#if (VTK_XVERSION < 0x050100)
   RenderTranslucentGeometry(vtkViewport *ren);
+#else
+  RenderTranslucentPolygonalGeometry(vtkViewport *ren);
+
+  virtual
+  int
+  HasTranslucentPolygonalGeometry();
+#endif
 
   virtual
   EQuadratic2DRepresentation GetQuadratic2DRepresentation() const;