Up to date

This page is up to date for Godot 4.2. If you still find outdated information, please open an issue.

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 ( float value )

  • float get_height ( )

球体的全高。


bool is_hemisphere = false

  • void set_is_hemisphere ( bool value )

  • bool get_is_hemisphere ( )

如果为 true,则创建一个半球而不是一个完整的球体。

注意:要得到一个规则的半球,球体的高度和半径必须相等。


int radial_segments = 64

  • void set_radial_segments ( int value )

  • int get_radial_segments ( )

球体上的径向段数。


float radius = 0.5

  • void set_radius ( float value )

  • float get_radius ( )

球体半径.


int rings = 32

  • void set_rings ( int value )

  • int get_rings ( )

沿着球体高度的段数。