config

package
v0.0.0-...-208d128 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 9, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SAMPLE_POLYFLAGS_WALK     = 0x01   // Ability to walk (ground, grass, road)
	SAMPLE_POLYFLAGS_SWIM     = 0x02   // Ability to swim (water).
	SAMPLE_POLYFLAGS_DOOR     = 0x04   // Ability to move through doors.
	SAMPLE_POLYFLAGS_JUMP     = 0x08   // Ability to jump.
	SAMPLE_POLYFLAGS_DISABLED = 0x10   // Disabled polygon
	SAMPLE_POLYFLAGS_ALL      = 0xffff // All abilities.

	DESC_SAMPLE_POLYFLAGS_WALK = "Walk"
	DESC_SAMPLE_POLYFLAGS_SWIM = "Swim"
	DESC_SAMPLE_POLYFLAGS_DOOR = "Door"
	DESC_SAMPLE_POLYFLAGS_JUMP = "Jump"
)
View Source
const (
	TOOLMODE_PATHFIND_FOLLOW = iota
	TOOLMODE_PATHFIND_STRAIGHT
	TOOLMODE_PATHFIND_SLICED
	TOOLMODE_RAYCAST
	TOOLMODE_DISTANCE_TO_WALL
	TOOLMODE_FIND_POLYS_IN_CIRCLE
	TOOLMODE_FIND_POLYS_IN_SHAPE
	TOOLMODE_FIND_LOCAL_NEIGHBOURHOOD

	Desc_TOOLMODE_PATHFIND_FOLLOW          = "Pathfind Follow"
	Desc_TOOLMODE_PATHFIND_STRAIGHT        = "Pathfind Straight"
	Desc_TOOLMODE_PATHFIND_SLICED          = "Pathfind Sliced"
	Desc_TOOLMODE_RAYCAST                  = "Raycast"
	Desc_TOOLMODE_DISTANCE_TO_WALL         = "Distance to Wall"
	Desc_TOOLMODE_FIND_POLYS_IN_CIRCLE     = "Find Polys in Circle"
	Desc_TOOLMODE_FIND_POLYS_IN_SHAPE      = "Find Polys in Shape"
	Desc_TOOLMODE_FIND_LOCAL_NEIGHBOURHOOD = "Find Local Neighbourhood"
)
View Source
const (
	DT_STRAIGHTPATH_NONE_CROSSINGS = "none"
	DT_STRAIGHTPATH_AREA_CROSSINGS = "Area"
	DT_STRAIGHTPATH_ALL_CROSSINGS  = "All"
)
View Source
const (
	CrowdTool_TOOLMODE_CREATE CrowdToolToolMode = iota
	CrowdTool_TOOLMODE_MOVE_TARGET
	CrowdTool_TOOLMODE_SELECT
	CrowdTool_TOOLMODE_TOGGLE_POLYS

	DescCrowdTool_TOOLMODE_CREATE       = "Create Agents"
	DescCrowdTool_TOOLMODE_MOVE_TARGET  = "Move Target"
	DescCrowdTool_TOOLMODE_SELECT       = "Select Agent"
	DescCrowdTool_TOOLMODE_TOGGLE_POLYS = "Toggle Polys"
)
View Source
const (
	ExpandOptionsOptimizeVisibility = "Optimize Visibility"
	ExpandOptionsOptimizeTopology   = "Optimize Topology"
	ExpandOptionsAnticipateTurns    = "Anticipate Turns"
	ExpandOptionsObstacleAvoidance  = "Obstacle Avoidance"
	ExpandOptionsSeparation         = "Separation"

	ExpandSelectedDebugDrawShowCorners          = "Show Corners"
	ExpandSelectedDebugDrawShowCollisionSegs    = "Show Collision Segs"
	ExpandSelectedDebugDrawShowPath             = "Show Path"
	ExpandSelectedDebugDrawShowVO               = "Show VO"
	ExpandSelectedDebugDrawShowPathOptimization = "Show Path Optimization"
	ExpandSelectedDebugDrawShowNeighbours       = "Show Neighbours"

	ExpandDebugDrawShowLabels    = "Show Labels"
	ExpandDebugDrawShowProxGrid  = "Show Prox Grid"
	ExpandDebugDrawShowNodes     = "Show Nodes"
	ExpandDebugDrawShowPerfGraph = "Show Perf Graph"
	ExpandDebugDrawShowDetailAll = "Show Detail All"
)
View Source
const (
	SAMPLE_PARTITION_WATERSHED SamplePartitionType = iota
	SAMPLE_PARTITION_MONOTONE
	SAMPLE_PARTITION_LAYERS

	DescSAMPLE_PARTITION_WATERSHED = "Watershed"
	DescSAMPLE_PARTITION_MONOTONE  = "Monotone"
	DescSAMPLE_PARTITION_LAYERS    = "Layers"
)
View Source
const (
	FilteringLowHangingObstacles    = "Low Hanging Obstacles"
	FilteringLedgeSpans             = "Ledge Spans"
	FilteringWalkableLowHeightSpans = "Walkable Low Height Spans"
)
View Source
const (
	DrawInputMesh         = "Input Mesh"
	DrawNavmesh           = "Navmesh"
	DrawNavmeshInvis      = "Navmesh Invis"
	DrawNavmeshTrans      = "Navmesh Trans"
	DrawNavmeshBVTree     = "Navmesh BVTree"
	DrawNavmeshNodes      = "Navmesh Nodes"
	DrawVoxels            = "Voxels"
	DrawWalkableVoxels    = "Walkable Voxels"
	DrawCompact           = "Compact"
	DrawCompactDistance   = "Compact Distance"
	DrawCompactRegions    = "Compact Regions"
	DrawRegionConnections = "Region Connections"
	DrawRawContours       = "Raw Contours"
	DrawBothContours      = "Both Contours"
	DrawContours          = "Contours"
	DrawPolyMesh          = "Poly Mesh"
	DrawPolyMeshDetail    = "Poly Mesh Detail"
	DrawPortals           = "Navmesh Portals"
	DrawCacheBounds       = "Cache Bounds"

	KeepItermediateResults = "Keep Itermediate Results"
	KeepBuildAllTiles      = "Build All Tiles"
)
View Source
const (
	SAMPLE_POLYAREA_GROUND = iota
	SAMPLE_POLYAREA_WATER
	SAMPLE_POLYAREA_ROAD
	SAMPLE_POLYAREA_DOOR
	SAMPLE_POLYAREA_GRASS
	SAMPLE_POLYAREA_JUMP

	Desc_SAMPLE_POLYAREA_GROUND = "Ground"
	Desc_SAMPLE_POLYAREA_WATER  = "Water"
	Desc_SAMPLE_POLYAREA_ROAD   = "Road"
	Desc_SAMPLE_POLYAREA_DOOR   = "Door"
	Desc_SAMPLE_POLYAREA_GRASS  = "Grass"
	Desc_SAMPLE_POLYAREA_JUMP   = "Jump"
)
View Source
const (
	OneWay        = "One Way"
	Bidirectional = "Bidirectional"

	ShowLog   = "show logs"
	ShowTools = "show tools"
)
View Source
const (
	Desc_TOOL_NAVMESH_TESTER      = "Test Navmesh"
	Desc_TOOL_NAVMESH_PRUNE       = "Prune Navmesh"
	Desc_TOOL_OFFMESH_CONNECTION  = "Create Off-Mesh Connections"
	Desc_TOOL_OFFMESH_Links       = "Create Off-Mesh Links"
	Desc_TOOL_CONVEX_VOLUME       = "Create Convex Volumes"
	Desc_TOOL_CROWD               = "Create Crowds"
	Desc_TOOL_CreateTiles         = "Create Tiles"
	Desc_TOOL_CreateTempObstacles = "Create Temp Obstacles"
	Desc_TOOL_HighlightTileCache  = "Highlight Tile Cache"
)
View Source
const (
	SampleSoloMesh      = "Solo Mesh"
	SampleTileMesh      = "Tile Mesh"
	SampleTempObstacles = "Temp Obstacles"
)
View Source
const (
	HighLightTitleCacheDrawAreas = "Draw Areas"
	HighLightTitleDrawRegions    = "Draw Regions"
	HighLightTitleDrawContours   = "Draw Contours"
	HighLightTitleDrawMesh       = "Draw Mesh"
)
View Source
const (
	MeshObjExt = ".obj"
	MeshSetExt = ".gset"
)

