Walkthrogh in the OpenCasCade

I built a buildings in the OpenCasCade(the buildings was constructed with a lots of box-like TopoDS_Shape) and I want to walkthrough in the building just as many 3D games(CS for example),using keyboard and mouse. I have tried almost all relative methods of v3d_veiw class,like translate,rotate,move and turn, but it works strange,what's more,when objects come close to the screen(using translate function), they are cut off and truncated partly(I didn't move into the building yet), so I could not come into the building. I tried SetZClippingType(V3d_OFF),but no change at all.

Roaming in 3D scene is very commom in almost all 3D engine. Does Opencascade support roaming? If yes ,How to achive it?

Sharjith Naramparambath's picture

Hi,
There is a good example of the viewer in the Windows MFC Samples. But if you are using Linux and Only Linux and with knowing C++ only... you will have good time going through the cumbersome java sample code.

Regards
N. Sharjith

Svetlozar Kostadinov's picture

I'm not so aware of your problem, but you may consider using V3d_PerspectiveView instead of V3d_OrthoView and investigate the projection model set by :
V3d_View::SetProjModel(V3d_TypeOfProjectionModel)

enum V3d_TypeOfProjectionModel {
V3d_TPM_SCREEN,
V3d_TPM_WALKTHROUGH
};

By default it is V3d_TPM_SCREEN. Maybe (I hope) the other mode will solve your problem.
Regards!