theWidget->AddObserver(vtkCommand::DisableEvent,
myEventCallbackCommand.GetPointer(),
myPriority);
+ theWidget->AddObserver(vtkCommand::StartInteractionEvent,
+ myEventCallbackCommand.GetPointer(),
+ myPriority);
theWidget->AddObserver(vtkCommand::EndInteractionEvent,
myEventCallbackCommand.GetPointer(),
myPriority);
myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(NULL);
myOutsideDeviceActor->SetVisibility(false);
-
- myCurrentPL = myDeviceActor->GetPipeLine();
}
if(theWidget){
myOutsideDeviceActor->GetPipeLine()->SetImplicitFunction(theWidget->ImplicitFunction());
myOutsideDeviceActor->SetVisibility(GetVisibility() && theWidget->IsEnabled());
-
- myCurrentPL = myInsideDeviceActor->GetPipeLine();
}
Superclass::SetImplicitFunctionWidget(theWidget);
::OnInteractorEvent(unsigned long theEvent)
{
switch(theEvent){
+ case vtkCommand::StartInteractionEvent:
+ myDeviceActor->SetVisibility(GetVisibility());
+ myInsideDeviceActor->SetVisibility(false);
+ myOutsideDeviceActor->SetVisibility(false);
+ break;
case vtkCommand::EnableEvent:
case vtkCommand::DisableEvent:
+ case vtkCommand::EndInteractionEvent:
myDeviceActor->SetVisibility(GetVisibility() && !myWidget->IsEnabled());
myInsideDeviceActor->SetVisibility(GetVisibility() && myWidget->IsEnabled());
myOutsideDeviceActor->SetVisibility(GetVisibility() && myWidget->IsEnabled());
default:
break;
}
-
-
- switch(theEvent){
- case vtkCommand::EnableEvent:
- myCurrentPL = myInsideDeviceActor->GetPipeLine();
- break;
- case vtkCommand::DisableEvent:
- myCurrentPL = myDeviceActor->GetPipeLine();
- break;
- default:
- break;
- }
Superclass::OnInteractorEvent(theEvent);
}
#include <vtkPolyData.h>
#include <vtkRenderer.h>
#include <vtkTextProperty.h>
+#include <vtkProperty.h>
+#include <vtkTexture.h>
+
#include "utilities.h"
#ifdef _DEBUG_
}
+//----------------------------------------------------------------
+void
+VISU_GaussPtsDeviceActor
+::Render(vtkRenderer *ren, vtkMapper *vtkNotUsed(m))
+{
+ if (this->Mapper == NULL)
+ {
+ vtkErrorMacro("No mapper for actor.");
+ return;
+ }
+
+ // render the property
+ if (!this->Property)
+ {
+ // force creation of a property
+ this->GetProperty();
+ }
+ this->Property->Render(this, ren);
+ if (this->BackfaceProperty)
+ {
+ this->BackfaceProperty->BackfaceRender(this, ren);
+ this->Device->SetBackfaceProperty(this->BackfaceProperty);
+ }
+ this->Device->SetProperty(this->Property);
+
+ // render the texture
+ if (this->Texture)
+ {
+ this->Texture->Render(ren);
+ }
+
+ // make sure the device has the same matrix
+ vtkMatrix4x4 *matrix = this->Device->GetUserMatrix();
+ this->GetMatrix(matrix);
+
+ this->Device->Render(ren,Mapper);
+ this->EstimatedRenderTime = Mapper->GetTimeToDraw();
+}
+
+
//----------------------------------------------------------------
void
VISU_GaussPtsDeviceActor