Rotating any geometry with mouse #2657
-
Hello, I am trying to rotate a selected geometry with mouse events. Since geometry could be a Polygon, Polyline, Rectangle, Circle, etc, first I encapsulated them with MatrixTranform before adding them to the corresponding layer. After I picked the geometry from that layer I could successfully drag and move the object but could not be able to rotate them via this MatrixTransform. (Two different pickers for each action) I even tried to encapsulate with PositionAttiudeTransform and do the rotation, as well as encapsulate with GeoTransform. Also, tried to perform that rotation with two different matrix calculations but I could not figure out why it was not rotating and instead jumping in horizontal directions. I would appreciate it if you could show me what I am doing wrong. Thanks in advance. Attempt-1
Attempt-2
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
Hard to say without a runnable example. Could be matrix multiplication order but I'm sure you have already fiddled with that. The GeoTransform + PositionAttitudeTransform approach is demonstrated in The GeoTransform will establish a local tangent place (ENU) to the earth at its location, and then any rotations under it are relative to that coordinate plane. |
Beta Was this translation helpful? Give feedback.
Yes, that is a better approach. Good luck :)