Mouse Moving

Sep 22, 2003 1 Replies

Does anyone know how i can tell through the api. what the mouse is held over. things turn red when you hold the mouse over them. ie: vertex, edge, surface. is this already a part of the api.


you already asked, and I already answered:

I'm afraid it is not available directly, you'll have to do something rather tricky: use microsoft's windows API to obtain the mouse pixel position in your ModelView, then ModelView::Transform to obtain the XYZ position in model space then use ModelView::GetEyePoint to define a vector going from your eye through the obtained point and finally ModelDoc::RayIntersections+GetRayIntersectionsTopology, quite complex especially in assemblies, to obtain the desired points. Another way is to request apisupport to implement this api, and wait a few years... Maybe you'd rather stick to selections...

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required