NavigationMesh

package
v0.0.0-...-ae8aae0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2025 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package NavigationMesh provides methods for working with NavigationMesh object instances.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Advanced

type Advanced = class

Advanced exposes a 1:1 low-level instance of the class, undocumented, for those who know what they are doing.

type Any

type Any interface {
	gd.IsClass
	AsNavigationMesh() Instance
}

type Instance

type Instance [1]gdclass.NavigationMesh

A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces.

var Nil Instance

Nil is a nil/null instance of the class. Equivalent to the zero value.

func New

func New() Instance

func (Instance) AddPolygon

func (self Instance) AddPolygon(polygon []int32)

Adds a polygon using the indices of the vertices you get when calling [method get_vertices].

func (Instance) AgentHeight

func (self Instance) AgentHeight() Float.X

func (Instance) AgentMaxClimb

func (self Instance) AgentMaxClimb() Float.X

func (Instance) AgentMaxSlope

func (self Instance) AgentMaxSlope() Float.X

func (Instance) AgentRadius

func (self Instance) AgentRadius() Float.X

func (Instance) AsNavigationMesh

func (self Instance) AsNavigationMesh() Instance

func (Instance) AsObject

func (self Instance) AsObject() [1]gd.Object

func (Instance) AsRefCounted

func (self Instance) AsRefCounted() [1]gd.RefCounted

func (Instance) AsResource

func (self Instance) AsResource() Resource.Instance

func (Instance) BorderSize

func (self Instance) BorderSize() Float.X

func (Instance) CellHeight

func (self Instance) CellHeight() Float.X

func (Instance) CellSize

func (self Instance) CellSize() Float.X

func (Instance) Clear

func (self Instance) Clear()

Clears the internal arrays for vertices and polygon indices.

func (Instance) ClearPolygons

func (self Instance) ClearPolygons()

Clears the array of polygons, but it doesn't clear the array of vertices.

func (Instance) CreateFromMesh

func (self Instance) CreateFromMesh(mesh [1]gdclass.Mesh)

Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. [b]Note:[/b] The given [param mesh] must be of type [constant Mesh.PRIMITIVE_TRIANGLES] and have an index array.

func (Instance) DetailSampleDistance

func (self Instance) DetailSampleDistance() Float.X

func (Instance) DetailSampleMaxError

func (self Instance) DetailSampleMaxError() Float.X

func (Instance) EdgeMaxError

func (self Instance) EdgeMaxError() Float.X

func (Instance) EdgeMaxLength

func (self Instance) EdgeMaxLength() Float.X

func (Instance) FilterBakingAabb

func (self Instance) FilterBakingAabb() AABB.PositionSize

func (Instance) FilterBakingAabbOffset

func (self Instance) FilterBakingAabbOffset() Vector3.XYZ

func (Instance) FilterLedgeSpans

func (self Instance) FilterLedgeSpans() bool

func (Instance) FilterLowHangingObstacles

func (self Instance) FilterLowHangingObstacles() bool

func (Instance) FilterWalkableLowHeightSpans

func (self Instance) FilterWalkableLowHeightSpans() bool

func (Instance) GeometryCollisionMask

func (self Instance) GeometryCollisionMask() int

func (Instance) GeometryParsedGeometryType

func (self Instance) GeometryParsedGeometryType() gdclass.NavigationMeshParsedGeometryType

func (Instance) GeometrySourceGeometryMode

func (self Instance) GeometrySourceGeometryMode() gdclass.NavigationMeshSourceGeometryMode

func (Instance) GeometrySourceGroupName

func (self Instance) GeometrySourceGroupName() string

func (Instance) GetCollisionMaskValue

func (self Instance) GetCollisionMaskValue(layer_number int) bool

Returns whether or not the specified layer of the [member geometry_collision_mask] is enabled, given a [param layer_number] between 1 and 32.

func (Instance) GetPolygon

func (self Instance) GetPolygon(idx int) []int32

Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon.

func (Instance) GetPolygonCount

func (self Instance) GetPolygonCount() int

Returns the number of polygons in the navigation mesh.

func (Instance) RegionMergeSize

func (self Instance) RegionMergeSize() Float.X

func (Instance) RegionMinSize

func (self Instance) RegionMinSize() Float.X

func (Instance) SamplePartitionType

func (self Instance) SamplePartitionType() gdclass.NavigationMeshSamplePartitionType

func (Instance) SetAgentHeight

func (self Instance) SetAgentHeight(value Float.X)

func (Instance) SetAgentMaxClimb

func (self Instance) SetAgentMaxClimb(value Float.X)

func (Instance) SetAgentMaxSlope

func (self Instance) SetAgentMaxSlope(value Float.X)

func (Instance) SetAgentRadius

func (self Instance) SetAgentRadius(value Float.X)

func (Instance) SetBorderSize

func (self Instance) SetBorderSize(value Float.X)

func (Instance) SetCellHeight

