// Module : VISU
// $Header$
-using namespace std;
-
#ifndef VISU_ACTOR_H
#define VISU_ACTOR_H
#include "SALOME_Actor.h"
+
#include <string>
class vtkProp;
-class vtkPolyData;
class vtkProperty;
-class vtkPolyDataMapper;
+class vtkDataSetMapper;
+
+class VTKViewer_ShrinkFilter;
+class VISU_PipeLine;
namespace VISU {
class Prs3d_i;
}
-class VISU_ScalarBarActor;
#ifdef _WIN_32
#define VTKOCC_EXPORT __declspec (dllexport)
vtkTypeMacro(VISU_Actor,SALOME_Actor);
void ShallowCopy(vtkProp *prop);
static VISU_Actor* New();
- ~VISU_Actor();
+ virtual ~VISU_Actor();
virtual void setIO(const Handle(SALOME_InteractiveObject)& theIO);
- VISU::Prs3d_i* getPrs3d(){ return myPrs3d;}
- virtual void setPrs3d(VISU::Prs3d_i* thePrs3d);
+ VISU::Prs3d_i* GetPrs3d(){ return myPrs3d;}
+ virtual void SetPrs3d(VISU::Prs3d_i* thePrs3d);
+
+ virtual VISU_PipeLine* GetPipeLine() { return myPipeLine;}
+ virtual void SetPipeLine(VISU_PipeLine* thePipeLine) ;
VISU_Actor* GetParent(){ return myParent;}
virtual void SetParent(VISU_Actor* theParent);
- void highlight(Standard_Boolean highlight);
- Standard_Boolean isHighlighted() { return true; };
+ virtual void SetOpacity(float theValue);
+ virtual float GetOpacity();
- void SetOpacity(float opa) {};
- float GetOpacity() { return 0;};
+ virtual void SetRepresentation(int theMode);
- virtual void SetMapper(vtkMapper* theMapper);
+ virtual bool IsShrunkable() { return myIsShrinkable;}
+ virtual bool IsShrunk() { return myIsShrunk;}
+ virtual void SetShrink();
+ virtual void UnShrink();
virtual void SetShrinkable(bool theIsShrinkable);
- virtual bool GetShrinkable() { return myIsShrinkable;}
-
- virtual bool isShrunk() { return myIsShrunk;}
- virtual void setShrink(float theFactor = 0.8);
- virtual void unShrink();
+ virtual void SetShrinkFactor(float theFactor = 0.8);
+ virtual float GetShrinkFactor();
virtual void SetVisibility(int theMode);
virtual int GetVisibility();
- virtual void SetProperty(vtkProperty* theProperty);
- virtual vtkProperty* GetProperty();
-
virtual void SetLineWidth(float theLineWidth);
virtual float GetLineWidth();
-
- virtual void SetRepresentation(int theMode);
- virtual int GetRepresentation();
-
- bool IsHighlighting;
- std::string myFieldName;
+
+ virtual int GetNodeObjId(int theVtkID);
+ virtual int GetElemObjId(int theVtkID);
protected:
VISU_Actor();
VISU_Actor* myParent;
VISU::Prs3d_i* myPrs3d;
- vtkProperty* HighlightProperty;
+ VISU_PipeLine* myPipeLine;
+ vtkDataSetMapper* myMapper;
+
+ VTKViewer_ShrinkFilter* myShrinkFilter;
bool myIsShrinkable;
bool myIsShrunk;
};
-//=======================================================================
-
-class VTKOCC_EXPORT VISUScalarMap_Actor : public VISU_Actor {
- public:
- vtkTypeMacro(VISUScalarMap_Actor,VISU_Actor);
- static VISUScalarMap_Actor* New();
- ~VISUScalarMap_Actor();
-
- virtual void AddToRender(vtkRenderer* theRenderer);
- virtual void RemoveFromRender(vtkRenderer* theRenderer);
-
- virtual void SetVisibility(int theMode);
- virtual int GetVisibility();
-
- virtual VISU_ScalarBarActor* GetScalarBar(){ return myScalarBar;}
-
- virtual void SetBarVisibility(const bool* theMode);
- virtual bool GetBarVisibility(){ return *myBarVisibility;}
-
- protected:
- VISUScalarMap_Actor();
- const bool* myBarVisibility;
- VISU_ScalarBarActor* myScalarBar;
-};
-
-//=======================================================================
-
-class VTKOCC_EXPORT VISUMesh_Actor : public VISU_Actor {
- public:
- vtkTypeMacro(VISUMesh_Actor,VISU_Actor);
- static VISUMesh_Actor* New();
- ~VISUMesh_Actor();
-
- virtual void setIO(const Handle(SALOME_InteractiveObject)& theIO);
- virtual void setPrs3d(VISU::Prs3d_i* thePrs3d);
-
- virtual void AddToRender(vtkRenderer* theRenderer);
- virtual void RemoveFromRender(vtkRenderer* theRenderer);
-
- virtual void SetMapper(vtkMapper* theMapper);
- virtual void SetTransform(SALOME_Transform* theTransform);
-
- virtual vtkProperty* GetProperty();
- virtual void SetProperty(vtkProperty* theProperty);
-
- virtual vtkProperty* GetEdgeProperty();
- virtual void SetEdgeProperty(vtkProperty* theProperty);
-
- virtual void SetLineWidth(float theLineWidth);
- virtual float GetLineWidth();
-
- virtual void SetRepresentation(int theMode);
- virtual int GetRepresentation() { return myRepresentation;};
-
- virtual void SetVisibility(int theMode);
- virtual int GetVisibility() { return myVisibility;}
-
- virtual void SetShrinkable(bool theIsShrinkable);
-
- virtual void setShrink(float theFactor = 0.8);
- virtual void unShrink();
-
- protected:
- VISUMesh_Actor();
- int myRepresentation, myVisibility;
- vtkPolyDataMapper* myEdgeMapper;
- VISU_Actor *mySurfaceActor, *myEdgeActor;
-};
-
-//=======================================================================
-
#endif //VISU_ACTOR_H
-
-