From eee8f765ff42ac5bb527bce99720e09876d83821 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 7 Jan 2012 16:28:07 +0000 Subject: [PATCH] SDK: - add green material to NavMesh by default git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8988 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java b/sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java index 7e565a03f..5c2f02b4b 100644 --- a/sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java +++ b/sdk/jme3-navmesh-gen/src/com/jme3/gde/nmgen/wizard/NewNavMeshWizardAction.java @@ -8,6 +8,8 @@ import com.jme3.bounding.BoundingBox; import com.jme3.gde.core.sceneexplorer.nodes.actions.AbstractNewSpatialWizardAction; import com.jme3.gde.core.sceneexplorer.nodes.actions.NewSpatialAction; import com.jme3.gde.nmgen.NavMeshGenerator; +import com.jme3.material.Material; +import com.jme3.math.ColorRGBA; import com.jme3.scene.Geometry; import com.jme3.scene.Mesh; import com.jme3.scene.Node; @@ -73,6 +75,10 @@ public final class NewNavMeshWizardAction extends AbstractNewSpatialWizardAction Mesh optiMesh = generator.optimize(mesh); final Geometry navMesh = new Geometry("NavMesh"); + Material material = new Material(pm, "Common/MatDefs/Misc/Unshaded.j3md"); + material.getAdditionalRenderState().setWireframe(true); + material.setColor("Color", ColorRGBA.Green); + navMesh.setMaterial(material); navMesh.setMesh(optiMesh); navMesh.setCullHint(CullHint.Always); navMesh.setModelBound(new BoundingBox());