forked from mirror/DotRecast
renavme for unity3d
This commit is contained in:
parent
783ef97173
commit
ccba2afb0c
|
@ -26,7 +26,7 @@ namespace DotRecast.Recast.DemoTool.Builder
|
||||||
{
|
{
|
||||||
public class SoloNavMeshBuilder
|
public class SoloNavMeshBuilder
|
||||||
{
|
{
|
||||||
public NavMeshBuildResult Build(DemoInputGeomProvider geom, RcNavMeshBuildSetting settings)
|
public NavMeshBuildResult Build(DemoInputGeomProvider geom, RcNavMeshBuildSettings settings)
|
||||||
{
|
{
|
||||||
return Build(geom,
|
return Build(geom,
|
||||||
RcPartitionType.OfValue(settings.partitioning), settings.cellSize, settings.cellHeight, settings.agentHeight,
|
RcPartitionType.OfValue(settings.partitioning), settings.cellSize, settings.cellHeight, settings.agentHeight,
|
||||||
|
|
|
@ -30,7 +30,7 @@ namespace DotRecast.Recast.DemoTool.Builder
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public NavMeshBuildResult Build(DemoInputGeomProvider geom, RcNavMeshBuildSetting settings)
|
public NavMeshBuildResult Build(DemoInputGeomProvider geom, RcNavMeshBuildSettings settings)
|
||||||
{
|
{
|
||||||
return Build(geom,
|
return Build(geom,
|
||||||
RcPartitionType.OfValue(settings.partitioning), settings.cellSize, settings.cellHeight, settings.agentHeight,
|
RcPartitionType.OfValue(settings.partitioning), settings.cellSize, settings.cellHeight, settings.agentHeight,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
namespace DotRecast.Recast.DemoTool
|
namespace DotRecast.Recast.DemoTool
|
||||||
{
|
{
|
||||||
public class RcNavMeshBuildSetting
|
public class RcNavMeshBuildSettings
|
||||||
{
|
{
|
||||||
public float cellSize = 0.3f;
|
public float cellSize = 0.3f;
|
||||||
public float cellHeight = 0.2f;
|
public float cellHeight = 0.2f;
|
|
@ -30,7 +30,7 @@ namespace DotRecast.Recast.DemoTool
|
||||||
private DemoInputGeomProvider _inputGeom;
|
private DemoInputGeomProvider _inputGeom;
|
||||||
private DtNavMesh _navMesh;
|
private DtNavMesh _navMesh;
|
||||||
private DtNavMeshQuery _navMeshQuery;
|
private DtNavMeshQuery _navMeshQuery;
|
||||||
private readonly RcNavMeshBuildSetting _settings;
|
private readonly RcNavMeshBuildSettings _settings;
|
||||||
private IList<RecastBuilderResult> _recastResults;
|
private IList<RecastBuilderResult> _recastResults;
|
||||||
private bool _changed;
|
private bool _changed;
|
||||||
|
|
||||||
|
@ -39,7 +39,7 @@ namespace DotRecast.Recast.DemoTool
|
||||||
_inputGeom = inputGeom;
|
_inputGeom = inputGeom;
|
||||||
_recastResults = recastResults;
|
_recastResults = recastResults;
|
||||||
_navMesh = navMesh;
|
_navMesh = navMesh;
|
||||||
_settings = new RcNavMeshBuildSetting();
|
_settings = new RcNavMeshBuildSettings();
|
||||||
|
|
||||||
SetQuery(navMesh);
|
SetQuery(navMesh);
|
||||||
_changed = true;
|
_changed = true;
|
||||||
|
@ -65,7 +65,7 @@ namespace DotRecast.Recast.DemoTool
|
||||||
return _navMesh;
|
return _navMesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
public RcNavMeshBuildSetting GetSettings()
|
public RcNavMeshBuildSettings GetSettings()
|
||||||
{
|
{
|
||||||
return _settings;
|
return _settings;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue