-// Copyright (C) 2007-2012 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024 CEA, EDF, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
#include "SVTK_Renderer.h"
#include "SVTK_ViewWindow.h"
#include "SVTK_RenderWindowInteractor.h"
-#include "SALOME_ListIteratorOfListIO.hxx"
+#include "SALOME_ListIO.hxx"
#include "VTKViewer_Algorithm.h"
#include "SVTK_Functor.h"
SVTK_View
::highlight( const Handle(SALOME_InteractiveObject)& theIO,
bool theIsHighlight,
- bool theIsUpdate )
+ bool /*theIsUpdate*/ )
{
using namespace SVTK;
VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
ForEachIf<SALOME_Actor>(aCopy.GetActors(),
TIsSameIObject<SALOME_Actor>(theIObject),
TSetFunction<SALOME_Actor,const char*,const char*>
- (&SALOME_Actor::setName,theName.toLatin1().data()));
+ (&SALOME_Actor::setName,theName.toUtf8().data()));
}
/*!
::SetTransparency(const Handle(SALOME_InteractiveObject)& theIObject,
float theTrans)
{
- vtkFloatingPointType anOpacity = 1.0 - theTrans;
+ double anOpacity = 1.0 - theTrans;
using namespace SVTK;
VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
ForEachIf<SALOME_Actor>(aCopy.GetActors(),
TIsSameIObject<SALOME_Actor>(theIObject),
- TSetFunction<SALOME_Actor,vtkFloatingPointType>
+ TSetFunction<SALOME_Actor,double>
(&SALOME_Actor::SetOpacity,anOpacity));
}
::SetColor(const Handle(SALOME_InteractiveObject)& theIObject,
const QColor& theColor)
{
- vtkFloatingPointType aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
+ double aColor[3] = {theColor.red()/255., theColor.green()/255., theColor.blue()/255.};
using namespace SVTK;
VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
ForEachIf<SALOME_Actor>(aCopy.GetActors(),
TIsSameIObject<SALOME_Actor>(theIObject),
- TSetFunction<SALOME_Actor,const vtkFloatingPointType*>
+ TSetFunction<SALOME_Actor,const double*>
(&SALOME_Actor::SetColor,aColor));
}
Find<SALOME_Actor>(aCopy.GetActors(),
TIsSameIObject<SALOME_Actor>(theIObject));
if(anActor){
- vtkFloatingPointType r,g,b;
+ double r,g,b;
anActor->GetColor(r,g,b);
return QColor(int(r*255),int(g*255),int(b*255));
}
(&SALOME_Actor::SetMaterial,aProps));
}
-/*!\r
- Get current front material\r
- \param theIObject - object\r
- \return property contained front material properties of the given object\r
-*/\r
-vtkProperty* \r
-SVTK_View\r
-::GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject)\r
-{\r
- using namespace SVTK;\r
- VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());\r
- SALOME_Actor* anActor = \r
- Find<SALOME_Actor>(aCopy.GetActors(),\r
- TIsSameIObject<SALOME_Actor>(theIObject));\r
- if(anActor)\r
- return anActor->GetFrontMaterial();\r
- return NULL;\r
-}\r
-\r
-/*!\r
- Get current back material\r
- \param theIObject - object\r
- \return property contained back material properties of the given object\r
-*/\r
-vtkProperty* \r
-SVTK_View\r
-::GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject)\r
-{\r
- using namespace SVTK;\r
- VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());\r
- SALOME_Actor* anActor = \r
- Find<SALOME_Actor>(aCopy.GetActors(),\r
- TIsSameIObject<SALOME_Actor>(theIObject));\r
- if(anActor)\r
+/*!
+ Get current front material
+ \param theIObject - object
+ \return property contained front material properties of the given object
+*/
+vtkProperty*
+SVTK_View
+::GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
+{
+ using namespace SVTK;
+ VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
+ SALOME_Actor* anActor =
+ Find<SALOME_Actor>(aCopy.GetActors(),
+ TIsSameIObject<SALOME_Actor>(theIObject));
+ if(anActor)
+ return anActor->GetFrontMaterial();
+ return NULL;
+}
+
+/*!
+ Get current back material
+ \param theIObject - object
+ \return property contained back material properties of the given object
+*/
+vtkProperty*
+SVTK_View
+::GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
+{
+ using namespace SVTK;
+ VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
+ SALOME_Actor* anActor =
+ Find<SALOME_Actor>(aCopy.GetActors(),
+ TIsSameIObject<SALOME_Actor>(theIObject));
+ if(anActor)
return anActor->GetBackMaterial();
return NULL;
}