#include <HYDROData_Tool.h>
#include <AIS_DisplayMode.hxx>
#include <Prs3d.hxx>
+#include <Prs3d_IsoAspect.hxx>
+#include <Prs3d_LineAspect.hxx>
+#include <Prs3d_ShadingAspect.hxx>
+#include <Graphic3d_AspectFillArea3d.hxx>
#include <Select3D_SensitiveBox.hxx>
#include <StdPrs_ShadedShape.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
#include <StdSelect.hxx>
#include <StdSelect_BRepOwner.hxx>
#include <StdSelect_BRepSelectionTool.hxx>
#include <QColor>
#include <QString>
+IMPLEMENT_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_Shape )
+IMPLEMENT_STANDARD_RTTIEXT( HYDROGUI_LandCoverMapPrs, AIS_Shape )
+
+HYDROGUI_LandCoverMapPrs::HYDROGUI_LandCoverMapPrs( const Handle(HYDROData_LandCoverMap)& theMap )
+ : AIS_Shape( TopoDS_Shape() )
+{
+ SetLandCoverMap( theMap );
+}
+
+HYDROGUI_LandCoverMapPrs::~HYDROGUI_LandCoverMapPrs()
+{
+}
+
Handle(HYDROData_LandCoverMap) HYDROGUI_LandCoverMapPrs::GetLandCoverMap() const
{
return myLCMap;
void HYDROGUI_LandCoverMapPrs::SetLandCoverMap( const Handle(HYDROData_LandCoverMap)& theMap )
{
myLCMap = theMap;
+ Set( theMap->GetShape() );
}
Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
if( myLCMap.IsNull() )
return;
+ thePresentation->Clear();
+ SetMaterial( Graphic3d_NOM_PLASTIC );
+
+ Quantity_Color anEdgeColor = Quantity_NOC_WHITE;
+ myDrawer->LineAspect()->SetColor( anEdgeColor );
+ myDrawer->FaceBoundaryAspect()->SetColor( anEdgeColor );
+ myDrawer->FreeBoundaryAspect()->SetColor( anEdgeColor );
+ myDrawer->UIsoAspect()->SetNumber( 0 );
+ myDrawer->VIsoAspect()->SetNumber( 0 );
+
switch( theMode )
{
case AIS_WireFrame:
for( ; anIt.More(); anIt.Next() )
{
TopoDS_Face aFace = anIt.Face();
- QString aStricklerType = anIt.StricklerType();
- Quantity_Color aColor = GetColor( aStricklerType );
- SetColor( aColor );
-
if( isShaded )
+ {
+ QString aStricklerType = anIt.StricklerType();
+ Quantity_Color aColor = GetColor( aStricklerType );
+ Handle(Graphic3d_AspectFillArea3d) anAspect = new Graphic3d_AspectFillArea3d();
+ Graphic3d_MaterialAspect aMaterialAspect( Graphic3d_NOM_PLASTIC );
+ aMaterialAspect.SetColor( aColor );
+ anAspect->SetFrontMaterial( aMaterialAspect );
+ anAspect->SetBackMaterial( aMaterialAspect );
+
+ Handle(Graphic3d_AspectFillArea3d) aGlobalAspect = myDrawer->ShadingAspect()->Aspect();
+ myDrawer->ShadingAspect()->SetAspect( anAspect );
StdPrs_ShadedShape::Add( thePresentation, aFace, myDrawer );
+ myDrawer->ShadingAspect()->SetAspect( aGlobalAspect );
+
+ StdPrs_WFShape::Add( thePresentation, aFace, myDrawer );
+ }
else
- StdPrs_WFDeflectionShape::Add( thePresentation, aFace, myDrawer );
+ {
+ StdPrs_WFShape::Add( thePresentation, aFace, myDrawer );
+ }
}
}
break;