CreateSphere()

语法

Result = CreateSphere(#Mesh, Radius [Segments, Rings])
概要
Create a new sphere.

参数

#Mesh The number to identify the new mesh. #PB_Any can be used to auto-generate this number.
Radius Radius, in world unit, of the sphere.
Segments (optional) Number of segments to create the sphere. The segments are the vertical lines of the sphere. The more segments, the more realistic the sphere will be, but it will also affect the rendering speed if too many of them are specified.
Rings (optional) Number of rings to create the sphere. The rings are the horizontal lines of the sphere. The more rings, the more realistic the sphere will be, but it will also affect the rendering speed if too many of them are specified.

返回值

Returns nonzero if the mesh was created successfully and zero if there was an error. If #PB_Any was used as the #Mesh parameter then the new generated number is returned on success.

参阅

FreeMesh(), CreateCylinder(), CreateMesh(), CreateCube(), CreatePlane(), CreateLine3D()

已支持操作系统

所有

<- CreatePlane() - Mesh Index - FinishMesh() ->