---C++: return const&
SetRecomputeOk(me:mutable) is private;
- -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
- Fill(me: mutable;
- aPresentationManager: PresentationManager from PrsMgr;
- aPresentation: mutable Presentation from PrsMgr;
- aMode: Integer from Standard = 0)
- is redefined protected;
- -- 22-03-04 OCC4895 SAN High-level interface for controlling polygon offsets
-
-
State(me:mutable;theState: Integer from Standard) ;
---C++: inline
State(me) returns Integer from Standard ;
// TODO: Add methods for retrieving individual aspects from Graphic3d_Group
aGrp->GroupPrimitivesAspect(aLineAsp, aTextAsp, aPntAsp, aFaceAsp);
aFaceAsp->SetPolygonOffsets(aMode, aFactor, aUnits);
+ // TODO: Issue 23118 - This line kills texture data in the group...
aGrp->SetGroupPrimitivesAspect(aFaceAsp);
}
}
if( HasPolygonOffsets() )
myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode, aFactor, aUnits );
}
-
-void AIS_InteractiveObject::Fill(const Handle(PrsMgr_PresentationManager)& aPresentationManager,
- const Handle(PrsMgr_Presentation)& aPresentation,
- const Standard_Integer aMode)
-{
- PrsMgr_PresentableObject::Fill(aPresentationManager, aPresentation, aMode);
-
- // Update polygon offsets for <aPresentation> using <myDrawer> data
- if ( !myDrawer->ShadingAspect().IsNull() )
- {
- Standard_Integer aMode1 = Aspect_POM_Fill;
- Standard_Real aFactor = 1., aUnits = 0.;
- myDrawer->ShadingAspect()->Aspect()->PolygonOffsets( aMode1, aFactor, aUnits );
-
- // Here we force this object to have default polygon offsets , if they are not
- // turned on for this object explicitly
- if ( ( aMode1 & Aspect_POM_None ) == Aspect_POM_None )
- {
- aMode1 = Aspect_POM_Fill;
- aFactor = 1.;
- aUnits = 0.;
- myDrawer->ShadingAspect()->Aspect()->SetPolygonOffsets( aMode1, aFactor, aUnits );
- }
- }
-
- Handle(PrsMgr_Presentation3d) aPrs3d =
- Handle(PrsMgr_Presentation3d)::DownCast( aPresentation );
- if ( !aPrs3d.IsNull() ) {
- Handle(Graphic3d_Structure) aStruct =
- Handle(Graphic3d_Structure)::DownCast( aPrs3d->Presentation() );
- if( !aStruct.IsNull() )
- aStruct->SetPrimitivesAspect( myDrawer->ShadingAspect()->Aspect() );
- }
-}
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
{
Handle(Prs3d_ShadingAspect) aPrs3d_ShadingAspect = new Prs3d_ShadingAspect();
myAspect = aPrs3d_ShadingAspect->Aspect();
+
+ // Issue 23115: copy polygon offset settings passed through myDrawer
+ if (HasPolygonOffsets())
+ {
+ Standard_Integer aMode;
+ Standard_Real aFactor, aUnits;
+ PolygonOffsets(aMode, aFactor, aUnits);
+ myAspect->SetPolygonOffsets(aMode, aFactor, aUnits);
+ }
}
if (!DoMapTexture)
{
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
// By default, aspect do not change current polygon offset parameters
- MyPolygonOffsetMode = Aspect_POM_None;
+ MyPolygonOffsetMode = Aspect_POM_Fill;
MyPolygonOffsetFactor = 1.;
MyPolygonOffsetUnits = 0.;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
// By default, aspect do not change current polygon offset parameters
- MyPolygonOffsetMode = Aspect_POM_None;
+ MyPolygonOffsetMode = Aspect_POM_Fill;
MyPolygonOffsetFactor = 1.;
MyPolygonOffsetUnits = 0.;
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
/*** Texture map ***/
Handle(Graphic3d_TextureMap) GroupTextureMap = CTX->TextureMap();
- if (! GroupTextureMap.IsNull() )
+ if (! GroupTextureMap.IsNull() ) {
MyCGroup.ContextFillArea.Texture.TexId = GroupTextureMap->TextureId();
- else
+ MyCGroup.ContextFillArea.Texture.doTextureMap =
+ CTX->TextureMapState () ? 1 : 0;
+ }
+ else {
MyCGroup.ContextFillArea.Texture.TexId = -1;
-
- MyCGroup.ContextFillArea.Texture.doTextureMap =
- CTX->TextureMapState () ? 1 : 0;
+ MyCGroup.ContextFillArea.Texture.doTextureMap = 0;
+ }
// OCC4895 SAN 22/03/04 High-level interface for controlling polygon offsets
Standard_Integer aPolyMode;