nav mesh generator remembers params and has tooltips now

git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9338 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
3.0
bre..ns 13 years ago
parent 2fe4d620d9
commit aeb231904a
  1. 18
      sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/Bundle.properties
  2. 4
      sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NavMeshGeneratorNode.java
  3. 6
      sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java

@ -5,3 +5,21 @@ OpenIDE-Module-Display-Category=Nav Mesh Generator
CTL_NavMeshTopComponent=Nav Mesh Editor
HINT_NavMeshTopComponent=Nav Mesh generator window
OpenIDE-Module-Short-Description=NavMeshGen
properties.nmgen=
properties.cellSize=The width and depth resolution used when sampling the source mesh
properties.cellHeight=The height resolution used when sampling the source mesh
properties.minTraversableHeight=Represents the minimum floor to ceiling height that will still allow the floor area to be considered walkable
properties.maxTraversableStep=Represents the maximum ledge height that is considered to still be walkable
properties.maxTraversableSlope=The maximum slope that is considered walkable. (Degrees)
properties.clipLedges=Indicates whether ledges should be marked as unwalkable
properties.traversableAreaBorderSize=Represents the closest any part of the navmesh can get to an obstruction in the source mesh
properties.smoothingThreshold=The amount of smoothing to be performed when generating the distance field
properties.useConservativeExpansion=Applies extra algorithms to regions to help prevent poorly formed regions from forming. Enabling this feature significantly increased processing cost.
properties.minUnconnectedRegionSize=The minimum region size for unconnected (island) regions. (Voxels)
properties.mergeRegionSize=Any regions smaller than this size will, if possible, be merged with larger regions. (Voxels)
properties.maxEdgeLength=The maximum length of polygon edges that represent the border of the navmesh
properties.edgeMaxDeviation=The maximum distance the edge of the navmesh may deviate from the source geometry. Setting this lower will result in the navmesh edges following the geometry contour more accurately.
properties.maxVertsPerPoly=The maximum number of vertices per polygon. Higher values reduce performance, but result in better formed triangles. Diminishing returns for values higher than 6.
properties.contourSampleDistance=Sets the sampling distance. Higher values result in a navmesh which conforms more closely to the original geometry's surface at the cost of a higher final triangle count and higher processing cost
properties.contourMaxDeviation=The maximum distance the surface of the navmesh may deviate from the surface of the original geometry.
properties.timeout=Stops the calculation from running too long.

@ -4,8 +4,8 @@
*/
package com.jme3.gde.nmgen.wizard;
import com.jme3.asset.AssetKey;
import com.jme3.gde.core.util.PropertyUtils;
import com.jme3.gde.nmgen.NavMeshAction;
import com.jme3.gde.nmgen.NavMeshGenerator;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
@ -40,8 +40,8 @@ public class NavMeshGeneratorNode extends AbstractNode {
if (prop != null) {
try {
Property sup = new PropertySupport.Reflection(key, prop.getPropertyType(), prop.getReadMethod(), prop.getWriteMethod());
sup.setName(prop.getName());
sup.setDisplayName(prop.getDisplayName());
sup.setShortDescription(org.openide.util.NbBundle.getMessage(NavMeshAction.class, "properties."+prop.getName()));
set.put(sup);
} catch (Exception e) {
Exceptions.printStackTrace(e);

@ -35,6 +35,7 @@ import org.openide.WizardDescriptor;
public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction {
private WizardDescriptor.Panel[] panels;
private NavMeshGenerator generator;
public NewNavMeshWizardAction() {
name = "NavMesh..";
@ -46,8 +47,9 @@ public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction
// {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
wizardDescriptor.setTitle("Create NavMesh");
NavMeshGenerator gen = new NavMeshGenerator();
wizardDescriptor.putProperty("generator", gen);
if (generator == null)
generator = new NavMeshGenerator();
wizardDescriptor.putProperty("generator", generator);
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
dialog.setVisible(true);

Loading…
Cancel
Save