Class SoEvent

    • Constructor Summary

      Constructors 
      Constructor Description
      SoEvent()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      SbVec2f getNormalizedPosition​(SbViewportRegion vpRgn)
      Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region.
      SbVec2s getPosition()
      Returns the window pixel location of the cursor when the event occurred as integer values.
      SbVec2s getPosition​(SbViewportRegion vpRgn)
      Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values.
      SbVec2f getPositionFloat()
      Returns the window pixel location of the cursor when the event occurred as float values.
      SbVec2f getPositionFloat​(SbViewportRegion vpRgn)
      Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values.
      SbTime getTime()
      Gets the time at which the event occurred.
      void setAltDown​(boolean isDown)
      Sets whether the ALT key was down when the event occurred.
      void setButton1Down​(boolean isDown)
      Sets whether mouse Button 1 was down when the event occurred.
      void setCtrlDown​(boolean isDown)
      Sets whether the CTRL key was down when the event occurred.
      void setPosition​(SbVec2f p)
      void setPosition​(SbVec2s p)
      Sets the window pixel location of the cursor when the event occurred.
      void setShiftDown​(boolean isDown)
      Sets whether the shift key was down when the event occurred.
      void setTime​(SbTime t)
      Sets the time at which the event occurred.
      boolean wasAltDown()
      Returns true if the ALT key was down when the event occurred.
      boolean wasButton1Down()
      Returns true if mouse button 1 was down when the event occurred.
      boolean wasCtrlDown()
      Returns true if the CTRL key was down when the event occurred.
      boolean wasShiftDown()
      Returns true if the shift key was down when the event occurred.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SoEvent

        public SoEvent()
        Constructor.
    • Method Detail

      • setShiftDown

        public void setShiftDown​(boolean isDown)
        Sets whether the shift key was down when the event occurred.
      • wasAltDown

        public boolean wasAltDown()
        Returns true if the ALT key was down when the event occurred.
      • wasButton1Down

        public boolean wasButton1Down()
        Returns true if mouse button 1 was down when the event occurred.
      • getPosition

        public SbVec2s getPosition()
        Returns the window pixel location of the cursor when the event occurred as integer values. The position is relative to the lower left corner of the window in which the event occurred.

        Position should be set for all events, but that may not be possible for some events in some display environments. If position was not available, the method returns 0,0.

      • setPosition

        public void setPosition​(SbVec2f p)
        Float version of setPosition(const SbVec2s &p). It can be used when a desktop is magnified on a wall of screens using ScaleViz with a tracker device calibrated for this wall.
      • setCtrlDown

        public void setCtrlDown​(boolean isDown)
        Sets whether the CTRL key was down when the event occurred.
      • getPositionFloat

        public SbVec2f getPositionFloat()
        Returns the window pixel location of the cursor when the event occurred as float values. The position is relative to the lower left corner of the window in which the event occurred.

        Position should be set for all events, but that may not be possible for some events in some display environments. If position was not available, the method returns 0,0.

      • getPositionFloat

        public SbVec2f getPositionFloat​(SbViewportRegion vpRgn)
        Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as float values. Position should be set for all events, but that may not be possible for some events in some display environments. If position was not available, the method returns the viewport origin.
      • getPosition

        public SbVec2s getPosition​(SbViewportRegion vpRgn)
        Gets the viewport pixel location of the cursor when the event occurred, relative to the origin of the specified viewport region, as integer values. Position should be set for all events, but that may not be possible for some events in some display environments. If position was not available, the method returns the viewport origin.
      • getNormalizedPosition

        public SbVec2f getNormalizedPosition​(SbViewportRegion vpRgn)
        Gets the normalized location of the cursor when the event occurred, relative to the specified viewport region. The returned value will lie between 0.0 and 1.0.

        Position should be set for all events, but that may not be possible for some events in some display environments. If position was not available, the method returns 0,0.

      • setTime

        public void setTime​(SbTime t)
        Sets the time at which the event occurred.
      • wasShiftDown

        public boolean wasShiftDown()
        Returns true if the shift key was down when the event occurred.
      • wasCtrlDown

        public boolean wasCtrlDown()
        Returns true if the CTRL key was down when the event occurred.
      • setButton1Down

        public void setButton1Down​(boolean isDown)
        Sets whether mouse Button 1 was down when the event occurred.
      • setPosition

        public void setPosition​(SbVec2s p)
        Sets the window pixel location of the cursor when the event occurred. The position is relative to the lower left corner of the window in which the event occurred.
      • setAltDown

        public void setAltDown​(boolean isDown)
        Sets whether the ALT key was down when the event occurred.
      • getTime

        public SbTime getTime()
        Gets the time at which the event occurred.