Container for parsed source geometry data used in navigation mesh baking.
Container for parsed source geometry data used in navigation mesh baking.
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 [param xform].
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 [param xform].
Adds an [Array] the size of [constant Mesh.ARRAY_MAX] and with vertices at index [constant Mesh.ARRAY_VERTEX] and indices at index [constant Mesh.ARRAY_INDEX] 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 [param xform].
Adds a projected obstruction shape to the source geometry. The [param vertices] are considered projected on an xz-axes plane, placed at the global y-axis [param elevation] and extruded by [param height]. If [param carve] is [code]true[/code] the carved shape will not be affected by additional offsets (e.g. agent radius) of the navigation mesh baking process.
Appends arrays of [param vertices] and [param indices] at the end of the existing arrays. Adds the existing index as an offset to the appended indices.
Clears the internal data.
Clears all projected obstructions.
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.
Returns the parsed source geometry data indices array.
Returns the projected obstructions as an [Array] of dictionaries. Each [Dictionary] contains the following entries: - [code]vertices[/code] - A [PackedFloat32Array] that defines the outline points of the projected shape. - [code]elevation[/code] - A [float] that defines the projected shape placement on the y-axis. - [code]height[/code] - A [float] that defines how much the projected shape is extruded along the y-axis. - [code]carve[/code] - A [bool] that defines how the obstacle affects the navigation mesh baking. If [code]true[/code] the projected shape will not be affected by addition offsets, e.g. agent radius.
Returns the parsed source geometry data vertices array.
Returns [code]true[/code] when parsed source geometry data exists.
Adds the geometry data of another [NavigationMeshSourceGeometryData3D] to the navigation mesh baking data.
Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices. [b]Warning:[/b] Inappropriate data can crash the baking process of the involved third-party libraries.
Sets the projected obstructions with an Array of Dictionaries with the following key value pairs: [codeblocks] [gdscript] "vertices" : PackedFloat32Array "elevation" : float "height" : float "carve" : bool [/gdscript] [/codeblocks]
Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices. [b]Warning:[/b] Inappropriate data can crash the baking process of the involved third-party libraries.