cart: empty [ Login ]

3D perspective Hit Test

1 
John Hunter
7/24/2019 2:27 PM
Hi I'm trying to extend the WinFormsExtendedViewExample to use the SimpleRotateInteractor. I have added the interactor using the others as an example. This appears to work I can rotate the loaded file however it appears to break the select interactor when dragging a rectangle and ShowPositionInteractor returns the wrong point when the view is rotated in the X or Y axis. Constructor Changes
C# Code:
transformationProvider.IsPerspective = true; rotateInteractor = new SimpleRotateInteractor(transformationProvider); rotateInteractorDrawable = new SimpleRotateInteractor.WinFormsDrawable(rotateInteractor);
OnMouseDown Changes
C# Code:
else if(e.Button == MouseButtons.Right) { activeInteractor = rotateInteractor; currentInteractorDrawable = rotateInteractorDrawable; }
What am I missing to keep the select interactor working? How do I get the Model Coordinates at a give z value from the mouse coordinates? Thanks John.
Wout
8/28/2019 12:52 AM
Hi, This was a bug in the select interactor. I've just fixed it. Please download the latest CadLib version from Your resources in your user profile (fixed in version 4.0.38.186). I've also updated the WinFormsExtendedViewExampleCS sample application to include the rotate interactor. There were also a few small issues with it that I've fixed. Thanks for the report! - Wout
John Hunter
8/28/2019 11:16 AM
Hi Wout, Thanks for that the Select Interactor is working as expected now. I think I have found a further problem, when the model is rotated in the x or y axis the show position interactor and the displayed model space coordinates on mouse move are incorrect.
1