vtkDataSet* aDataSet = GetInput();
vtkPointData* aPointData = aDataSet->GetPointData();
if(vtkDataArray *aScalarArray = aPointData->GetScalars()){
- vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
- aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
- //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
- vtkFloatingPointType aColor[3];
- theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
- aColor[0] = 1. - aColor[0];
- aColor[1] = 1. - aColor[1];
- aColor[2] = 1. - aColor[2];
-
- myCursorPyramid->Init(aPyramidHeight,
- myPickingSettings->GetCursorSize(),
- GetRadius(anObjId,aVtkId,aScalarArray),
- GetMagnification(anObjId),
- GetClamp(anObjId),
- aNodeCoord,
- aColor);
+ if ( myPickingSettings ){
+ vtkFloatingPointType aPyramidHeight = myPickingSettings->GetPyramidHeight();
+ aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
+ //vtkFloatingPointType aColor[3] = myPreHighlightActor->GetProperty()->GetColor();
+ vtkFloatingPointType aColor[3];
+ theInteractorStyle->GetCurrentRenderer()->GetBackground( aColor );
+ aColor[0] = 1. - aColor[0];
+ aColor[1] = 1. - aColor[1];
+ aColor[2] = 1. - aColor[2];
+
+ myCursorPyramid->Init(aPyramidHeight,
+ myPickingSettings->GetCursorSize(),
+ GetRadius(anObjId,aVtkId,aScalarArray),
+ GetMagnification(anObjId),
+ GetClamp(anObjId),
+ aNodeCoord,
+ aColor);
+ }
}
myLastPreHighlightObjID = anObjId;
}
vtkIdType theInitialHasIndex,
vtkIdType theCurrentHasIndex)
{
- if(theInitialHasIndex + theCurrentHasIndex == 1){
+ if( (theInitialHasIndex + theCurrentHasIndex == 1) && thePickingSettings){
vtkCamera *aCamera = theRenderer->GetActiveCamera();
vtkFloatingPointType aZoomFactor = thePickingSettings->GetZoomFactor();
if(!mySelector.GetPointer())
return;
+ if ( !myPickingSettings )
+ {
+ Superclass::Highlight(theIsHighlight);
+ return;
+ }
+
Selection_Mode aSelectionMode = mySelector->SelectionMode();
bool anInitialHasIndex = isHighlighted() && mySelectionMode == GaussPointSelection;