float
GetRadius(vtkIdType theVTKID,
vtkDataArray *theScalarArray,
- VISU_GaussPointsPL* theGaussPointsPL,
- VISU_PickingSettings* thePickingSettings)
+ VISU_GaussPointsPL* theGaussPointsPL)
{
float aRadius = 0.5;
- if(thePickingSettings && !thePickingSettings->GetInitial()){
- aRadius *= thePickingSettings->GetCursorSize();
- }
if(theGaussPointsPL->GetPSMapper()->GetPointSpriteMode() == 1) // Geometry mode
aRadius *= theGaussPointsPL->GetSize() * theGaussPointsPL->GetAverageCellSize();
else if(theGaussPointsPL->GetBicolor()){
::GetRadius(vtkIdType theVTKID,
vtkDataArray *theScalarArray)
{
- return ::GetRadius(theVTKID,theScalarArray,myDeviceActor->GetPipeLine(),myPickingSettings);
+ return ::GetRadius(theVTKID,theScalarArray,myDeviceActor->GetPipeLine());
}
//----------------------------------------------------------------------------
aColor[0] = 1. - aColor[0];
aColor[1] = 1. - aColor[1];
aColor[2] = 1. - aColor[2];
+
myCursorPyramid->Init(aPyramidHeight,
+ myPickingSettings->GetCursorSize(),
GetRadius(aVtkId,aScalarArray),
GetMagnification(aVtkId),
GetClamp(anObjId),
float aPyramidHeight = myPickingSettings->GetPyramidHeight();
aPyramidHeight = aPyramidHeight*myGaussPointsPL->GetMaxPointSize();
myCursorPyramidSelected->Init(aPyramidHeight,
+ myPickingSettings->GetCursorSize(),
GetRadius(aVtkId,aScalarArray),
GetMagnification(aVtkId),
GetClamp(anObjId),
myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
float aHeight = myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
- myCursorPyramid->SetHeight(aHeight);
- myCursorPyramidSelected->SetHeight(aHeight);
+ float aCursorSize = myPickingSettings->GetCursorSize();
+ myCursorPyramid->SetPreferences(aHeight,aCursorSize);
+ myCursorPyramidSelected->SetPreferences(aHeight,aCursorSize);
myHighlightActor->GetProperty()->SetColor( myPickingSettings->GetColor() );
myPointPicker->SetTolerance( myPickingSettings->GetPointTolerance() );
else
aPipeLine = myInsideDeviceActor->GetPipeLine();
}
- return ::GetRadius(theVTKID,theScalarArray,aPipeLine,myPickingSettings);
+ return ::GetRadius(theVTKID,theScalarArray,aPipeLine);
}
this->SetScale(1.0);
float aMRadius = myRadius*myMagnification;
- Init(myHeight,aMRadius);
+ Init(myHeight,aMRadius*myCursorSize);
if(myClamp > 0.0f){
float aPoint1[3] = {0.0, 0.0, 0.0};
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
-::SetHeight(float theHeight)
+::SetPreferences(float theHeight,
+ float theCursorSize)
{
- Init(theHeight, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor());
+ Init(theHeight, theCursorSize, myRadius, myMagnification, myClamp, GetPosition(), GetProperty()->GetColor());
}
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
::Init(float theHeight,
+ float theCursorSize,
float theRadius,
float theMagnification,
float theClamp,
float thePos[3],
float theColor[3])
{
- Init(theHeight,theRadius*theMagnification);
+ Init(theHeight,theRadius*theMagnification*theCursorSize);
SetPosition(thePos[0],thePos[1],thePos[2]);
GetProperty()->SetColor(theColor);
SetMapper(myMapper.GetPointer());
myHeight = theHeight;
+ myCursorSize = theCursorSize;
+
myRadius = theRadius;
myMagnification = theMagnification;
+
myClamp = theClamp;
}