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.

SphereMesh

繼承: PrimitiveMesh < Mesh < Resource < RefCounted < Object

表示球形 PrimitiveMesh 的類。

說明

表示球形 PrimitiveMesh 的類。

屬性

float

height

1.0

bool

is_hemisphere

false

int

radial_segments

64

float

radius

0.5

int

rings

32


屬性說明

float height = 1.0 🔗

  • void set_height(value: float)

  • float get_height()

球體的全高。


bool is_hemisphere = false 🔗

  • void set_is_hemisphere(value: bool)

  • bool get_is_hemisphere()

如果為 true,則建立一個半球而不是一個完整的球體。

注意:要得到一個規則的半球,球體的高度和半徑必須相等。


int radial_segments = 64 🔗

  • void set_radial_segments(value: int)

  • int get_radial_segments()

球體上的徑向段數。


float radius = 0.5 🔗

  • void set_radius(value: float)

  • float get_radius()

球體半徑.


int rings = 32 🔗

  • void set_rings(value: int)

  • int get_rings()

沿著球體高度的段數。