![]() |
【转帖】mouse pointer coordinates
mouse pointer coordinates
mouse pointer coordinates hi all, i know this is a trivial question, but for me is a big problem... :-( i want to insert a new entity into a dwg database. the insert point must be specified by user when he clicks into the active view area. after some searches into this forum, i'm using this piece of code: odgematrix3d mattransform; mattransform=getactiveview()->worldtodevicematrix(); mattransform.inverse(); odgepoint3d ptaux; ptaux.x = devicept.x; ptaux.y = devicept.y; ptaux.z = 0.0; ptaux.transformby(mattransform); the problem is that ptaux has non realistic values (something like xxxe+20) and also mattransform seems to be not valid. i do not have any perspective view... is there any example showing how to obtain wcs coordinates from device coordinates ??? thank you very much for any suggestions... carlo see \examples\win\odamfcapp\editorobject.cpp, odexeditorobject::toeyetoworld vladimir |
所有的时间均为北京时间。 现在的时间是 04:11 PM. |