Class PickMouseBehavior

Direct Known Subclasses:
PickRotateBehavior, PickTranslateBehavior, PickZoomBehavior

public abstract class PickMouseBehavior extends Behavior
Base class that allows users to adding picking and mouse manipulation to the scene graph (see PickDragBehavior for an example of how to extend this base class). This class is useful for interactive apps.
  • Field Details

  • Constructor Details

    • PickMouseBehavior

      public PickMouseBehavior(Canvas3D canvas, BranchGroup root, Bounds bounds)
      Creates a PickMouseBehavior given current canvas, root of the tree to operate on, and the bounds.
  • Method Details

    • setMode

      public void setMode(int pickMode)
      Sets the pick mode
      See Also:
    • getMode

      public int getMode()
      Returns the pickMode
      See Also:
    • setTolerance

      public void setTolerance(float tolerance)
      Sets the pick tolerance
      See Also:
    • getTolerance

      public float getTolerance()
      Returns the pick tolerance
      See Also:
    • initialize

      public void initialize()
      Description copied from class: Behavior
      Initialize this behavior. Classes that extend Behavior must provide their own initialize method.
      NOTE: Applications should not call this method. It is called by the Java 3D behavior scheduler.
      Specified by:
      initialize in class Behavior
    • processStimulus

      public void processStimulus(Enumeration criteria)
      Description copied from class: Behavior
      Process a stimulus meant for this behavior. This method is invoked if the Behavior's wakeup criteria are satisfied and an active ViewPlatform's activation volume intersects with the Behavior's scheduling region. Classes that extend Behavior must provide their own processStimulus method.
      NOTE: Applications should not call this method. It is called by the Java 3D behavior scheduler.
      Specified by:
      processStimulus in class Behavior
      Parameters:
      criteria - an enumeration of triggered wakeup criteria for this behavior
    • updateScene

      public abstract void updateScene(int xpos, int ypos)
      Subclasses shall implement this update function