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

Search the Forums
See All Topics
Open CASCADEShowroomGet it!Developer CornerSupport and ProductsAbout us
Technical overview
Areas of use
Advantages
FAQ
Screenshots
Shape factory
Shape gallery
Demonstrations
What's new
System requirements
Download Center
Public license
Documentation
Getting started
Forums
Open Source community
Training and e-learning
A-la Carte Support
Value-added software
Complementary Components
Customer Corner
Company Profile
Marketing Materials
Contact Us
News
Home / Developer Corner / Forums / Usage issues / Compute() color problem

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.7.0 is available for download!
  • Open CASCADE Technology 6.6.0 is available for download!
  • Open CASCADE Technology 6.5.5 is available for download!

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