myChangeMagnification = theEvent == VISU::SetSMIncreaseMagnificationEvent;
myUpdatePrs3dSignal(this);
break;
+ case VISU::UpdatePickingSettingsEvent:
+ UpdatePickingSettings();
+ break;
default:
break;
}
::UpdatePickingSettings()
{
// Update picking parameters using myPickingSettings object
-
+ myTextActor->SetModePosition(myPickingSettings->GetInfoWindowPosition());
+ myTextActor->SetTransparency(myPickingSettings->GetInfoWindowTransparency());
+ float aHeight=
+ myGaussPointsPL->GetMaxPointSize()*myPickingSettings->GetPyramidHeight();
+ myCursorPyramid->SetHeight(aHeight);
+ myCursorPyramidSelected->SetHeight(aHeight);
+ //
Update();
}
for(int i = 0; i < myNbCones; ++i)
myActors[i]->SetVisibility(theVisibility);
}
-
+//----------------------------------------------------------------------------
+void VISU_CursorPyramid::SetHeight(float theHeight)
+{
+ Init(theHeight, myRadius, myPos, myColor);
+}
//----------------------------------------------------------------------------
void
VISU_CursorPyramid
float thePos[3],
float theColor[3])
{
- for(int i = 0; i < myNbCones; ++i){
+ int i;
+ myHeight=theHeight;
+ myRadius=theRadius;
+ for (i=0; i<3; ++i){
+ myPos[i]=thePos[i];
+ myColor[i]=theColor[i];
+ }
+ for(i = 0; i < myNbCones; ++i){
mySources[i]->SetHeight(theHeight);
// Set the angle of the cone. As a side effect, the angle plus height sets
// the base radius of the cone.
::VISU_CursorPyramid():
myNbCones(6)
{
- for(int i = 0; i < myNbCones; i++){
+ int i;
+ for(i = 0; i < myNbCones; i++){
vtkConeSource* aConeSource = vtkConeSource::New();
aConeSource->SetResolution(4);
myActors[1]->SetOrientation(0. ,180.,0.);
myActors[3]->SetOrientation(0. , 0. ,180.);
myActors[5]->SetOrientation(180., 0. ,0.);
+ //
+ myHeight=10.;
+ myRadius=5.;
+ for(i = 0; i < 3; ++i){
+ myPos[i]=0.;
+ myColor[i]=1.;
+ }
}
#include <vtkViewport.h>
float theRadius,
float thePos[3],
float theColor[3]);
-
+
+ void SetHeight(float theHeight);
protected:
VISU_CursorPyramid();
vtkSmartPointer<vtkConeSource> mySources[6];
vtkSmartPointer<vtkPolyDataMapper> myMappers[6];
vtkSmartPointer<vtkActor> myActors[6];
+ //
+ float myHeight;
+ float myRadius;
+ float myPos[3];
+ float myColor[3];
};
//==================================================================
// class VISU_FramedTextActor