/*!
Change material
\param theIObject - object
- \param thePropF - property contained new properties of front material
- \param thePropB - property contained new properties of back material
+ \param thePropF - property contained new properties of material
*/
void
SVTK_View
::SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
- vtkProperty* thePropF,
- vtkProperty* thePropB)
+ vtkProperty* thePropF)
{
using namespace SVTK;
VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
std::vector<vtkProperty*> aProps;
aProps.push_back( thePropF );
- aProps.push_back( thePropB );
ForEachIf<SALOME_Actor>(aCopy.GetActors(),
TIsSameIObject<SALOME_Actor>(theIObject),
TSetFunction<SALOME_Actor,std::vector<vtkProperty*> >
/*!
Get current front material
\param theIObject - object
- \return property contained front material properties of the given object
+ \return property contained material properties of the given object
*/
vtkProperty*
SVTK_View
-::GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
+::GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject)
{
using namespace SVTK;
VTK::ActorCollectionCopy aCopy(getRenderer()->GetActors());
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 anActor->GetMaterial();
return NULL;
}
//! Change material
void
SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
- vtkProperty* thePropF,
- vtkProperty* thePropB);
+ vtkProperty* thePropF);
- //! Get current front material
+ //! Get current material
vtkProperty*
- GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
-
- //! Get current back material
- vtkProperty*
- GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
+ GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
//----------------------------------------------------------------------------
// Erase Display functions