MDLMesh.CreateCapsule 方法

定义

重载

CreateCapsule(Vector3, Vector2i, MDLGeometryType, Boolean, Int32, IMDLMeshBufferAllocator)
CreateCapsule(Single, Vector2, nuint, nuint, nuint, MDLGeometryType, Boolean, IMDLMeshBufferAllocator)

根据 中包含的 dimensions宽度、高度和深度,使用指定的段数和几何图形类型创建一个胶囊。

CreateCapsule(Vector3, Vector2i, MDLGeometryType, Boolean, Int32, IMDLMeshBufferAllocator)

[ObjCRuntime.TV(10, 0)]
public static ModelIO.MDLMesh CreateCapsule (OpenTK.Vector3 dimensions, OpenTK.Vector2i segments, ModelIO.MDLGeometryType geometryType, bool inwardNormals, int hemisphereSegments, ModelIO.IMDLMeshBufferAllocator allocator);
static member CreateCapsule : OpenTK.Vector3 * OpenTK.Vector2i * ModelIO.MDLGeometryType * bool * int * ModelIO.IMDLMeshBufferAllocator -> ModelIO.MDLMesh

参数

dimensions
Vector3
segments
Vector2i
geometryType
MDLGeometryType
inwardNormals
Boolean
hemisphereSegments
Int32

返回

属性

适用于

CreateCapsule(Single, Vector2, nuint, nuint, nuint, MDLGeometryType, Boolean, IMDLMeshBufferAllocator)

根据 中包含的 dimensions宽度、高度和深度,使用指定的段数和几何图形类型创建一个胶囊。

[Foundation.Export("newCapsuleWithHeight:radii:radialSegments:verticalSegments:hemisphereSegments:geometryType:inwardNormals:allocator:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 2, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.MacOSX, 10, 12, 2, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.TvOS, 10, 1, ObjCRuntime.PlatformArchitecture.All, null)]
public static ModelIO.MDLMesh CreateCapsule (float height, OpenTK.Vector2 radii, nuint radialSegments, nuint verticalSegments, nuint hemisphereSegments, ModelIO.MDLGeometryType geometryType, bool inwardNormals, ModelIO.IMDLMeshBufferAllocator allocator);
static member CreateCapsule : single * OpenTK.Vector2 * nuint * nuint * nuint * ModelIO.MDLGeometryType * bool * ModelIO.IMDLMeshBufferAllocator -> ModelIO.MDLMesh

参数

height
Single

胶囊的高度。

radii
Vector2

胶囊的半径。

radialSegments
System.System.UIntPtr System.unativeint

要生成的径向段数。

verticalSegments
System.System.UIntPtr System.unativeint

在柱形中生成的垂直段数。

hemisphereSegments
System.System.UIntPtr System.unativeint

要以大写为单位生成的数段。

geometryType
MDLGeometryType

是创建三角形、四边形还是线条。

inwardNormals
Boolean

是否生成内向点法线。

allocator
IMDLMeshBufferAllocator

要使用的分配器,而不是默认的内部分配器。

此参数可以为 null

返回

属性

适用于