
Thu, 05/10/2007 - 07:51
Dear friends i'm facing the problem in smooth shading of polygons. Pls help me
static Graphic3d_Array1OfVertexC verticesC( 1, 3);
static Aspect_Array1OfEdge mesEdges(1,3);
Handle(Prs3d_Presentation) aPresentation= new Prs3d_Presentation(myAISContext->CurrentViewer()->Viewer());
Handle(Graphic3d_AspectFillArea3d) myFillAspect = new Graphic3d_AspectFillArea3d();
myFillAspect->SetInteriorStyle(Aspect_IS_SOLID);
Handle( Graphic3d_Group ) TheGroup = Prs3d_Root::CurrentGroup(aPresentation);
TheGroup->SetPrimitivesAspect(myFillAspect);
TheGroup->SetPrimitivesAspect(myFillAspect);
verticesC(1) = Graphic3d_VertexC(0,0,0,Quantity_Color(Quantity_NOC_BLUE1)) ;
verticesC(2) = Graphic3d_VertexC(100,0,0,Quantity_Color(Quantity_NOC_RED)) ; ;
verticesC(3) = Graphic3d_VertexC(100,100,0,Quantity_Color(Quantity_NOC_YELLOW)) ; ;
mesEdges(1) = Aspect_Edge(1,2,Aspect_TOE_VISIBLE);
mesEdges(2) = Aspect_Edge(2,3,Aspect_TOE_VISIBLE);
mesEdges(3) = Aspect_Edge(3,1,Aspect_TOE_VISIBLE);
TheGroup->BeginPrimitives();
TheGroup->TriangleSet(verticesC,mesEdges);
TheGroup->EndPrimitives();
in the above code after execution nothing displyaed in the screen.
Kindly help me in this.
Wed, 10/29/2008 - 19:40
co-ask this question. Is there anyone who has any indea about that. Thanks