How to add Mouse Events in OCAF Example

I am using the OCAF Example in Samples->MFC->10_Ocaf and there they are using OCC3D_View. I want to print a vertex on a mouse click. Where i have to write the code in that exxample. Since i am not having the Userdefined view i dont know how to use the mouse events.


Sharjith Naramparambath's picture

Assuming you made the default installation on windows.

The file is OCC_3dBaseDoc.cpp in the path C:\OpenCASCADE6.3.0\samples\standard\mfc\Common

The function is on Line 93...

void OCC_3dBaseDoc::InputEvent(const Standard_Integer x ,
const Standard_Integer y ,
const Handle(V3d_View)& aView )

You can add the code after the line myAISContext->Select();