func (self Instance) SetCellHeight(value Float.X)

func (Instance) SetCellSize

func (self Instance) SetCellSize(value Float.X)

func (Instance) SetCollisionMaskValue

func (self Instance) SetCollisionMaskValue(layer_number int, value bool)

Based on [param value], enables or disables the specified layer in the [member geometry_collision_mask], given a [param layer_number] between 1 and 32.

func (Instance) SetDetailSampleDistance

func (self Instance) SetDetailSampleDistance(value Float.X)

func (Instance) SetDetailSampleMaxError

func (self Instance) SetDetailSampleMaxError(value Float.X)

func (Instance) SetEdgeMaxError

func (self Instance) SetEdgeMaxError(value Float.X)

func (Instance) SetEdgeMaxLength

func (self Instance) SetEdgeMaxLength(value Float.X)

func (Instance) SetFilterBakingAabb

func (self Instance) SetFilterBakingAabb(value AABB.PositionSize)

func (Instance) SetFilterBakingAabbOffset

func (self Instance) SetFilterBakingAabbOffset(value Vector3.XYZ)

func (Instance) SetFilterLedgeSpans

func (self Instance) SetFilterLedgeSpans(value bool)

func (Instance) SetFilterLowHangingObstacles

func (self Instance) SetFilterLowHangingObstacles(value bool)

func (Instance) SetFilterWalkableLowHeightSpans

func (self Instance) SetFilterWalkableLowHeightSpans(value bool)

func (Instance) SetGeometryCollisionMask

func (self Instance) SetGeometryCollisionMask(value int)

func (Instance) SetGeometryParsedGeometryType

func (self Instance) SetGeometryParsedGeometryType(value gdclass.NavigationMeshParsedGeometryType)

func (Instance) SetGeometrySourceGeometryMode

func (self Instance) SetGeometrySourceGeometryMode(value gdclass.NavigationMeshSourceGeometryMode)

func (Instance) SetGeometrySourceGroupName

func (self Instance) SetGeometrySourceGroupName(value string)

func (Instance) SetRegionMergeSize

func (self Instance) SetRegionMergeSize(value Float.X)

func (Instance) SetRegionMinSize

func (self Instance) SetRegionMinSize(value Float.X)

func (Instance) SetSamplePartitionType

func (self Instance) SetSamplePartitionType(value gdclass.NavigationMeshSamplePartitionType)

func (Instance) SetVertices

func (self Instance) SetVertices(value []Vector3.XYZ)

func (Instance) SetVerticesPerPolygon

func (self Instance) SetVerticesPerPolygon(value Float.X)

func (*Instance) UnsafePointer

func (self *Instance) UnsafePointer() unsafe.Pointer

func (Instance) Vertices

func (self Instance) Vertices() []Vector3.XYZ

func (Instance) VerticesPerPolygon

func (self Instance) VerticesPerPolygon() Float.X

func (Instance) Virtual

func (self Instance) Virtual(name string) reflect.Value

type ParsedGeometryType

type ParsedGeometryType = gdclass.NavigationMeshParsedGeometryType //gd:NavigationMesh.ParsedGeometryType
const (
	/*Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes.*/
	ParsedGeometryMeshInstances ParsedGeometryType = 0
	/*Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry_collision_mask].*/
	ParsedGeometryStaticColliders ParsedGeometryType = 1
	/*Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS].*/
	ParsedGeometryBoth ParsedGeometryType = 2
	/*Represents the size of the [enum ParsedGeometryType] enum.*/
	ParsedGeometryMax ParsedGeometryType = 3
)

type SamplePartitionType

type SamplePartitionType = gdclass.NavigationMeshSamplePartitionType //gd:NavigationMesh.SamplePartitionType
const (
	/*Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas.*/
	SamplePartitionWatershed SamplePartitionType = 0
	/*Monotone partitioning. Use this if you want fast navigation mesh generation.*/
	SamplePartitionMonotone SamplePartitionType = 1
	/*Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles.*/
	SamplePartitionLayers SamplePartitionType = 2
	/*Represents the size of the [enum SamplePartitionType] enum.*/
	SamplePartitionMax SamplePartitionType = 3
)

type SourceGeometryMode

type SourceGeometryMode = gdclass.NavigationMeshSourceGeometryMode //gd:NavigationMesh.SourceGeometryMode
const (
	/*Scans the child nodes of the root node recursively for geometry.*/
	SourceGeometryRootNodeChildren SourceGeometryMode = 0
	/*Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry_source_group_name].*/
	SourceGeometryGroupsWithChildren SourceGeometryMode = 1
	/*Uses nodes in a group for geometry. The group is specified by [member geometry_source_group_name].*/
	SourceGeometryGroupsExplicit SourceGeometryMode = 2
	/*Represents the size of the [enum SourceGeometryMode] enum.*/
	SourceGeometryMax SourceGeometryMode = 3
)

Jump to

Keyboard shortcuts

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