NavigationMeshSourceGeometryData3D

package
v0.0.0-...-357ca8a Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2025 License: MIT Imports: 28 Imported by: 0

Documentation

Overview

Container for parsed source geometry data used in navigation mesh baking.

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
	AsNavigationMeshSourceGeometryData3D() Instance
}

type Extension

type Extension[T gdclass.Interface] struct{ gdclass.Extension[T, Instance] }

Extension can be embedded in a new struct to create an extension of this class. T should be the type that is embedding this Extension

func (*Extension[T]) AsNavigationMeshSourceGeometryData3D

func (self *Extension[T]) AsNavigationMeshSourceGeometryData3D() Instance

func (*Extension[T]) AsObject

func (self *Extension[T]) AsObject() [1]gd.Object

func (*Extension[T]) AsRefCounted

func (self *Extension[T]) AsRefCounted() [1]gd.RefCounted

func (*Extension[T]) AsResource

func (self *Extension[T]) AsResource() Resource.Instance

type ID

type ID Object.ID

ID is a typed object ID (reference) to an instance of this class, use it to store references to objects with unknown lifetimes, as an ID will not panic on use if the underlying object has been destroyed.

func (ID) Instance

func (id ID) Instance() (Instance, bool)

type Instance

Instance of the class with convieniently typed arguments and results.

var Nil Instance

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

func New

func New() Instance

func (Instance) AddFaces

func (self Instance) AddFaces(faces []Vector3.XYZ, xform Transform3D.BasisOrigin)

Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since NavigationMesh resources have no transform, all vertex positions need to be offset by the node's transform using 'xform'.

func (Instance) AddMesh

func (self Instance) AddMesh(mesh Mesh.Instance, xform Transform3D.BasisOrigin)

Adds the geometry data of a Mesh resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since NavigationMesh resources have no transform, all vertex positions need to be offset by the node's transform using 'xform'.

func (Instance) AddMeshArray

func (self Instance) AddMeshArray(mesh_array []any, xform Transform3D.BasisOrigin)

Adds an slice the size of [Mesh.ArrayMax] and with vertices at index [Mesh.ArrayVertex] and indices at index [Mesh.ArrayIndex] to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since NavigationMesh resources have no transform, all vertex positions need to be offset by the node's transform using 'xform'.

func (Instance) AddProjectedObstruction

func (self Instance) AddProjectedObstruction(vertices []Vector3.XYZ, elevation Float.X, height Float.X, carve bool)

Adds a projected obstruction shape to the source geometry. The 'vertices' are considered projected on an xz-axes plane, placed at the global y-axis 'elevation' and extruded by 'height'. If 'carve' is true the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.

func (Instance) AppendArrays

func (self Instance) AppendArrays(vertices []float32, indices []int32)

Appends arrays of 'vertices' and 'indices' at the end of the existing arrays. Adds the existing index as an offset to the appended indices.

func (Instance) AsNavigationMeshSourceGeometryData3D

func (self Instance) AsNavigationMeshSourceGeometryData3D() 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) Clear

func (self Instance) Clear()

Clears the internal data.

func (Instance) ClearProjectedObstructions

func (self Instance) ClearProjectedObstructions()

Clears all projected obstructions.

func (Instance) GetBounds

func (self Instance) GetBounds() AABB.PositionSize

Returns an axis-aligned bounding box that covers all the stored geometry data. The bounds are calculated when calling this function with the result cached until further geometry changes are made.

func (Instance) HasData

func (self Instance) HasData() bool

Returns true when parsed source geometry data exists.

func (Instance) ID

func (self Instance) ID() ID

func (Instance) Indices

func (self Instance) Indices() []int32

func (Instance) Merge

func (self Instance) Merge(other_geometry Instance)

Adds the geometry data of another NavigationMeshSourceGeometryData3D to the navigation mesh baking data.

func (Instance) ProjectedObstructions

func (self Instance) ProjectedObstructions() []ProjectedObstruction3D

func (Instance) SetIndices

func (self Instance) SetIndices(value []int32)

SetIndices sets the property returned by [GetIndices].

func (*Instance) SetObject

func (self *Instance) SetObject(obj [1]gd.Object) bool

func (Instance) SetProjectedObstructions

func (self Instance) SetProjectedObstructions(value []ProjectedObstruction3D)

SetProjectedObstructions sets the property returned by [GetProjectedObstructions].

func (Instance) SetVertices

func (self Instance) SetVertices(value []float32)

SetVertices sets the property returned by [GetVertices].

func (Instance) Vertices

func (self Instance) Vertices() []float32

func (Instance) Virtual

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

type ProjectedObstruction3D

type ProjectedObstruction3D struct {
	Vertices  []float32 `gd:"vertices"`
	Elevation float32   `gd:"elevation"`
	Height    float32   `gd:"height"`
	Carve     bool      `gd:"carve"`
}

Jump to

Keyboard shortcuts

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