Class JPanelSurface_WM
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
gov.nih.mipav.view.renderer.WildMagic.Interface.JPanelSurface_WM
- All Implemented Interfaces:
ActionListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,ListSelectionListener,RootPaneContainer,WindowConstants
public class JPanelSurface_WM
extends JInterfaceBase
implements ListSelectionListener, ChangeListener
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classPick up the selected color and call method to change the color.Nested classes/interfaces inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
JInterfaceBase.CancelListener, JInterfaceBase.DrawingPanelNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate JLabelThe area label.private JTextFieldDisplays the area of triangle.private JButtonThe color button, which calls a color chooser.private JLabelThe color button label.private JLabelThe polygon mode combo box label.private JButtonSmooth button.private JButtonDecimate button.private doubleDecimation Percentageprivate JLabelThe level of detail slider label.private JSliderLevel of detail slider.private JLabel[]The labels below the detail slider.private JButtonSmooth button.private static WildMagic.LibFoundation.Mathematics.ColorRGB[]The colors for the surfaces.private JButtonSmooth button.private DefaultListModel<String> private Vector<SurfaceState> private JButtonThe material options button, which launches the material editor window.private SurfacePaint_WMPaint tool-bar (contained in the SurfacePaint class)private JButtonOpens SurfaceTexture dialog:.private JLabelThe opacity slider label.private JSliderOpacity slider, not enabled yet.private JLabel[]The labels below the opacity slider.private JComboBoxThe combo box for the polygon mode to display.private intconstant polyline counterprivate DefaultListModelPolyline counter list invalid input: '<'index, groupID>private JListPolyline list box in the dialog for surfaces.private JButtonSave .PLY surface button.private JButtonSave .STL surface button.private JButtonSave surface button.private JScrollPaneThe scroll pane holding the panel content.private static final longUse serialVersionUID for interoperability.private JButtonSmooth button.private JButtonSmooth button.private JButtonSmooth button.private JButtonSmooth button.private JCheckBoxCheck Box for surface back face culling.private JCheckBoxCheck Box for surface clpping of the volume render.The list box in the dialog for surfaces.private JCheckBoxCheck Box for surface picking.private JCheckBoxCheck Box for surface transparency.private TriangleMesh[]triangle mesh for decimation.private JLabelThe number of triangles label.private JTextFieldDisplays the number of triangles.private JCheckBoxloads mesh files in basic volume coordinatesprivate JLabelThe volume label.private JTextFieldDisplays the volume of triangle.Fields inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
cancelButton, colorChooser, m_kVolumeViewer, mainPanel, OKButton, rayBasedRenderWMFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) The override necessary to be an ActionListener.voidAdd polyline to the render.private voidAdd surface to the volume image.voidaddSurfaces(WildMagic.LibGraphics.SceneGraph.TriMesh[] akSurfaces) Add surfaces to the Volume Tri-Planar renderer.private voidBuild the toolbar.private float[]CalcMinMaxEdgeLength(WildMagic.LibGraphics.SceneGraph.TriMesh mesh) voidchangePolyMode(WildMagic.LibGraphics.Rendering.WireframeState.FillMode mode) Changes the polygon mode of the selected surface by detaching it, calling the appropriate method, and reattaching it.private voidconvexHull(int[] aiSelected) private WildMagic.LibGraphics.SceneGraph.TriMeshconvexHull(WildMagic.LibGraphics.SceneGraph.TriMesh mesh) private JLabelcreateLabel(String title) Creates a label in the proper font and color.private voiddecimate(int[] aiSelected) Decimate the selected surfaces.private voiddisplayAdvancedMaterialOptions(int[] aiSelected) Display the Surface Material dialog for the selected surfaces.voidDispose the local memory.voidenableSurfacePaint(boolean bEnable) Enables/Disables the SurfacePaint per-vertex functions.voidenableSurfacePaintCan(boolean bEnable) Enables/Disables the SurfacePaint Paint Can function.private voidextractConnectedComponents(int[] aiSelected) Decimate the selected surfaces.private intfillModeToPolygonIndex(WildMagic.LibGraphics.Rendering.WireframeState.FillMode mode) static WildMagic.LibFoundation.Mathematics.ColorRGBgetNewSurfaceColor(int index) static function returns the next default surface color, based on the current number of surfaces displayed.intReturn the name of the selected surface.String[]Return the names of the selected surfaces.voidImageAsTexture(boolean bTextureOn, boolean bUseNewImage, boolean bUseNewLUT) Turn surface texture on/off.private voidinit()Initializes the GUI components.private voidinvertNormals(int[] aiSelected) Decimate the selected surfaces.booleanCheck if the surface pickable checkbox be selected or not.private WildMagic.LibGraphics.Rendering.WireframeState.FillModepolygonIndexToMode(int index) Convert from the polygon mode combo-box list index to the PolygonAttributes.POLYGON_LINE, PolygonAttributes.POLYGON_POINT, and PolygonAttributes.POLYGON_FILL values:private voidRemove polyline from the renderprivate voidRemove the selected surfaces.private WildMagic.LibGraphics.SceneGraph.TriMeshremoveUnusedVertices(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh) voidresizePanel(int panelWidth, int frameHeight) Resizing the control panel with ViewJFrameVolumeView's frame width and height.private voidsaveProstateSurfaces(int[] aiSelected, String kCommand) Save the selected surfaces.private voidsaveSurfaces(int[] aiSelected, String kCommand) Save the selected surfaces.private voidsetBackface(int[] aiSelected) Turn backface culling on/off for the selected surfaces.voidsetButtonColor(JButton _button, Color _color) Set the color of the button.private voidsetClipping(int[] aiSelected) Turns Clipping on/off for the selected surfaces.voidsetDropperColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f kPickPoint) Set the paint can color.private voidsetElementsEnabled(boolean flag) Sets the surface options GUI panel to enabled or disabled.voidSetImageNew(ModelImage kImage) Set the user-specified ModelImage to use as the surface texture.voidSetLUTNew(ModelStorageBase kLUT) Set the user-specified LUT for surface texture.voidsetMaterial(WildMagic.LibGraphics.Rendering.MaterialState kMaterial, int iIndex) Called from the JPanelSurfaceMAterialProperties.java dialog when the dialog is used to change the material properties of a surface.private voidsetPickable(int[] aiSelected) Turn picking culling on/off for the selected surfaces.voidsetSelected(int i) voidsetSurfaceStates(Vector<SurfaceState> kSurfaces) private voidsetTransparency(int[] aiSelected) Turns Transparency on/off for the selected surfaces.private voidsmoothSurface(int[] aiSelected, int iSmoothType) Smoothes the selected surfaces.voidstateChanged(ChangeEvent event) private voidsubDivideTriangles(int[] aiSelected) booleanReturns true if a surface exists in the Renderer.voidtoggleGeodesicPathDisplay(int iWhich) Toggle which type of Geodesic is displayed on the surface (Euclidian, Dijkstra, Geodesic).private voidupdateSelected(int i) voidvalueChanged(ListSelectionEvent kEvent) Methods inherited from class gov.nih.mipav.view.renderer.WildMagic.Interface.JInterfaceBase
buildCancelButton, buildOKButton, buildTitledBorder, getMainPanel, updateColorButtonMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, setVisible, show, toBackMethods inherited from class java.awt.Window
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
volumeCoordsCheck
loads mesh files in basic volume coordinates -
fixedColor
private static WildMagic.LibFoundation.Mathematics.ColorRGB[] fixedColorThe colors for the surfaces. -
areaLabel
The area label. -
areaText
Displays the area of triangle. -
colorButton
The color button, which calls a color chooser. -
colorLabel
The color button label. -
comboLabel
The polygon mode combo box label. -
decimateButton
Decimate button. -
detailLabel
The level of detail slider label. -
detailSlider
Level of detail slider. -
detailSliderLabels
The labels below the detail slider. -
saveSurfaceButton
Save surface button. -
savePLYSurfaceButton
Save .PLY surface button. -
saveSTLSurfaceButton
Save .STL surface button. -
m_kSurfacePaint
Paint tool-bar (contained in the SurfacePaint class) -
m_kAdvancedMaterialOptionsButton
The material options button, which launches the material editor window. -
m_kSurfaceTextureButton
Opens SurfaceTexture dialog:. -
opacityLabel
The opacity slider label. -
opacitySlider
Opacity slider, not enabled yet. -
opacitySliderLabels
The labels below the opacity slider. -
polygonModeCB
The combo box for the polygon mode to display. -
scroller
The scroll pane holding the panel content. Useful when the screen is small. -
invertNormals
Smooth button. -
smooth1Button
Smooth button. -
smooth2Button
Smooth button. -
smooth3Button
Smooth button. -
convexHull
Smooth button. -
subdivideTriangles
Smooth button. -
extractConnected
Smooth button. -
polylineList
Polyline list box in the dialog for surfaces. -
surfaceList
The list box in the dialog for surfaces. -
listModel
-
surfacePickableCB
Check Box for surface picking. -
surfaceBackFaceCB
Check Box for surface back face culling. -
surfaceClipCB
Check Box for surface clpping of the volume render. -
surfaceTransparencyCB
Check Box for surface transparency. -
triangleLabel
The number of triangles label. -
triangleText
Displays the number of triangles. -
volumeLabel
The volume label. -
volumeText
Displays the volume of triangle. -
polylineCounterList
Polyline counter list invalid input: '<'index, groupID> -
polylineCounter
private int polylineCounterconstant polyline counter -
decimationPercentage
private double decimationPercentageDecimation Percentage -
tmesh
triangle mesh for decimation. -
m_akSurfaceStates
-
-
Constructor Details
-
JPanelSurface_WM
Constructor.- Parameters:
kVolumeViewer- parent frame.
-
-
Method Details
-
getNewSurfaceColor
public static WildMagic.LibFoundation.Mathematics.ColorRGB getNewSurfaceColor(int index) static function returns the next default surface color, based on the current number of surfaces displayed. If the number of surfaces is less than the fixedColor.length then fixedColor is the source of the surface color, otherwise a random color is generated.- Parameters:
index- the number of the new surface- Returns:
- Color4f, the default surface color for the new surface.
-
actionPerformed
The override necessary to be an ActionListener. This callback is executed whenever the Add or Remove buttons are clicked, or when the color button or light button is clicked, or when the combo box changes. If the Add button is clicked, a file dialog is launched to allow the user to select new surface meshes to load from disk. If the Remove button is clicked, the currently selected surfaces in the list box are removed from the scene graph.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- The action event.
-
addSurface
private void addSurface()Add surface to the volume image. Calls the FileSurface.openSurfaces function to open a file dialog so the user can choose the surfaces to add. -
getSurfaceStates
-
setSurfaceStates
-
addSurfaces
public void addSurfaces(WildMagic.LibGraphics.SceneGraph.TriMesh[] akSurfaces) Add surfaces to the Volume Tri-Planar renderer.- Parameters:
akSurfaces- new surfaces.
-
changePolyMode
public void changePolyMode(WildMagic.LibGraphics.Rendering.WireframeState.FillMode mode) Changes the polygon mode of the selected surface by detaching it, calling the appropriate method, and reattaching it.- Parameters:
mode- The new polygon mode to set.
-
disposeLocal
public void disposeLocal()Dispose the local memory. -
enableSurfacePaint
public void enableSurfacePaint(boolean bEnable) Enables/Disables the SurfacePaint per-vertex functions.- Parameters:
bEnable- when true the SurfacePaint per-vertex functions (PaintBrush, Dropper, Eraser, BrushSize) are enabled, when false they are disabled.
-
enableSurfacePaintCan
public void enableSurfacePaintCan(boolean bEnable) Enables/Disables the SurfacePaint Paint Can function.- Parameters:
bEnable- when true the Paint Can function is enabled, when false it is disabled.
-
getSelectedSurface
Return the name of the selected surface.- Returns:
- name of the selected surface.
-
getSelectedSurfaces
Return the names of the selected surfaces.- Returns:
- names of the selected surfaces.
-
ImageAsTexture
public void ImageAsTexture(boolean bTextureOn, boolean bUseNewImage, boolean bUseNewLUT) Turn surface texture on/off.- Parameters:
bTextureOn- texture on/off.bUseNewImage- when true use the user-specified ModelImage, when false use default ModelImage.bUseNewLUT- when true use the user-specified LUT, when false use the defaulet LUT.
-
isSurfacePickableSelected
public boolean isSurfacePickableSelected()Check if the surface pickable checkbox be selected or not.- Returns:
- isSelected Surface pickable check box selected or not.
-
resizePanel
public void resizePanel(int panelWidth, int frameHeight) Resizing the control panel with ViewJFrameVolumeView's frame width and height.- Parameters:
panelWidth- int widthframeHeight- int height
-
setButtonColor
Description copied from class:JInterfaceBaseSet the color of the button. Derived classes may also perform other functions.- Overrides:
setButtonColorin classJInterfaceBase- Parameters:
_button- button._color- color.
-
setDropperColor
public void setDropperColor(WildMagic.LibFoundation.Mathematics.ColorRGBA kDropperColor, WildMagic.LibFoundation.Mathematics.Vector3f kPickPoint) Set the paint can color.- Parameters:
kDropperColor- color.kPickPoint- picked point on the surface.
-
SetImageNew
Set the user-specified ModelImage to use as the surface texture.- Parameters:
kImage- ModelImage to use as the surface texture.
-
SetLUTNew
Set the user-specified LUT for surface texture.- Parameters:
kLUT- ModelLUTkRGBT- ModelRGB for color images.
-
setMaterial
public void setMaterial(WildMagic.LibGraphics.Rendering.MaterialState kMaterial, int iIndex) Called from the JPanelSurfaceMAterialProperties.java dialog when the dialog is used to change the material properties of a surface. The surface is determined by the index iIndex. The color button is set to the Material diffuse color.- Parameters:
kMaterial- Material referenceiIndex- int material index
-
stateChanged
- Specified by:
stateChangedin interfaceChangeListener
-
surfaceAdded
public boolean surfaceAdded()Returns true if a surface exists in the Renderer.- Returns:
- true if a surface exists in the Renderer.
-
toggleGeodesicPathDisplay
public void toggleGeodesicPathDisplay(int iWhich) Toggle which type of Geodesic is displayed on the surface (Euclidian, Dijkstra, Geodesic).- Parameters:
iWhich- type of Geodesic is displayed on the surface (Euclidian, Dijkstra, Geodesic).
-
valueChanged
- Specified by:
valueChangedin interfaceListSelectionListener
-
getSelected
public int getSelected() -
setSelected
public void setSelected(int i) -
updateSelected
private void updateSelected(int i) -
addPolyline
public void addPolyline()Add polyline to the render. -
buildToolBar
private void buildToolBar()Build the toolbar. -
createLabel
Creates a label in the proper font and color.- Parameters:
title- The title of the label.- Returns:
- The new label.
-
decimate
private void decimate(int[] aiSelected) Decimate the selected surfaces.- Parameters:
aiSelected- selected surfaces.
-
invertNormals
private void invertNormals(int[] aiSelected) Decimate the selected surfaces.- Parameters:
aiSelected- selected surfaces.
-
extractConnectedComponents
private void extractConnectedComponents(int[] aiSelected) Decimate the selected surfaces.- Parameters:
aiSelected- selected surfaces.
-
convexHull
private void convexHull(int[] aiSelected) -
CalcMinMaxEdgeLength
private float[] CalcMinMaxEdgeLength(WildMagic.LibGraphics.SceneGraph.TriMesh mesh) -
subDivideTriangles
private void subDivideTriangles(int[] aiSelected) -
convexHull
private WildMagic.LibGraphics.SceneGraph.TriMesh convexHull(WildMagic.LibGraphics.SceneGraph.TriMesh mesh) -
displayAdvancedMaterialOptions
private void displayAdvancedMaterialOptions(int[] aiSelected) Display the Surface Material dialog for the selected surfaces.- Parameters:
aiSelected- the selected surfaces.
-
init
private void init()Initializes the GUI components. -
polygonIndexToMode
private WildMagic.LibGraphics.Rendering.WireframeState.FillMode polygonIndexToMode(int index) Convert from the polygon mode combo-box list index to the PolygonAttributes.POLYGON_LINE, PolygonAttributes.POLYGON_POINT, and PolygonAttributes.POLYGON_FILL values:- Parameters:
index- the index of the selected polygon mode in the polygonModeCB combo box.- Returns:
- the corresponding PolygonAttributes defined value.
-
fillModeToPolygonIndex
private int fillModeToPolygonIndex(WildMagic.LibGraphics.Rendering.WireframeState.FillMode mode) -
removePolyline
private void removePolyline()Remove polyline from the render -
removeSurface
private void removeSurface()Remove the selected surfaces. -
removeUnusedVertices
private WildMagic.LibGraphics.SceneGraph.TriMesh removeUnusedVertices(WildMagic.LibGraphics.SceneGraph.TriMesh kMesh) -
saveSurfaces
Save the selected surfaces. The kCommand parameter determines the file type.- Parameters:
aiSelected- selected surfaces.kCommand- save command, specifies the file type.
-
saveProstateSurfaces
Save the selected surfaces. The kCommand parameter determines the file type.- Parameters:
aiSelected- selected surfaces.kCommand- save command, specifies the file type.
-
setBackface
private void setBackface(int[] aiSelected) Turn backface culling on/off for the selected surfaces.- Parameters:
aiSelected- selected surfaces.
-
setClipping
private void setClipping(int[] aiSelected) Turns Clipping on/off for the selected surfaces.- Parameters:
aiSelected- the list of selected surfaces (SurfaceAttributes)
-
setElementsEnabled
private void setElementsEnabled(boolean flag) Sets the surface options GUI panel to enabled or disabled. If there are 0 or multiple surfaces selected, all the options should be disabled.- Parameters:
flag- Enable or disable.
-
setPickable
private void setPickable(int[] aiSelected) Turn picking culling on/off for the selected surfaces.- Parameters:
aiSelected- selected surfaces.
-
setTransparency
private void setTransparency(int[] aiSelected) Turns Transparency on/off for the selected surfaces.- Parameters:
aiSelected- the list of selected surfaces (SurfaceAttributes)
-
smoothSurface
private void smoothSurface(int[] aiSelected, int iSmoothType) Smoothes the selected surfaces. One dialog per group of selected surfaces is displayed (not a different dialog per-surface).- Parameters:
aiSelected- the list of selected surfaces (SurfaceAttributes)iSmoothType- the level of smoothing JDialogSmoothMesh.SMOOTH1, JDialogSmoothMesh.SMOOTH2, or JDialogSmoothMesh.SMOOTH3
-