Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

MeshConvexDecompositionSettings

繼承: RefCounted < Object

用於 Mesh 凸分解操作的參數。

說明

用於 Mesh 凸分解操作的參數。

屬性

bool

convex_hull_approximation

true

int

convex_hull_downsampling

4

float

max_concavity

1.0

int

max_convex_hulls

1

int

max_num_vertices_per_convex_hull

32

float

min_volume_per_convex_hull

0.0001

Mode

mode

0

bool

normalize_mesh

false

int

plane_downsampling

4

bool

project_hull_vertices

true

int

resolution

10000

float

revolution_axes_clipping_bias

0.05

float

symmetry_planes_clipping_bias

0.05


列舉

enum Mode: 🔗

Mode CONVEX_DECOMPOSITION_MODE_VOXEL = 0

常數,表示基於體素的近似凸分解。

Mode CONVEX_DECOMPOSITION_MODE_TETRAHEDRON = 1

常數,表示基於四面體的近似凸分解。


屬性說明

bool convex_hull_approximation = true 🔗

  • void set_convex_hull_approximation(value: bool)

  • bool get_convex_hull_approximation()

If true, uses approximation for computing convex hulls.


int convex_hull_downsampling = 4 🔗

  • void set_convex_hull_downsampling(value: int)

  • int get_convex_hull_downsampling()

控制凸包生成過程的精度,這個過程發生在選擇裁剪平面的階段。範圍從 116


float max_concavity = 1.0 🔗

  • void set_max_concavity(value: float)

  • float get_max_concavity()

最大凹度。範圍從 0.01.0


int max_convex_hulls = 1 🔗

  • void set_max_convex_hulls(value: int)

  • int get_max_convex_hulls()

合併操作能夠產生的最大凸包數。


int max_num_vertices_per_convex_hull = 32 🔗

  • void set_max_num_vertices_per_convex_hull(value: int)

  • int get_max_num_vertices_per_convex_hull()

控制單個凸包的最大三角形數。範圍從 41024


float min_volume_per_convex_hull = 0.0001 🔗

  • void set_min_volume_per_convex_hull(value: float)

  • float get_min_volume_per_convex_hull()

控制生成凸包的自我調整取樣。範圍從 0.00.01


Mode mode = 0 🔗

  • void set_mode(value: Mode)

  • Mode get_mode()

近似凸分解的模式。


bool normalize_mesh = false 🔗

  • void set_normalize_mesh(value: bool)

  • bool get_normalize_mesh()

If true, normalizes the mesh before applying the convex decomposition.


int plane_downsampling = 4 🔗

  • void set_plane_downsampling(value: int)

  • int get_plane_downsampling()

控制搜索“最佳”裁剪平面的顆粒度。範圍從 116


bool project_hull_vertices = true 🔗

  • void set_project_hull_vertices(value: bool)

  • bool get_project_hull_vertices()

If true, projects output convex hull vertices onto the original source mesh to increase floating-point accuracy of the results.


int resolution = 10000 🔗

  • void set_resolution(value: int)

  • int get_resolution()

體素化階段生成的最大體素數量。


float revolution_axes_clipping_bias = 0.05 🔗

  • void set_revolution_axes_clipping_bias(value: float)

  • float get_revolution_axes_clipping_bias()

控制對沿回轉軸裁剪的偏置。範圍從 0.01.0


float symmetry_planes_clipping_bias = 0.05 🔗

  • void set_symmetry_planes_clipping_bias(value: float)

  • float get_symmetry_planes_clipping_bias()

控制對沿對稱平面裁剪的偏置。範圍從 0.01.0