/*!
Change material
\param theIObject - object
- \param thePropF - property contained new properties of material
+ \param thePropF - property contained new properties of front material
+ \param thePropB - property contained new properties of back material
*/
void
SVTK_View
::SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
- vtkProperty* thePropF)
+ vtkProperty* thePropF, vtkProperty* thePropB)
{
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*> >
(&SALOME_Actor::SetMaterial,aProps));
}
-/*!
- Get current front material
- \param theIObject - object
- \return property contained material properties of the given object
-*/
-vtkProperty*
-SVTK_View
-::GetMaterial(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->GetMaterial();
+/*!\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
+ return anActor->GetBackMaterial();
return NULL;
}
//! Change material
void
SetMaterial(const Handle(SALOME_InteractiveObject)& theIObject,
- vtkProperty* thePropF);
+ vtkProperty* thePropF, vtkProperty* thePropB);
- //! Get current material
+ //! Get current front material
vtkProperty*
- GetMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
+ GetFrontMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
+
+ //! Get current back material
+ vtkProperty*
+ GetBackMaterial(const Handle(SALOME_InteractiveObject)& theIObject);
//----------------------------------------------------------------------------
// Erase Display functions