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->GetDeviceActor()->SetMapper( myShadingFaceActor->GetDeviceActor()->GetMapper() );
21 GEOM_Actor::myHighlightActor->GetDeviceActor()->SetMapper( GEOM_Actor::myHighlightActor->GetDeviceActor()->GetMapper() );
25 HYDROGUI_Actor::~HYDROGUI_Actor()
29 HYDROGUI_Actor* HYDROGUI_Actor::New()
31 HYDROGUI_Actor* anObject = new HYDROGUI_Actor();
32 anObject->SetMapper( anObject->myPolyDataMapper.Get());
36 void HYDROGUI_Actor::SetMapper( vtkMapper* theMapper )
38 SALOME_Actor::SetMapper( theMapper );
41 void HYDROGUI_Actor::SetTransform( VTKViewer_Transform* theTransform )
43 Superclass::SetTransform(theTransform);
44 myVertexActor ->GetDeviceActor()->SetTransform( theTransform );
45 myIsolatedEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
46 myOneFaceEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
47 mySharedEdgeActor ->GetDeviceActor()->SetTransform( theTransform );
48 myWireframeFaceActor->GetDeviceActor()->SetTransform( theTransform );
49 myShadingFaceActor ->GetDeviceActor()->SetTransform( theTransform );
50 GEOM_Actor::myHighlightActor->GetDeviceActor()->SetTransform( theTransform );
53 void HYDROGUI_Actor::SetShape( const TopoDS_Shape& theShape,
57 GEOM_Actor::SetShape( theShape, theDeflection, theIsVector );
59 if( myIsolatedEdgeSource->IsEmpty() )
60 myIsolatedEdgeActor->GetDeviceActor()->SetInfinitive( true );
62 if( myOneFaceEdgeSource->IsEmpty() )
63 myOneFaceEdgeActor->GetDeviceActor()->SetInfinitive( true );
65 if( mySharedEdgeSource->IsEmpty() )
66 mySharedEdgeActor->GetDeviceActor()->SetInfinitive( true );
68 if( myWireframeFaceSource->IsEmpty() )
69 myWireframeFaceActor->GetDeviceActor()->SetInfinitive( true );
71 if( myShadingFaceSource->IsEmpty() )
72 myShadingFaceActor->GetDeviceActor()->SetInfinitive( true );