return 1;
}
+//----------------------------------------------------------------------------
+vtkStandardNewMacro(VVTK_Renderer);
+
+//----------------------------------------------------------------------------
+VVTK_Renderer
+::VVTK_Renderer():
+ myFPSActor(VISU_FPSActor::New())
+{
+ if(MYDEBUG) INFOS("VVTK_Renderer() - "<<this);
+
+ myFPSActor->Delete();
+
+ vtkTextMapper* aTextMapper = vtkTextMapper::New();
+ vtkTextProperty *aTextProperty = aTextMapper->GetTextProperty();
+ aTextProperty->SetJustificationToRight();
+ aTextProperty->SetVerticalJustificationToTop();
+ aTextProperty->SetFontSize(10);
+
+ myFPSActor->SetPickable(false);
+ myFPSActor->ScaledTextOff();
+ myFPSActor->SetAlignmentPoint(8);
+ myFPSActor->SetPosition2 (1., 1.);
+ myFPSActor->SetMapper(aTextMapper);
+ aTextMapper->Delete();
+
+ GetDevice()->AddActor2D(myFPSActor.GetPointer());
+}
+
+VVTK_Renderer
+::~VVTK_Renderer()
+{
+ if(MYDEBUG) INFOS("~VVTK_Renderer() - "<<this);
+}
+
+
//----------------------------------------------------------------------------
vtkStandardNewMacro(VVTK_Renderer1);
//----------------------------------------------------------------------------
VVTK_Renderer1
::VVTK_Renderer1():
- myImplicitFunctionWidget(VISU_ImplicitFunctionWidget::New()),
- myTextActor(VISU_FPSActor::New())
+ myImplicitFunctionWidget(VISU_ImplicitFunctionWidget::New())
{
if(MYDEBUG) INFOS("VVTK_Renderer1() - "<<this);
aPlaneProperty->SetOpacity(aSelectedPlaneProperty->GetOpacity()*1.5);
myImplicitFunctionWidget->Delete();
- myTextActor->Delete();
-
- vtkTextMapper* aTextMapper = vtkTextMapper::New();
- vtkTextProperty *aTextProperty = aTextMapper->GetTextProperty();
- aTextProperty->SetJustificationToRight();
- aTextProperty->SetVerticalJustificationToTop();
- aTextProperty->SetFontSize(10);
-
- myTextActor->SetPickable(false);
- myTextActor->ScaledTextOff();
- myTextActor->SetAlignmentPoint(8);
- myTextActor->SetPosition2 (1., 1.);
- myTextActor->SetMapper(aTextMapper);
- aTextMapper->Delete();
-
- GetDevice()->AddActor2D(myTextActor.GetPointer());
}
VVTK_Renderer1
VVTK_Renderer2
::OnEndInteractionEvent()
{
+ AdjustActors();
myInteractor->Render();
}
class vtkImplicitFunction;
//----------------------------------------------------------------------------
-class VVTK_EXPORT VVTK_Renderer1 : public SVTK_Renderer
+class VVTK_EXPORT VVTK_Renderer : public SVTK_Renderer
+{
+ public:
+ vtkTypeMacro(VVTK_Renderer,SVTK_Renderer);
+ static VVTK_Renderer* New();
+
+ protected:
+ VVTK_Renderer();
+ ~VVTK_Renderer();
+
+ vtkSmartPointer<VISU_FPSActor> myFPSActor;
+};
+
+
+//----------------------------------------------------------------------------
+class VVTK_EXPORT VVTK_Renderer1 : public VVTK_Renderer
{
public:
vtkTypeMacro(VVTK_Renderer1,SVTK_Renderer);
//----------------------------------------------------------------------------
-class VVTK_EXPORT VVTK_Renderer2 : public SVTK_Renderer
+class VVTK_EXPORT VVTK_Renderer2 : public VVTK_Renderer
{
public:
vtkTypeMacro(VVTK_Renderer2,SVTK_Renderer);