myHighlightProp(vtkProperty::New()),
myPreHighlightProp(vtkProperty::New()),
- myShadingFaceProp(vtkProperty::New())
-
+ myShadingFaceProp(vtkProperty::New()),
+ isOnlyVertex(false)
{
#ifdef MYDEBUG
MESSAGE (this<< " GEOM_Actor::GEOM_Actor");
myHighlightProp->SetAmbientColor(1, 1, 1);
myHighlightProp->SetDiffuseColor(1, 1, 1);
myHighlightProp->SetSpecularColor(0.5, 0.5, 0.5);
+ myHighlightProp->SetPointSize(SALOME_POINT_SIZE);
myHighlightActor->SetProperty(myHighlightProp.GetPointer());
this->myHighlightActor->SetInput(myAppendFilter->GetOutput(),false);
myOneFaceEdgeActor->SetVisibility(theVisibility && myDisplayMode == (int)eWireframe && !myIsSelected);
myIsolatedEdgeActor->SetVisibility(theVisibility && !myIsSelected);
-// myVertexActor->SetVisibility(false);// must be added new mode points
- myVertexActor->SetVisibility(theVisibility);
+ myVertexActor->SetVisibility(theVisibility && !myIsSelected);// must be added new mode points
}
// look if edges are free or shared
TopTools_IndexedDataMapOfShapeListOfShape anEdgeMap;
TopExp::MapShapesAndAncestors(theShape,TopAbs_EDGE,TopAbs_FACE,anEdgeMap);
-
+
SetShape(theShape,anEdgeMap,theIsVector);
+ isOnlyVertex =
+ myIsolatedEdgeSource->IsEmpty() &&
+ myOneFaceEdgeSource->IsEmpty() &&
+ mySharedEdgeSource->IsEmpty() &&
+ myWireframeFaceSource->IsEmpty() &&
+ myShadingFaceSource->IsEmpty();
+
+
+ if((bool)myShape.Infinite() || isOnlyVertex ){
+ myVertexActor->GetDeviceActor()->SetInfinitive(true);
+ myHighlightActor->GetDeviceActor()->SetInfinitive(true);
+ }
}
void GEOM_Actor::SetShape (const TopoDS_Shape& theShape,
this->Device->SetBackfaceProperty(this->BackfaceProperty);
}
this->Device->SetProperty(this->Property);
- if(myShape.ShapeType() == TopAbs_VERTEX) {
+ /* if(myShape.ShapeType() == TopAbs_VERTEX) {
if(ren){
//The parameter determine size of vertex actor relate to diagonal of RendererWindow
static vtkFloatingPointType delta = 0.01;
this->Device->SetUserMatrix(aMatrix);
this->Device->Render(ren,theMapper);
aMatrix->Delete();
- } else
+ } else*/
this->Device->Render(ren, theMapper);
}
myShadingFaceProp->SetOpacity(opa);
myHighlightProp->SetOpacity(opa);
myPreHighlightProp->SetOpacity(opa);
+ myVertexActor->GetProperty()->SetOpacity(opa);
}
vtkFloatingPointType GEOM_Actor::GetOpacity()
bool GEOM_Actor::IsInfinitive()
{
- return (bool)(myShape.Infinite());
+ return ((bool)myShape.Infinite() || isOnlyVertex);
}
/*!
#include <vtkPolyDataMapper.h>
#include <vtkPolyDataNormals.h>
#include <vtkActor.h>
-
+#include <VTKViewer_Actor.h>
#include <vtkRenderer.h>
vtkStandardNewMacro(GEOM_DeviceActor);
myStripper(vtkStripper::New(),true),
myPolyDataMapper(vtkPolyDataMapper::New(),true),
myPolyDataNormals(vtkPolyDataNormals::New(),true),
- myActor(vtkActor::New(),true)
+ myActor(VTKViewer_Actor::New(),true)
{
myStripper->SetInput(myPolyDataNormals->GetOutput());
myPolyDataMapper->SetInput(myStripper->GetOutput());