Open CASCADE, the 3D modelling kernel
3D modeling & numerical simulation

Search the Forums
See All Topics
 

Compute() color problem

Compute() color problem
seumonkey 2012/12/21 19:25
I inherit myclass from AIS_InteractiveObject, and I want to set shape\shape2\shape3 with different color,however I cannot make it .Please help ,thanks.
Compute function as below:
(The final display : three shapes are the same color ,which is same with last color set of myDrawer)
void DblYellowLine::Compute(const Handle_PrsMgr_PresentationManager3d& aPresentationManager,
const Handle_Prs3d_Presentation& aPresentation,
const Standard_Integer aMode )
{
switch (aMode)
{
case 0:
StdPrs_WFDeflectionShape::Add(aPresentation,myShape2, myDrawer ); //Wire Frame 线框
StdPrs_WFDeflectionShape::Add(aPresentation,myShape, myDrawer ); //Wire Frame 线框
break;
case 1:
myDrawer->ShadingAspect()->SetColor(Quantity_NOC_GREEN);
StdPrs_ShadedShape::Add(aPresentation,myShape, myDrawer);

myDrawer->ShadingAspect()->SetColor(Quantity_NOC_BLUE1);
StdPrs_ShadedShape::Add(aPresentation,myShape2, myDrawer);

myDrawer->ShadingAspect()->SetColor(Quantity_NOC_YELLOW);
StdPrs_ShadedShape::Add(aPresentation,myShape3, myDrawer);

}
}
 
 
Latest news
  • Open CASCADE Technology 6.8.0 is available for download!
  • New features to enhance the development process
  • Open CASCADE Technology 6.7.1 is available for download!

  • © OPEN CASCADE 2000 - 2014  |  Search  |  Contacts   |  Site map