]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/boxSurfaceObserver.cxx
b1a90221e1fc235be234cfcbe00474faff363458
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / boxSurfaceObserver.cxx
1
2 #include "boxSurfaceObserver.h"
3 #include "vtkBoxWidget.h"
4
5 void boxSurfaceObserver::Execute(vtkObject *wdg, unsigned long eventId, void* calldata) {  // virtual
6         vtkBoxWidget *boxwidget = reinterpret_cast<vtkBoxWidget*>(wdg);
7         boxwidget->GetPlanes(_planes);
8
9         if ( _vtkVolumeRayCastMapper != NULL )
10         {
11                 _vtkVolumeRayCastMapper->RemoveAllClippingPlanes();
12 //              vtkPlanes *planes = vtkPlanes::New();
13 //              boxwidget->GetPlanes(planes);
14 //              _vtkVolumeRayCastMapper->SetClippingPlanes(planes);
15                 _vtkVolumeRayCastMapper->SetClippingPlanes(_planes);
16         }
17
18 //      _actor->VisibilityOn();
19
20 }
21 //-------------------------------------------------------------------
22 void boxSurfaceObserver::SetPlanes(vtkPlanes *planes){
23         _planes = planes;
24 }
25 //-------------------------------------------------------------------
26 void boxSurfaceObserver::SetActor(vtkProp *actor){
27         _actor = actor;
28 }
29
30 //-------------------------------------------------------------------
31 void boxSurfaceObserver::SetvtkVolumeRayCastMapper(vtkVolumeRayCastMapper *vtkvolumeraycastmapper)
32 {
33         _vtkVolumeRayCastMapper = vtkvolumeraycastmapper;
34 }