2 #include <HYDROGUI_Actor.h>
3 #include <GEOM_PainterPolyDataMapper.h>
4 #include <GEOM_DeviceActor.h>
5 #include <GEOM_VertexSource.h>
6 #include <GEOM_EdgeSource.h>
7 #include <GEOM_WireframeFace.h>
8 #include <GEOM_ShadingFace.h>
9 #include <VTKViewer_TransformFilter.h>
10 #include <vtkAppendPolyData.h>
11 #include <VTKViewer_Transform.h>
13 HYDROGUI_Actor::HYDROGUI_Actor()
15 myVertexActor->GetDeviceActor()->SetMapper( myVertexActor->GetDeviceActor()->GetMapper() );
16 myIsolatedEdgeActor->GetDeviceActor()->SetMapper( myIsolatedEdgeActor->GetDeviceActor()->GetMapper() );
17 myOneFaceEdgeActor->GetDeviceActor()->SetMapper( myOneFaceEdgeActor->GetDeviceActor()->GetMapper() );
18 mySharedEdgeActor->GetDeviceActor()->SetMapper( mySharedEdgeActor->GetDeviceActor()->GetMapper() );
19 myWireframeFaceActor->GetDeviceActor()->SetMapper( myWireframeFaceActor->GetDeviceActor()->GetMapper() );
20 myShadingFaceActor->SetInput(myShadingFaceSource->GetOutputPort(),false);
21 myShadingFaceActor->GetDeviceActor()->SetMapper( myShadingFaceActor->GetDeviceActor()->GetMapper() );
22 GEOM_Actor::myHighlightActor->GetDeviceActor()->SetMapper( GEOM_Actor::myHighlightActor->GetDeviceActor()->GetMapper() );
26 HYDROGUI_Actor::~HYDROGUI_Actor()
30 HYDROGUI_Actor* HYDROGUI_Actor::New()
32 HYDROGUI_Actor* anObject = new HYDROGUI_Actor();
33 anObject->SetMapper( anObject->myPolyDataMapper.Get());
37 void HYDROGUI_Actor::SetMapper( vtkMapper* theMapper )
39 SALOME_Actor::SetMapper( theMapper );
42 void HYDROGUI_Actor::SetTransform( VTKViewer_Transform* theTransform )
44 Superclass::SetTransform(theTransform);
45 myVertexActor ->GetDeviceActor()->SetTransform( theTransform );
46 myIsolatedEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
47 myOneFaceEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
48 mySharedEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
49 myWireframeFaceActor->GetDeviceActor()->SetTransform( theTransform );
50 myShadingFaceActor ->GetDeviceActor()->SetTransform( theTransform );
51 GEOM_Actor::myHighlightActor->GetDeviceActor()->SetTransform( theTransform );
54 void HYDROGUI_Actor::SetShape( const TopoDS_Shape& theShape,
58 GEOM_Actor::SetShape( theShape, theDeflection, theIsVector );
60 if( myIsolatedEdgeSource->IsEmpty() )
61 myIsolatedEdgeActor->GetDeviceActor()->SetInfinitive( true );
63 if( myOneFaceEdgeSource->IsEmpty() )
64 myOneFaceEdgeActor->GetDeviceActor()->SetInfinitive( true );
66 if( mySharedEdgeSource->IsEmpty() )
67 mySharedEdgeActor->GetDeviceActor()->SetInfinitive( true );
69 if( myWireframeFaceSource->IsEmpty() )
70 myWireframeFaceActor->GetDeviceActor()->SetInfinitive( true );
72 if( myShadingFaceSource->IsEmpty() )
74 myShadingFaceActor->GetDeviceActor()->SetInfinitive( true );
78 myShadingFaceSource->Update();