Class SurfacePaint_WM

All Implemented Interfaces:
ActionListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class SurfacePaint_WM extends JInterfaceBase
See Also:
  • Field Details

    • VERTEX

      public static final int VERTEX
      Paint the TriMesh vertex color:
      See Also:
    • TEXTURE

      public static final int TEXTURE
      Paint into the 3D texture map:
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • m_bEnabled

      private boolean m_bEnabled
      Enables painting
    • mPaintToolBar

      private JToolBar mPaintToolBar
      Paint user-interface ToolBar
    • mButtonGroup

      private ButtonGroup mButtonGroup
      Button group for paint functions:
    • mPaintBrushButton

      private JToggleButton mPaintBrushButton
      Paint brush button
    • mDropperButton

      private JToggleButton mDropperButton
      Paint dropper button
    • mPaintCanButton

      private JToggleButton mPaintCanButton
      Paint can button
    • mEraserButton

      private JToggleButton mEraserButton
      Eraser paint button
    • mEraseAllButton

      private JButton mEraseAllButton
      Erase all button
    • mBrushSizeText

      private JTextField mBrushSizeText
      Paint brush size text field
    • mBrushSize

      private int mBrushSize
      current paint brush size
    • mColorPaintButton

      private JButton mColorPaintButton
      Color selection button
    • mPaintColor

      private WildMagic.LibFoundation.Mathematics.ColorRGBA mPaintColor
      Current paint color
    • mOpacityPaintButton

      private JButton mOpacityPaintButton
      Opacity paint button
    • mOpacity

      private float mOpacity
      Current paint opacity
    • mColorChooser

      private JColorChooser mColorChooser
      Color Chooser dialog.
    • mPaintGrowDialog

      private JDialogPaintGrow mPaintGrowDialog
      Paint Grow Dialog.
    • m_kPanel

      private JPanelSurface_WM m_kPanel
      Surface panel.
  • Constructor Details

  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent event)
      actionPerformed, listens for interface events.
      Parameters:
      event - ActionEvent generated by the interface.
    • dispose

      public void dispose()
      Deletes all member variables, clean memory.
      Overrides:
      dispose in class Window
    • enableSurfacePaint

      public void enableSurfacePaint(boolean flag)
      Enables/disables the Surface per-vertex paint user-interface
      Parameters:
      flag - when true per-vertex paint is enabled, when false the per-vertex paint is disabled is disabled.
    • enableSurfacePaintCan

      public void enableSurfacePaintCan(boolean flag)
      Enables/disables the Paint Can user-interface
      Parameters:
      flag - when true Paint Can is enabled, when false the Paint Can is disabled.
    • getEnabled

      public boolean getEnabled()
      Returns true if the user has enabled the paint brush.
      Returns:
      the enabled/disabled status of the paint brush.
    • getPaintImage

      public ModelImage getPaintImage()
      Returns the ModelImage to paint into.
      Returns:
      paint/texture ModelImage
    • getToolBar

      public JToolBar getToolBar()
      Return paint tool-bar.
      Returns:
      paint tool-bar.
    • regionGrow

      public void regionGrow(ModelImage kImage, WildMagic.LibFoundation.Mathematics.Vector3f kSeedPoint, WildMagic.LibFoundation.Mathematics.ColorRGBA kSeedColor)
      Grows a region based on a starting point supplied. A voxel is added to the the paintMask mask if its intensity is between the the bounds which are also supplied.
      Parameters:
      kImage - the image to grow the region in
      kSeedPoint - the starting point in the image
      kSeedColor - seed color.
    • setDropperColor

      public void setDropperColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f kPickPoint)
      Sets the dropper color. Initializes the region grow.
      Parameters:
      kDropperColor - dropper color.
      kPickPoint - picked point on the surface.
    • setEnabled

      public void setEnabled(boolean flag)
      Enables/disables the user-interface
      Overrides:
      setEnabled in class Component
      Parameters:
      flag - when true the user-interface is enabled, when false the user-interface is disabled.
    • setOpacity

      public void setOpacity(float opacity)
      Sets the opacity of the paint.
      Overrides:
      setOpacity in class Dialog
      Parameters:
      opacity - paint opacity.
    • init

      private void init()
      Initialize user-interface