Variables

This section is empty.

Functions

func GetInputMeshList

func GetInputMeshList() map[string]string

Types

type Config

type Config struct {
	ToolsConfig *ToolsConfig
	PropsConfig *PropsConfig
}

func NewConfig

func NewConfig() *Config

func (*Config) Reset

func (cfg *Config) Reset()

type CrowdToolToolMode

type CrowdToolToolMode int

type PropsConfig

type PropsConfig struct {
	ShowLogAndShowTool []string
	SampleType         string
	InputMeshLists     map[string]string
	InputMeshPath      string
	OnInputMesh        func()

	VertLabelData binding.String

	RasterizationCellSize   float64
	RasterizationCellHeight float64

	AgentHeight   float64
	AgentRadius   float64
	AgentMaxClimb float64
	AgentMaxSlope float64

	RegionMinRegionSize    float64
	RegionMergedRegionSize float64

	Partitioning string
	Filtering    []string

	PolygonizationMaxEdgeLength float64
	PolygonizationMaxEdgeError  float64
	PolygonizationVertsPerPoly  float64

	DetailMeshSampleDistance       float64
	DetailMeshSampleMaxSampleError float64

	TileSize                         float64
	TileSizeLabel                    binding.String
	TileSizeMaxTitlesLabel           binding.String
	TileSizeMaxPolysLabel            binding.String
	TitleCacheLayersLabel            binding.String
	TitleCacheLayerPerTileLabel      binding.String
	TitleCacheMemoryLabel            binding.String
	TitleCacheNavmeshBuildTimeLabel  binding.String
	TitleCacheBuildPeakMemUsageLabel binding.String

	KeepInterResults []string
	OnSaveClick      func(writer fyne.URIWriteCloser)
	OnLoadClick      func(reader fyne.URIReadCloser)
	BuildTimeLabel   binding.String
	OnBuildClick     func()
	DrawMode         string
}

