Up to date
This page is up to date for Godot 4.1
. If you still find outdated information, please open an issue.
NavigationMeshSourceGeometryData3D
Inherits: Resource < RefCounted < Object
Container for parsed source geometry data used in navigation mesh baking.
Description
Container for parsed source geometry data used in navigation mesh baking.
Methods
void | add_faces ( PackedVector3Array faces, Transform3D xform ) |
void | add_mesh ( Mesh mesh, Transform3D xform ) |
void | add_mesh_array ( Array mesh_array, Transform3D xform ) |
void | clear ( ) |
get_indices ( ) const | |
get_vertices ( ) const | |
has_data ( ) | |
void | set_indices ( PackedInt32Array indices ) |
void | set_vertices ( PackedFloat32Array vertices ) |
Method Descriptions
void add_faces ( PackedVector3Array faces, Transform3D xform )
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 resource have no transform all vertex positions need to be offset by the node’s transform using the xform
parameter.
void add_mesh ( Mesh mesh, Transform3D 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 resource have no transform all vertex positions need to be offset by the node’s transform using the xform
parameter.
void add_mesh_array ( Array mesh_array, Transform3D xform )
Adds an Array the size of Mesh.ARRAY_MAX and with vertices at index Mesh.ARRAY_VERTEX and indices at index Mesh.ARRAY_INDEX to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since NavigationMesh resource have no transform all vertex positions need to be offset by the node’s transform using the xform
parameter.
void clear ( )
Clears the internal data.
PackedInt32Array get_indices ( ) const
Returns the parsed source geometry data indices array.
PackedFloat32Array get_vertices ( ) const
Returns the parsed source geometry data vertices array.
bool has_data ( )
Returns true when parsed source geometry data exists.
void set_indices ( PackedInt32Array indices )
Sets the parsed source geometry data indices. The indices need to be matched with appropriated vertices.
Warning: Inappropriate data can crash the baking process of the involved third-party libraries.
void set_vertices ( PackedFloat32Array vertices )
Sets the parsed source geometry data vertices. The vertices need to be matched with appropriated indices.
Warning: Inappropriate data can crash the baking process of the involved third-party libraries.