Thu, 10/17/2002 - 04:27
Forums:
hi~
I import a image file to map texture on shape,the image become black .
I don't know why?? Is it a bug for AIS_TexturedShape. If not,
What wrong is for my codes?
Handle_AIS_TexturedShape aTShape = new AIS_TexturedShape(aShape);
TCollection_AsciiString aFile(aFileName);
aTShape->SetTextureFileName(aFile);
aTShape->SetTextureRepeat(FALSE,1,0);
aTShape->SetTextureMapOn();
aTShape->SetTextureScale(FALSE,0.5,0.5);
aTShape->SetDisplayMode(3);
myView->SetSurfaceDetail(V3d_TEX_ALL);
myCurrentIC->Display(aTShape);
myCurrentIC->UpdateCurrentViewer();
Thu, 10/17/2002 - 15:18
Hi,
Just try this code :
myView->SetSurfaceDetail(V3d_TEX_ALL);
TopoDS_Shape B = BRepPrimAPI_MakeBox (10, 10, 10);
Handle (AIS_TexturedShape) aTShape = new AIS_TexturedShape (B);
TCollection_AsciiString aFile("c:\\TEMP\\TextureMapping\\res\\CasCadeLogo.bmp");
aTShape->SetTextureFileName(aFile);
aTShape->SetTextureMapOn();
aTShape->SetDisplayMode(3);
myAISContext->Display(aTShape);
myAISContext-> UpdateCurrentViewer();
aTShape->UpdateAttributes();
This code works !
mbd_forever
Fri, 10/18/2002 - 07:47
I try this code. impressional alike.
Handle(V3d_Viewer) myViewer = myCurrentIC->CurrentViewer();
myViewer->InitActiveViews();
Handle(V3d_View) myView = myViewer->ActiveView();
myView->FitAll(0.01,Standard_True);
myView->SetSurfaceDetail(V3d_TEX_ALL);
If should warning spice please tell me thank.
if you have icq number ?
can you mail give me ?