#include <AIS_DisplayMode.hxx>
#include <Prs3d_IsoAspect.hxx>
#include <SelectMgr_SequenceOfOwner.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <TopoDS_Face.hxx>
#include <QColor>
#include <QString>
-const Quantity_Color EDGES_COLOR = Quantity_NOC_WHITE;
+const Quantity_Color EDGES_COLOR = Quantity_NOC_SLATEGRAY;
const int HILIGHT_ISO_NB = 10;
IMPLEMENT_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape )
void HYDROGUI_LandCoverMapPrs::UpdateColors()
{
- if( !myLCMap.IsNull() )
- SetTransparency( myLCMap->GetTransparency() );
-
- Set( myLCMap->GetShape() );
SetMaterial( Graphic3d_NOM_PLASTIC );
- HYDROData_LandCoverMap::Iterator anIt( myLCMap );
+ if( myLCMap.IsNull() )
+ {
+ Set( TopoDS_Shape() );
+ return;
+ }
+
+ Set( myLCMap->GetShape() );
+ HYDROData_LandCoverMap::Explorer anIt( myLCMap );
for( ; anIt.More(); anIt.Next() )
{
TopoDS_Face aFace = anIt.Face();
Quantity_Color aColor = GetColor( aStricklerType );
SetCustomColor( aFace, aColor );
SetCustomWidth( aFace, 1.0 );
- }
+ }
+ SetTransparency( myLCMap->GetTransparency() );
}
-Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
+Handle(AIS_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
{
return myColorScale;
}
-void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(Aspect_ColorScale)& theColorScale )
+void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(AIS_ColorScale)& theColorScale )
{
myColorScale = theColorScale;
double aMin = 0, aMax = 0;
}
if( theMode==AIS_Shaded )
- StdPrs_WFDeflectionShape::Add( thePresentation, Shape(), myDrawer );
+ StdPrs_WFShape::Add( thePresentation, Shape(), myDrawer );
}
void HYDROGUI_LandCoverMapPrs::HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
{
Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast( theOwners.Value( i ) );
if( !anOwner.IsNull() )
- StdPrs_WFDeflectionShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
+ StdPrs_WFShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
}
HilightAttributes()->UIsoAspect()->SetNumber( 0 );