nav mesh generator remembers params and has tooltips now
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9338 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
This commit is contained in:
parent
2fe4d620d9
commit
aeb231904a
@ -5,3 +5,21 @@ OpenIDE-Module-Display-Category=Nav Mesh Generator
|
|||||||
CTL_NavMeshTopComponent=Nav Mesh Editor
|
CTL_NavMeshTopComponent=Nav Mesh Editor
|
||||||
HINT_NavMeshTopComponent=Nav Mesh generator window
|
HINT_NavMeshTopComponent=Nav Mesh generator window
|
||||||
OpenIDE-Module-Short-Description=NavMeshGen
|
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;
|
package com.jme3.gde.nmgen.wizard;
|
||||||
|
|
||||||
import com.jme3.asset.AssetKey;
|
|
||||||
import com.jme3.gde.core.util.PropertyUtils;
|
import com.jme3.gde.core.util.PropertyUtils;
|
||||||
|
import com.jme3.gde.nmgen.NavMeshAction;
|
||||||
import com.jme3.gde.nmgen.NavMeshGenerator;
|
import com.jme3.gde.nmgen.NavMeshGenerator;
|
||||||
import java.beans.PropertyDescriptor;
|
import java.beans.PropertyDescriptor;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
||||||
@ -40,8 +40,8 @@ public class NavMeshGeneratorNode extends AbstractNode {
|
|||||||
if (prop != null) {
|
if (prop != null) {
|
||||||
try {
|
try {
|
||||||
Property sup = new PropertySupport.Reflection(key, prop.getPropertyType(), prop.getReadMethod(), prop.getWriteMethod());
|
Property sup = new PropertySupport.Reflection(key, prop.getPropertyType(), prop.getReadMethod(), prop.getWriteMethod());
|
||||||
sup.setName(prop.getName());
|
|
||||||
sup.setDisplayName(prop.getDisplayName());
|
sup.setDisplayName(prop.getDisplayName());
|
||||||
|
sup.setShortDescription(org.openide.util.NbBundle.getMessage(NavMeshAction.class, "properties."+prop.getName()));
|
||||||
set.put(sup);
|
set.put(sup);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Exceptions.printStackTrace(e);
|
Exceptions.printStackTrace(e);
|
||||||
|
@ -35,6 +35,7 @@ import org.openide.WizardDescriptor;
|
|||||||
public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction {
|
public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction {
|
||||||
|
|
||||||
private WizardDescriptor.Panel[] panels;
|
private WizardDescriptor.Panel[] panels;
|
||||||
|
private NavMeshGenerator generator;
|
||||||
|
|
||||||
public NewNavMeshWizardAction() {
|
public NewNavMeshWizardAction() {
|
||||||
name = "NavMesh..";
|
name = "NavMesh..";
|
||||||
@ -46,8 +47,9 @@ public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction
|
|||||||
// {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
|
// {0} will be replaced by WizardDesriptor.Panel.getComponent().getName()
|
||||||
wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
|
wizardDescriptor.setTitleFormat(new MessageFormat("{0}"));
|
||||||
wizardDescriptor.setTitle("Create NavMesh");
|
wizardDescriptor.setTitle("Create NavMesh");
|
||||||
NavMeshGenerator gen = new NavMeshGenerator();
|
if (generator == null)
|
||||||
wizardDescriptor.putProperty("generator", gen);
|
generator = new NavMeshGenerator();
|
||||||
|
wizardDescriptor.putProperty("generator", generator);
|
||||||
|
|
||||||
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
|
Dialog dialog = DialogDisplayer.getDefault().createDialog(wizardDescriptor);
|
||||||
dialog.setVisible(true);
|
dialog.setVisible(true);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user