Class RecastConfig

java.lang.Object
org.recast4j.recast.RecastConfig

public class RecastConfig extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    The size of the non-navigable border around the heightfield.
    final boolean
    Set to false to disable building detailed mesh
    final float
    The y-axis cell size to use for fields.
    final float
    The xz-plane cell size to use for fields.
    final float
    Sets the sampling distance to use when generating the detail mesh.
    final float
    The maximum distance the detail mesh surface should deviate from heightfield data.
    final boolean
     
    final boolean
     
    final boolean
     
    final int
    The maximum allowed length for contour edges along the border of the mesh.
    final float
     
    final float
    The maximum distance a simplfied contour's border edges should deviate the original raw contour.
    final int
    The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process.
    final int
    Any regions with a span count smaller than this value will, if possible, be merged with larger regions.
    final float
     
    final int
    The minimum number of cells allowed to form isolated island areas.
    final float
    Set of original settings passed in world units
     
    final int
    The width/depth size of tile's on the xz-plane.
    final int
     
    final boolean
     
     
    final int
    Maximum ledge height that is considered to still be traversable.
    final float
     
    final int
    Minimum floor to 'ceiling' height that will still allow the floor area to be considered walkable.
    final float
     
    final int
    The distance to erode/shrink the walkable area of the heightfield away from obstructions.
    final float
     
    final float
    The maximum slope that is considered walkable.
  • Constructor Summary

    Constructors
    Constructor
    Description
    RecastConfig(boolean useTiles, int tileSizeX, int tileSizeZ, int borderSize, RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentMaxSlope, boolean filterLowHangingObstacles, boolean filterLedgeSpans, boolean filterWalkableLowHeightSpans, float agentHeight, float agentRadius, float agentMaxClimb, float minRegionArea, float mergeRegionArea, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, boolean buildMeshDetail, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod)
     
    RecastConfig(RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentMaxSlope, boolean filterLowHangingObstacles, boolean filterLedgeSpans, boolean filterWalkableLowHeightSpans, float agentHeight, float agentRadius, float agentMaxClimb, int regionMinSize, int regionMergeSize, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod, boolean buildMeshDetail)
    Non-tiled build configuration
    RecastConfig(RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentHeight, float agentRadius, float agentMaxClimb, float agentMaxSlope, int regionMinSize, int regionMergeSize, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod)
    Non-tiled build configuration
  • Method Summary

    Modifier and Type
    Method
    Description
    static int
    calcBorder(float agentRadius, float cs)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • partitionType

      public final RecastConstants.PartitionType partitionType
    • useTiles

      public final boolean useTiles
    • tileSizeX

      public final int tileSizeX
      The width/depth size of tile's on the xz-plane. [Limit: >= 0] [Units: vx]
    • tileSizeZ

      public final int tileSizeZ
    • cs

      public final float cs
      The xz-plane cell size to use for fields. [Limit: > 0] [Units: wu]
    • ch

      public final float ch
      The y-axis cell size to use for fields. [Limit: > 0] [Units: wu]
    • walkableSlopeAngle

      public final float walkableSlopeAngle
      The maximum slope that is considered walkable. [Limits: 0 <= value < 90] [Units: Degrees]
    • walkableHeight

      public final int walkableHeight
      Minimum floor to 'ceiling' height that will still allow the floor area to be considered walkable. [Limit: >= 3] [Units: vx]
    • walkableClimb

      public final int walkableClimb
      Maximum ledge height that is considered to still be traversable. [Limit: >=0] [Units: vx]
    • walkableRadius

      public final int walkableRadius
      The distance to erode/shrink the walkable area of the heightfield away from obstructions. [Limit: >=0] [Units: vx]
    • maxEdgeLen

      public final int maxEdgeLen
      The maximum allowed length for contour edges along the border of the mesh. [Limit: >=0] [Units: vx]
    • maxSimplificationError

      public final float maxSimplificationError
      The maximum distance a simplfied contour's border edges should deviate the original raw contour. [Limit: >=0] [Units: vx]
    • minRegionArea

      public final int minRegionArea
      The minimum number of cells allowed to form isolated island areas. [Limit: >=0] [Units: vx]
    • mergeRegionArea

      public final int mergeRegionArea
      Any regions with a span count smaller than this value will, if possible, be merged with larger regions. [Limit: >=0] [Units: vx]
    • maxVertsPerPoly

      public final int maxVertsPerPoly
      The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. [Limit: >= 3]
    • detailSampleDist

      public final float detailSampleDist
      Sets the sampling distance to use when generating the detail mesh. (For height detail only.) [Limits: 0 or >= 0.9] [Units: wu]
    • detailSampleMaxError

      public final float detailSampleMaxError
      The maximum distance the detail mesh surface should deviate from heightfield data. (For height detail only.) [Limit: >=0] [Units: wu]
    • walkableAreaMod

      public final AreaModification walkableAreaMod
    • filterLowHangingObstacles

      public final boolean filterLowHangingObstacles
    • filterLedgeSpans

      public final boolean filterLedgeSpans
    • filterWalkableLowHeightSpans

      public final boolean filterWalkableLowHeightSpans
    • buildMeshDetail

      public final boolean buildMeshDetail
      Set to false to disable building detailed mesh
    • borderSize

      public final int borderSize
      The size of the non-navigable border around the heightfield. [Limit: >=0] [Units: vx]
    • minRegionAreaWorld

      public final float minRegionAreaWorld
      Set of original settings passed in world units
    • mergeRegionAreaWorld

      public final float mergeRegionAreaWorld
    • walkableHeightWorld

      public final float walkableHeightWorld
    • walkableClimbWorld

      public final float walkableClimbWorld
    • walkableRadiusWorld

      public final float walkableRadiusWorld
    • maxEdgeLenWorld

      public final float maxEdgeLenWorld
  • Constructor Details

    • RecastConfig

      public RecastConfig(RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentHeight, float agentRadius, float agentMaxClimb, float agentMaxSlope, int regionMinSize, int regionMergeSize, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod)
      Non-tiled build configuration
    • RecastConfig

      public RecastConfig(RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentMaxSlope, boolean filterLowHangingObstacles, boolean filterLedgeSpans, boolean filterWalkableLowHeightSpans, float agentHeight, float agentRadius, float agentMaxClimb, int regionMinSize, int regionMergeSize, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod, boolean buildMeshDetail)
      Non-tiled build configuration
    • RecastConfig

      public RecastConfig(boolean useTiles, int tileSizeX, int tileSizeZ, int borderSize, RecastConstants.PartitionType partitionType, float cellSize, float cellHeight, float agentMaxSlope, boolean filterLowHangingObstacles, boolean filterLedgeSpans, boolean filterWalkableLowHeightSpans, float agentHeight, float agentRadius, float agentMaxClimb, float minRegionArea, float mergeRegionArea, float edgeMaxLen, float edgeMaxError, int vertsPerPoly, boolean buildMeshDetail, float detailSampleDist, float detailSampleMaxError, AreaModification walkableAreaMod)
  • Method Details

    • calcBorder

      public static int calcBorder(float agentRadius, float cs)