Quantcast
Channel: mel wiki
Viewing all articles
Browse latest Browse all 610

How can I project points through different coordinate spaces?

$
0
0
The OpenMayaUI API's M3dView class has several methods for doing this. An example of projecting a 3d worldspace point to 2d screen-space can be found here:
Here's an overview of the pertinent methods:
  • viewToWorld : Takes a point in port coordinates and returns a corresponding ray in world coordinates. Takes a point in port coordinates and returns a point on the near and far clipping planes.
  • viewToObjectSpace : Takes a point in port coordinates and returns a corresponding ray in object coordinates.
  • worldToView : Converts a point in world space to port space.
  • projectionMatrix : Returns the projection matrix currently being used by OpenGL in the current view.
  • modelViewMatrix : Returns the modelview matrix currently being used by OpenGL in the current view.

Viewing all articles
Browse latest Browse all 610

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>