For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

Help!! How to Walkthrough in the OpenCasCade?

soaroc's picture
Forums: 

I tried almost all methods, but none could work! My codes are as follows:

myView = new V3d_PerspectiveView(((CMyTestDoc* )GetDocument())->GetViewer());
myView->SetProjModel(V3d_TPM_WALKTHROUGH);

// myView->SetEye(0,-500,0);
Handle_Visual3d_View myVisual;
myVisual = myView->View();
Visual3d_ViewMapping viewmap;
Graphic3d_Vertex prp(0.0,-500,0.0);
viewmap.SetProjection(Visual3d_TOP_PERSPECTIVE);
viewmap.SetProjectionReferencePoint(prp);
viewmap.SetFrontPlaneDistance(0.0);
viewmap.SetBackPlaneDistance (1000);
viewmap.SetViewPlaneDistance (0.0);
myVisual->SetViewMapping(viewmap);
myVisual->SetViewMappingDefault();
myView->Reset();
// ->

When I comment codes between "" and move the view by using myview->tranlate(...), otjects are always clipped as it move near to screen. When I uncomment the codes, the method "translate" seems to work abnormally.