func (*PropsConfig) HasFiltering

func (cfg *PropsConfig) HasFiltering(s string) bool

func (*PropsConfig) Reset

func (cfg *PropsConfig) Reset()

func (*PropsConfig) SetBuildTimeLabelData

func (cfg *PropsConfig) SetBuildTimeLabelData(totalBuildTimeMs float64)

func (*PropsConfig) SetTileSizeLabel

func (cfg *PropsConfig) SetTileSizeLabel(tw, th int)

func (*PropsConfig) SetTileSizeMaxPolysLabel

func (cfg *PropsConfig) SetTileSizeMaxPolysLabel(maxPolysPerTile int)

func (*PropsConfig) SetTileSizeMaxTitlesLabel

func (cfg *PropsConfig) SetTileSizeMaxTitlesLabel(maxTiles int)

func (*PropsConfig) SetTitleCacheBuildPeakMemUsageLabel

func (cfg *PropsConfig) SetTitleCacheBuildPeakMemUsageLabel(cacheBuildMemUsage int)

func (*PropsConfig) SetTitleCacheLayerPerTileLabel

func (cfg *PropsConfig) SetTitleCacheLayerPerTileLabel(cacheLayerCount float64, gridSize int)

func (*PropsConfig) SetTitleCacheLayersLabel

func (cfg *PropsConfig) SetTitleCacheLayersLabel(cacheLayerCount int)

func (*PropsConfig) SetTitleCacheMemoryLabel

func (cfg *PropsConfig) SetTitleCacheMemoryLabel(cacheCompressedSize, cacheRawSize int, compressionRatio float64)

func (*PropsConfig) SetTitleCacheNavmeshBuildTimeLabel

func (cfg *PropsConfig) SetTitleCacheNavmeshBuildTimeLabel(cacheBuildTimeMs float64)

func (*PropsConfig) SetVertLabelData

func (cfg *PropsConfig) SetVertLabelData(vertCount, triCount float64)

type SamplePartitionType

type SamplePartitionType int

type SamplePolyFlags

type SamplePolyFlags int

type SampleToolType

type SampleToolType int

/ Tool types.

const (
	TOOL_NONE SampleToolType = iota
	TOOL_TILE_EDIT
	TOOL_TILE_HIGHLIGHT
	TOOL_TEMP_OBSTACLE
	TOOL_NAVMESH_TESTER
	TOOL_NAVMESH_PRUNE
	TOOL_OFFMESH_CONNECTION
	TOOL_CONVEX_VOLUME
	TOOL_CROWD
	MAX_TOOLS
)

type SoloMeshDrawMode

