Tue, 04/11/2000 - 12:07
Forums:
Hi all, in my own AIS_InteractiveObject i used the StdPrs_ShadedShape function to display shapes (called from the Compute method). It works but it does not accept the SetShadingAspect which i set before. For WireFrame Display all works fine (also the aspects). What´s wrong ?
Bert
Tue, 04/11/2000 - 13:18
You could do the following:
Handle_Prs3d_ShadingAspect shading = new Prs3d_ShadingAspect;
// generate a FillStyle (look in docu) "yourFillStyle"
shading->SetAspect(yourFillStyle);
// myDrawer is a protected member that you can use directly in your inherited class
myDrawer->SetShadingAspect(shading);
this should be enough, cause myDrawer is the standard drawer. In the compute method, let the aspect of your object point to it:
aPresentation->SetShadingAspect(myDrawer->ShadingAspect());
It should also work to set an diffrent aspect for each single entity through a call to
aPresentation->SetShadingAspect(yourShadingAspect);
regards, Michael Gandyra
------------------------------------------------------------------
University of Kaiserslautern
Research Group for Computer Application in Engineering Design
------------------------------------------------------------------