Announcement

Collapse
No announcement yet.

Origin of coordinate system of OIV in .Net is false

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Origin of coordinate system of OIV in .Net is false

    Hello,

    I use OIV write a medical application. I detect that Origin of coordinate system of OIV in .Net is in the lower left corner . But Origin of coordinate system of OIV in c++ is in the up left corner. Specific examples can be found in 10.2 of this book which called “The Inventor Mentor”. And Origin of coordinate system in .Net is usually the lower left corner.

    We look forward to your reply.

  • #2
    Originally posted by OIVUser View Post
    I use OIV write a medical application. I detect that Origin of coordinate system of OIV in .Net is in the lower left corner . But Origin of coordinate system of OIV in c++ is in the up left corner. Specific examples can be found in 10.2 of this book which called “The Inventor Mentor”. And Origin of coordinate system in .Net is usually the lower left corner.
    Hi,
    I'm not sure if I understand the question. I'll try answering a couple of possible interpretations. :-)

    World (3D) coordinates:
    The origin of the OIV 3D coordinate system is the 3D point 0,0,0. The coordinate system is right-handed with (by default) X to the right, Y up and Z toward the user.
    The point 0,0,0 may appear anywhere in the window (or outside the window) depending on the camera position and orientation. Using an Open Inventor camera node with default settings, the point 0,0,0 will be exactly in the center of the window.

    In the special case of an SoOrthographicCamera, commonly used to render 2D data (like an image) and to render screen aligned annotation (like DICOM metadata text), the default world coordinates viewed by the camera are -1 to 1 in X and Y. Meaning the center of the window is 0,0, the lower left corner of the window is -1,-1 and the upper right corner of the window is 1,1. But the application can change this to 0 to 1 or whatever is convenient.

    Device coordinates (aka pixel coordinates aka window coordinates)
    On Microsoft Windows, the origin of the pixel coordinate system is always the upper left corner of the window. This is true for C++ and .NET (it's a feature of the underlying window system). These are the coordinates you will see when handling an input event like WM_LBUTTONDOWN directly from the system API.

    In Open Inventor, the origin of the pixel coordinate system is always the LOWER left corner of the window. This is true for C++ and .NET. Open Inventor automatically converts (relevant) system events to the corresponding SoEvent class object. For example, an WM_LBUTTONDOWN event is converted to an SoMouseButtonEvent object. As part of this conversion, the Y coordinate of the event position is "flipped" from upper-left origin to lower-left origin. Open Inventor applications normally handle events (in the 3D window) as SoEvent objects.

    Hope that helps!
    Mike

    Comment


    • #3
      Thanks a lot.

      Comment

      Working...
      X