From: ouv Date: Wed, 11 May 2011 11:44:13 +0000 (+0000) Subject: Bug IPAL22467: TC6.3.0: surfaceframe presentation does not work X-Git-Tag: V6_3_BR20110512 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ef4ba519a2f981d41c6cd1544821fe1ef3d96ef2;p=modules%2Fvisu.git Bug IPAL22467: TC6.3.0: surfaceframe presentation does not work --- diff --git a/src/OBJECT/VISU_MeshAct.cxx b/src/OBJECT/VISU_MeshAct.cxx index f4ad8c6e..27da7ec9 100644 --- a/src/OBJECT/VISU_MeshAct.cxx +++ b/src/OBJECT/VISU_MeshAct.cxx @@ -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 { diff --git a/src/OBJECT/VISU_MeshAct.h b/src/OBJECT/VISU_MeshAct.h index cbdc3a37..6f5b4a71 100644 --- a/src/OBJECT/VISU_MeshAct.h +++ b/src/OBJECT/VISU_MeshAct.h @@ -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;