Trihedron

Hi I created a trihedron using the code

Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
m_AISContext->Display(aTrihedron);

Now the trihedron is displayed at the (0,0,0) point. I want this trihedron to be displayed at the lower left part of my screen. What should i do. I don't want to use the myView->TriedronDisplay() function

can any one help?
Regards
Saneesh

heXus's picture

//---------------------

Handle(Graphic3d_WNTGraphicDevice) theGraphicDevice = ((MyApp&)wxGetApp()).GetGraphicDevice();
Handle(WNT_Window) aWNTWindow = new WNT_Window(theGraphicDevice,(HWND*)this->GetHandle());

cViewer = new V3d_Viewer(theGraphicDevice,(short *) "Visu3D"); // instantiating 3DViewer
cViewer->SetDefaultLights();
cViewer->SetLightOn();

myAISContext =new AIS_InteractiveContext(cViewer); // instantiating an AIS_InteractiveContext object

//////Create and display a trihedron in the viewer////

Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) anAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron = new AIS_Trihedron(anAxis);
aTrihedron->SetSelectionMode( 2 );
aTrihedron->SetSelectionPriority( 3 );

myAISContext->Display(aTrihedron);

cView = cViewer->CreateView();
cView->SetSurfaceDetail(V3d_TEX_ALL);
cView->SetWindow(aWNTWindow); // display the view in the specifed window
// Display static Triedron
cView->TriedronDisplay( Aspect_TOTP_RIGHT_LOWER, Quantity_NOC_MATRAGRAY, 0.07 );
// Background image
cView->SetBackgroundImage( "res\\background.bmp", Aspect_FM_STRETCH, Standard_True );
// Antialiasing
cView->SetAntialiasingOn();

//---------------------

//
// On menu item "Display static Trihedron"
//
void MyView::OnStatTrihedron(wxCommandEvent& WXUNUSED(event))
{
if( StatTrihedronItem->IsChecked() == true )
{
canvas->cView->TriedronDisplay( Aspect_TOTP_RIGHT_LOWER, Quantity_NOC_MATRAGRAY, 0.07 );
canvas->cView->Update();
}

if( StatTrihedronItem->IsChecked() == false )
{
canvas->cView->TriedronErase();
canvas->cView->Update();
}
}