type SoloMeshDrawMode int
const (
	SOLOMESH_DRAWMODE_NAVMESH SoloMeshDrawMode = iota
	SOLOMESH_DRAWMODE_NAVMESH_TRANS
	SOLOMESH_DRAWMODE_NAVMESH_BVTREE
	SOLOMESH_DRAWMODE_NAVMESH_NODES
	SOLOMESH_DRAWMODE_NAVMESH_INVIS
	SOLOMESH_DRAWMODE_MESH
	SOLOMESH_DRAWMODE_VOXELS
	SOLOMESH_DRAWMODE_VOXELS_WALKABLE
	SOLOMESH_DRAWMODE_COMPACT
	SOLOMESH_DRAWMODE_COMPACT_DISTANCE
	SOLOMESH_DRAWMODE_COMPACT_REGIONS
	SOLOMESH_DRAWMODE_REGION_CONNECTIONS
	SOLOMESH_DRAWMODE_RAW_CONTOURS
	SOLOMESH_DRAWMODE_BOTH_CONTOURS
	SOLOMESH_DRAWMODE_CONTOURS
	SOLOMESH_DRAWMODE_POLYMESH
	SOLOMESH_DRAWMODE_POLYMESH_DETAIL
	SOLOMESH_MAX_DRAWMODE
)

type ToolMode

type ToolMode int

type ToolsConfig

type ToolsConfig struct {
	Uid         string
	OnUidChange func()
	//TOOL_NAVMESH_TESTER
	PathFindToolMode string
	PathfindStraight string

	OnSetRandomStartClick         func()
	OnSetRandomEndClick           func()
	OnMakeRandomPointsAroundClick func()
	OnMakeRandomPointsClick       func()

	IncludeFlags  []string
	ExcludeFlags  []string
	OnFlagsChange func()

	//TOOL_OFFMESH_CONNECTION
	Bidir string
	//TOOL_CONVEX_VOLUME
	BoxHeight         float64
	BoxDescent        float64
	PolyOffset        float64
	AreaType          string
	OnClearShapeClick func()
	//TOOL_CROWD
	ToolModel               string
	OnToolModelChange       func()
	ExpandOptions           []string
	ExpandOptionsOnchange   func()
	ObstacleAvoidanceType   float64
	SeparationWeight        float64
	ExpandSelectedDebugDraw []string
	ExpandDebugDraw         []string
	//TOOL_CreateTiles
	OnCreateTilesCreateAllClick func()
	OnCreateTilesRemoveAllClick func()
	//CreateTempObstacles
	OneTempObstaclesRemoveAllClick func()
	//HighlightTileCache
	HighlightDrawType string
}

func (*ToolsConfig) GetAnticipateTurns

func (cfg *ToolsConfig) GetAnticipateTurns() bool

func (*ToolsConfig) GetBidir

func (cfg *ToolsConfig) GetBidir() bool

func (*ToolsConfig) GetExpandOptionsUpdateFlags

func (cfg *ToolsConfig) GetExpandOptionsUpdateFlags() int

func (*ToolsConfig) GetObstacleAvoidance

func (cfg *ToolsConfig) GetObstacleAvoidance() bool

func (*ToolsConfig) GetOptimizeTopo

func (cfg *ToolsConfig) GetOptimizeTopo() bool

func (*ToolsConfig) GetOptimizeVis

func (cfg *ToolsConfig) GetOptimizeVis() bool

func (*ToolsConfig) GetSeparation

func (cfg *ToolsConfig) GetSeparation() bool

func (*ToolsConfig) GetShowCollisionSegments

func (cfg *ToolsConfig) GetShowCollisionSegments() bool

func (*ToolsConfig) GetShowCorners

func (cfg *ToolsConfig) GetShowCorners() bool

func (*ToolsConfig) GetShowDetailAll

func (cfg *ToolsConfig) GetShowDetailAll() bool

func (*ToolsConfig) GetShowGrid

func (cfg *ToolsConfig) GetShowGrid() bool

func (*ToolsConfig) GetShowLabels

func (cfg *ToolsConfig) GetShowLabels() bool

func (*ToolsConfig) GetShowNeis

func (cfg *ToolsConfig) GetShowNeis() bool

func (*ToolsConfig) GetShowNodes

func (cfg *ToolsConfig) GetShowNodes() bool

func (*ToolsConfig) GetShowOpt

func (cfg *ToolsConfig) GetShowOpt() bool

func (*ToolsConfig) GetShowPath

func (cfg *ToolsConfig) GetShowPath() bool

func (*ToolsConfig) GetShowPerfGraph

func (cfg *ToolsConfig) GetShowPerfGraph() bool

func (*ToolsConfig) GetShowVO

func (cfg *ToolsConfig) GetShowVO() bool

func (*ToolsConfig) HasExpandOptionsChecked

func (cfg *ToolsConfig) HasExpandOptionsChecked(desc string) bool

func (*ToolsConfig) Reset

func (cfg *ToolsConfig) Reset()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL