myCursorPyramid(VISU_CursorPyramid::New()),
myCursorPyramidSelected(VISU_CursorPyramid::New()),
myCellSource(vtkUnstructuredGrid::New()),
- myCellActor(vtkActor::New()),
+ myCellActor(SVTK_Actor::New()),
myScalarBarCtrl(VISU_ScalarBarCtrl::New()),
myBarVisibility(true),
myPickingSettings(NULL),
myTextActor->SetVisibility(false);
myTextActor->SetPickable(false);
- //
+
myCellSource->Allocate();
- vtkDataSetMapper* aCellMapper = vtkDataSetMapper::New();
- aCellMapper->SetInput(myCellSource.GetPointer());
- myCellActor->SetMapper(aCellMapper);
+ myCellActor->Initialize();
+ myCellActor->SetRepresentation(VTK_WIREFRAME);
+ myCellActor->SetSource(myCellSource.GetPointer());
+
+ //vtkDataSetMapper* aCellMapper = vtkDataSetMapper::New();
+ //aCellMapper->SetInput(myCellSource.GetPointer());
+ //myCellActor->SetMapper(aCellMapper);
+
myCellActor->SetVisibility(0);
myCellActor->SetPickable(0);
myCellActor->GetProperty()->SetAmbient(1.0);
myCellActor->GetProperty()->SetDiffuse(0.0);
- myCellActor->GetProperty()->SetRepresentationToWireframe();
+ //myCellActor->GetProperty()->SetRepresentationToWireframe();
myScalarBarCtrl->Delete();
myScalarBarCtrl->SetMode(0);
myDeviceActor->AddToRender(theRenderer);
theRenderer->AddActor(myTextActor.GetPointer());
- theRenderer->AddActor(myCellActor.GetPointer());
+ //theRenderer->AddActor(myCellActor.GetPointer());
+ myCellActor->AddToRender(theRenderer);
myCursorPyramid->AddToRender(theRenderer);
myCursorPyramidSelected->AddToRender(theRenderer);
myDeviceActor->RemoveFromRender(theRenderer);
theRenderer->RemoveActor(myTextActor.GetPointer());
- theRenderer->RemoveActor(myCellActor.GetPointer());
+ //theRenderer->RemoveActor(myCellActor.GetPointer());
+ myCellActor->RemoveFromRender(theRenderer);
myCursorPyramid->RemoveFromRender(theRenderer);
myCursorPyramidSelected->RemoveFromRender(theRenderer);
vtkIdType aCellID = aGaussPointID.first;
vtkCell* aCell = aParent->GetElemCell(aCellID);
myCellSource->InsertNextCell(aCell->GetCellType(),aCell->GetPointIds());
- myCellActor->GetProperty()->SetRepresentationToWireframe(); // VTK bug
+ //myCellActor->GetProperty()->SetRepresentationToWireframe(); // VTK bug
myCellActor->SetVisibility(anIsVisible && theIsHighlight);
+ myCellActor->SetRepresentation(VTK_WIREFRAME);
}
}
}