+#include "utilities.h"
+
+#include "SALOME_InteractiveObject.hxx"
+
+//vtkStandardNewMacro(GEOM_Actor);
+
+#ifndef MYDEBUG
+//#define MYDEBUG
+#endif
+
+GEOM_Actor::GEOM_Actor():
+ isOnlyVertex(false),
+
+ myDeflection(-1),
+ myIsForced(false),
+
+ // myDisplayMode(eWireframe),
+ myIsSelected(false),
+ myVectorMode(false),
+ myVerticesMode(false),
+ myNameMode(false),
+
+ myVertexActor(GEOM_DeviceActor::New(),true),
+ myVertexSource(GEOM_VertexSource::New(),true),
+
+ myStandaloneVertexActor(GEOM_DeviceActor::New(),true),
+ myStandaloneVertexSource(GEOM_VertexSource::New(),true),
+
+ myIsolatedEdgeActor(GEOM_DeviceActor::New(),true),
+ myIsolatedEdgeSource(GEOM_EdgeSource::New(),true),
+
+ myOneFaceEdgeActor(GEOM_DeviceActor::New(),true),
+ myOneFaceEdgeSource(GEOM_EdgeSource::New(),true),
+
+ mySharedEdgeActor(GEOM_DeviceActor::New(),true),
+ mySharedEdgeSource(GEOM_EdgeSource::New(),true),
+
+ myWireframeFaceActor(GEOM_DeviceActor::New(),true),
+ myWireframeFaceSource(GEOM_WireframeFace::New(),true),
+
+ myShadingFaceActor(GEOM_DeviceActor::New(),true),
+ myShadingFaceSource(GEOM_ShadingFace::New(),true),
+
+ myHighlightActor(GEOM_DeviceActor::New(),true),
+ myAppendFilter(vtkAppendPolyData::New(),true),
+ // Use mapper as an instance of GEOM_PainterPolyDataMapper class
+ // to prevent drawing of mappers' content (due to an empty definition
+ // of GEOM_PainterPolyDataMapper::RenderPiece(...)).
+ // !!! Presentation of GEOM_Actor is drawing only with help of actors
+ // defined in this class !!!
+ myPolyDataMapper(GEOM_PainterPolyDataMapper::New(),true),
+
+ myTextActor( vtkTextActor::New() ),
+
+ myHighlightProp(vtkProperty::New()),
+ myPreHighlightProp(vtkProperty::New()),
+ myShadingFaceProp(vtkProperty::New()),
+ myShadingBackFaceProp(vtkProperty::New())
+{
+#ifdef MYDEBUG
+ MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
+#endif
+
+ myPolyDataMapper->SetInputConnection(myAppendFilter->GetOutputPort());
+ vtkProperty* aProperty;
+
+ myHighlightProp->SetAmbient(0.5);
+ myHighlightProp->SetDiffuse(0.3);
+ myHighlightProp->SetSpecular(0.2);
+ myHighlightProp->SetRepresentationToSurface();
+ myHighlightProp->SetAmbientColor(1, 1, 1);
+ myHighlightProp->SetDiffuseColor(1, 1, 1);
+ myHighlightProp->SetSpecularColor(0.5, 0.5, 0.5);
+ myHighlightProp->SetPointSize(SALOME_POINT_SIZE+2);
+ myHighlightActor->SetProperty(myHighlightProp.GetPointer());
+
+ this->myHighlightActor->SetInput(myAppendFilter->GetOutputPort(),false);
+
+ myPreHighlightProp->SetColor(0,1,1);
+ myPreHighlightProp->SetPointSize(SALOME_POINT_SIZE);
+ myPreHighlightProp->SetLineWidth(SALOME_LINE_WIDTH+1);
+ myPreHighlightProp->SetRepresentationToWireframe();