VISU_GaussPointsPL* aPipeLine = dynamic_cast<VISU_GaussPointsPL*>(thePipeLine);
myInsideDeviceActor->ShallowCopyPL(aPipeLine);
+
+ // Restore implicit function
+ if(myWidget){
+ vtkImplicitFunction* aFunction = myWidget->ImplicitFunction();
+ myInsideDeviceActor->GetPipeLine()->SetImplicitFunction(aFunction);
+ }
}
//----------------------------------------------------------------------------
VISU_GaussPtsAct1
::UpdateOutsideCursorSettings()
{
- VISU_OpenGLPointSpriteMapper* aMapper = myOutsideDeviceActor->GetPSMapper();
-
- aMapper->SetImageData(myOutsideCursorSettings->GetTexture());
+ VISU_GaussPointsPL* aPipeline = myOutsideDeviceActor->GetPipeLine();
- aMapper->SetPointSpriteResults(false);
- aMapper->SetPointSpriteClamp(myOutsideCursorSettings->GetClamp());
- aMapper->SetPointSpriteAlphaThreshold(myOutsideCursorSettings->GetAlphaThreshold());
- aMapper->SetPointSpriteSize(myOutsideCursorSettings->GetSize());
+ aPipeline->SetClamp( myOutsideCursorSettings->GetClamp() );
+ aPipeline->SetImageData( myOutsideCursorSettings->GetTexture() );
+ aPipeline->SetAlphaThreshold( myOutsideCursorSettings->GetAlphaThreshold() );
+ aPipeline->SetSize( myOutsideCursorSettings->GetSize() );
+ myOutsideDeviceActor->GetPSMapper()->SetPointSpriteResults(false);
myOutsideDeviceActor->GetProperty()->SetColor(myOutsideCursorSettings->GetColor());
Update();
VISU_GaussPtsDeviceActor
::VISU_GaussPtsDeviceActor():
- myMapper(VISU_OpenGLPointSpriteMapper::New()),
myGeomFilter(VTKViewer_GeometryFilter::New()),
myTransformFilter(VTKViewer_TransformFilter::New())
{
if(MYDEBUG) MESSAGE("VISU_GaussPtsDeviceActor - "<<this);
- myMapper->Delete();
myGeomFilter->Delete();
myTransformFilter->Delete();
theRenderer->RemoveActor(this);
}
-
-//----------------------------------------------------------------
-void
-VISU_GaussPtsDeviceActor
-::SetDataSet(vtkPolyData* theDataSet)
-{
- int anId = 0;
- myPassFilter[ anId ]->SetInput( theDataSet );
- myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
-
- anId++;
- myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
-
- anId++;
- myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
-
- myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
-
- vtkLODActor::SetMapper( myMapper.GetPointer() );
-}
-
void
VISU_GaussPtsDeviceActor
::SetTransform(VTKViewer_Transform* theTransform)
::SetPipeLine(VISU_GaussPointsPL* thePipeLine)
{
myPipeLine = thePipeLine;
- SetDataSet(thePipeLine->GetPSMapper()->GetInput());
+ myMapper = thePipeLine->GetPSMapper();
+ vtkPolyData* aDataSet = myMapper->GetInput();
+
+ int anId = 0;
+ myPassFilter[ anId ]->SetInput( aDataSet );
+ myPassFilter[ anId + 1 ]->SetInput( myPassFilter[ anId ]->GetOutput() );
+
+ anId++;
+ myTransformFilter->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+
+ anId++;
+ myPassFilter[ anId ]->SetInput( myTransformFilter->GetOutput() );
+
+ myMapper->SetInput( myPassFilter[ anId ]->GetPolyDataOutput() );
+
+ vtkLODActor::SetMapper( myMapper.GetPointer() );
}
VISU_GaussPointsPL*
::ShallowCopyPL(VISU_GaussPointsPL* thePipeLine)
{
myPipeLine->ShallowCopy(thePipeLine);
- GetPSMapper()->ShallowCopy(thePipeLine->GetMapper());
-
- // To restore mapper input from pipeline
- SetDataSet(myPipeLine->GetPSMapper()->GetInput());
}