Jump to content

pickpoint method malfunctioning after set rotation use


Recommended Posts

Hi Lavas,

I've used pickpoint method in the attached VI to implement a "point marking" functionality. I've also disabled the camera contoller and implemented my own "rotate" routine which is based on "set rotation.vi". The point marking works fine at VI start but if the object is rotated, it marks the wrong points on the window area. It seems that after "set rotation.vi" execution the pickpoint method returns wrong coordinations of the point on the object. Should I perform manual updating of model view matrix after "set rotation.vi" execution ?? Any help will be greatly appreciated.

P.s; i have attached all the vis and subvis

CreateSensor.vi

FindNewAxis 8.6.vi

Rotate 3D object 8.6.vi

post-17326-079984500 1277725150_thumb.jp

post-17326-013989700 1277725156_thumb.jp

post-17326-064913000 1277725160_thumb.jp

Link to comment

I didn't run your VIs, but my guess is that you get right coordinates - coordinates for rotated object. Because you place a sensor as a child of main object, its translation is relative to this object. Pick Point gives you absolute coordinates. You decided to use object transformation to mimic camera behavior. This approach has both advantages and drawbacks. The drawback is that you have to apply inverse transformation to each absolute point you get from Pick Point in order to have its relative location. Inverse transformation is easy to calculate: it is still 4x4 matrix with 3x3 rotation component, 3x1 translation component, 3 zeros and 1. You simply has to transpose rotation component (inverse matrix for rotation matrix is always equal to its transposition) and negate translation component.

But I advice you rather to use camera as a camera (and either Setup Camera method or changing modelview matrix). Things will be much simpler then.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.