2.7 KiB
VoxelMesher
Inherits: Resource
Base class for all meshing algorithms.
Description:
In order to be rendered by Godot, voxels can be transformed into a mesh. There are various ways to do this, that's why this class is only a base for other, specialized ones. Voxel nodes automatically make use of meshers, but you can also produce meshes manually. For this, you may use one of the derived classes. Meshers can be re-used, which often yields better performance by reducing memory allocations.
Methods:
Return | Signature |
---|---|
Mesh | build_mesh ( VoxelBuffer voxel_buffer, Array materials ) |
int | get_maximum_padding ( ) const |
int | get_minimum_padding ( ) const |
Method Descriptions
- Mesh build_mesh( VoxelBuffer voxel_buffer, Array materials )
Builds a mesh from the provided voxels. Materials will be attached to each surface based on the provided array. The way materials are used can depend on the type of mesher.
- int get_maximum_padding( )
Gets by how much voxels must be padded before their lower corner in order for the mesher to work.
- int get_minimum_padding( )
Gets by how much voxels must be padded after their upper corner in order for the mesher to work.
Generated on Jan 21, 2021