Saturday, 16 October 2010

Improved dragging hande

Searched a 3D mathematics solution to calculate the rotation matrix for a rotation between two coordinate systems used to display properly the dragging handles of a shape. Couldn't make it.

Almost succeeded to draw properly the dragging handles by using the following solution: for the case of rectangle the RectangleEditingClass calculates the position of each visual handle as an gp_Ax2, axis that holds location information but also axis direction information. Using this information at each mouse dragging the handling shape is redrawn in space according to gp_Ax2 information. Seems to work smoothly.

Next steps would be to make edge handlrs to work properly then start adding the translate Gizmo.

No comments:

Post a Comment