Class LocalToWindow

java.lang.Object
mgui.interfaces.shapes.util.LocalToWindow

public class LocalToWindow
extends java.lang.Object
  • Constructor Summary

    Constructors
    Constructor Description
    LocalToWindow()
    Creates a LocalToWindow object with no associated node or canvas.
    LocalToWindow​(org.jogamp.java3d.Node node, org.jogamp.java3d.Canvas3D canvas)
    Called with the Node which specifies the local coordinates for the points to be transformed and the Canvas3D where the points are displayed
  • Method Summary

    Modifier and Type Method Description
    void transformPt​(org.jogamp.vecmath.Point3d localPt, java.awt.Point windowPt)
    Transform the point from local coords to window coords
    void transformPt​(org.jogamp.vecmath.Point3d localPt, org.jogamp.vecmath.Point2d windowPt)
    Transform the point from local coords to window coords
    void update()
    Either create LocalToWindow() just before transforming points or call this method to ensure that the transforms are up to date.
    void update​(org.jogamp.java3d.Node node, org.jogamp.java3d.Canvas3D canvas)
    Set the node and canvas and call update()

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LocalToWindow

      public LocalToWindow()
      Creates a LocalToWindow object with no associated node or canvas. The node and canvas must be set before transforming points
    • LocalToWindow

      public LocalToWindow​(org.jogamp.java3d.Node node, org.jogamp.java3d.Canvas3D canvas)
      Called with the Node which specifies the local coordinates for the points to be transformed and the Canvas3D where the points are displayed
  • Method Details

    • update

      public void update()
      Either create LocalToWindow() just before transforming points or call this method to ensure that the transforms are up to date. Note: if you are transforming several points, you only need to call this method once.
    • update

      public void update​(org.jogamp.java3d.Node node, org.jogamp.java3d.Canvas3D canvas)
      Set the node and canvas and call update()
    • transformPt

      public void transformPt​(org.jogamp.vecmath.Point3d localPt, org.jogamp.vecmath.Point2d windowPt)
      Transform the point from local coords to window coords
    • transformPt

      public void transformPt​(org.jogamp.vecmath.Point3d localPt, java.awt.Point windowPt)
      Transform the point from local coords to window coords