int GEOM_Actor::GetWidth() const {
return (int)myIsolatedEdgeActor->GetProperty()->GetLineWidth();
}
+
+void GEOM_Actor::SetTransform(VTKViewer_Transform* theTransform)
+{
+ Superclass::SetTransform(theTransform);
+
+ myStandaloneVertexActor->SetTransform(theTransform);
+ myStandaloneVertexActor->SetTransform(theTransform);
+ myIsolatedEdgeActor->SetTransform(theTransform);
+ myOneFaceEdgeActor->SetTransform(theTransform);
+ mySharedEdgeActor->SetTransform(theTransform);
+ myWireframeFaceActor->SetTransform(theTransform);
+ myShadingFaceActor->SetTransform(theTransform);
+ myHighlightActor->SetTransform(theTransform);
+
+ Modified();
+}
#include <vtkStripper.h>
#include <vtkPolyDataMapper.h>
#include <vtkPolyDataNormals.h>
-#include <vtkActor.h>
-#include <VTKViewer_Actor.h>
+#include <vtkActor.h>
#include <vtkRenderer.h>
+
+#include <VTKViewer_Actor.h>
+#include <VTKViewer_Transform.h>
+#include <VTKViewer_TransformFilter.h>
+
vtkStandardNewMacro(GEOM_DeviceActor);
-GEOM_DeviceActor::GEOM_DeviceActor():
- myStripper(vtkStripper::New(),true),
- myPolyDataMapper(vtkPolyDataMapper::New(),true),
- myPolyDataNormals(vtkPolyDataNormals::New(),true),
- myActor(VTKViewer_Actor::New(),true)
+GEOM_DeviceActor::GEOM_DeviceActor() :
+ myStripper(vtkStripper::New(), true),
+ myPolyDataMapper(vtkPolyDataMapper::New(), true),
+ myPolyDataNormals(vtkPolyDataNormals::New(), true),
+ myActor(VTKViewer_Actor::New(), true),
+ myTransformFilter(VTKViewer_TransformFilter::New())
{
- myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort());
- myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort());
+ myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort());
+ myTransformFilter->SetInputConnection(myStripper->GetOutputPort());
+ myPolyDataMapper->SetInputConnection(myTransformFilter->GetOutputPort());
myActor->SetMapper(myPolyDataMapper.Get());
myActor->PickableOff();
if(theUseStripper)
{
myPolyDataNormals->SetInputConnection(thePolyData);
- myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort());
- myPolyDataMapper->SetInputConnection(myStripper->GetOutputPort());
+ myStripper->SetInputConnection(myPolyDataNormals->GetOutputPort());
+ myTransformFilter->SetInputConnection(myStripper->GetOutputPort());
+ myPolyDataMapper->SetInputConnection(myTransformFilter->GetOutputPort());
}
- else
- myPolyDataMapper->SetInputConnection(thePolyData);
+ else
+ myTransformFilter->SetInputConnection(thePolyData);
+ myPolyDataMapper->SetInputConnection(myTransformFilter->GetOutputPort());
}
void
{
theRenderer->RemoveActor(myActor.GetPointer());
}
+
+void
+GEOM_DeviceActor
+::SetTransform(VTKViewer_Transform* theTransform)
+{
+ myTransformFilter->SetTransform(theTransform);
+}
//class vtkActor;
class VTKViewer_Actor;
+class VTKViewer_Transform;
+class VTKViewer_TransformFilter;
typedef GEOM_SmartPtr<VTKViewer_Actor> PActor;
+typedef GEOM_SmartPtr<VTKViewer_TransformFilter> PTransformFilter;
class vtkProperty;
class vtkRenderer;
void RemoveFromRender(vtkRenderer* theRenderer);
PActor GetDeviceActor() {return myActor;}
+
+ virtual void SetTransform(VTKViewer_Transform* theTransform);
protected:
PPolyDataNormals myPolyDataNormals;
PPolyDataMapper myPolyDataMapper;
PStripper myStripper;
- PActor myActor;
+ PActor myActor;
+ PTransformFilter myTransformFilter;
GEOM_DeviceActor();
~GEOM_DeviceActor();