MDLMesh.CreateCapsule Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| CreateCapsule(Vector3, NVector2i, MDLGeometryType, Boolean, Int32, IMDLMeshBufferAllocator) | |
| CreateCapsule(Single, Vector2, UIntPtr, UIntPtr, UIntPtr, MDLGeometryType, Boolean, IMDLMeshBufferAllocator) |
Creates a capsule from the width and radii, with the specified number of segments and geometry kind. |
CreateCapsule(Vector3, NVector2i, MDLGeometryType, Boolean, Int32, IMDLMeshBufferAllocator)
public static ModelIO.MDLMesh CreateCapsule(System.Numerics.Vector3 dimensions, CoreGraphics.NVector2i segments, ModelIO.MDLGeometryType geometryType, bool inwardNormals, int hemisphereSegments, ModelIO.IMDLMeshBufferAllocator allocator);
static member CreateCapsule : System.Numerics.Vector3 * CoreGraphics.NVector2i * ModelIO.MDLGeometryType * bool * int * ModelIO.IMDLMeshBufferAllocator -> ModelIO.MDLMesh
Parameters
- dimensions
- Vector3
- segments
- NVector2i
- geometryType
- MDLGeometryType
- inwardNormals
- Boolean
- hemisphereSegments
- Int32
- allocator
- IMDLMeshBufferAllocator
Returns
Applies to
CreateCapsule(Single, Vector2, UIntPtr, UIntPtr, UIntPtr, MDLGeometryType, Boolean, IMDLMeshBufferAllocator)
Creates a capsule from the width and radii, with the specified number of segments and geometry kind.
[Foundation.Export("newCapsuleWithHeight:radii:radialSegments:verticalSegments:hemisphereSegments:geometryType:inwardNormals:allocator:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static ModelIO.MDLMesh CreateCapsule(float height, System.Numerics.Vector2 radii, UIntPtr radialSegments, UIntPtr verticalSegments, UIntPtr hemisphereSegments, ModelIO.MDLGeometryType geometryType, bool inwardNormals, ModelIO.IMDLMeshBufferAllocator? allocator);
[<Foundation.Export("newCapsuleWithHeight:radii:radialSegments:verticalSegments:hemisphereSegments:geometryType:inwardNormals:allocator:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member CreateCapsule : single * System.Numerics.Vector2 * unativeint * unativeint * unativeint * ModelIO.MDLGeometryType * bool * ModelIO.IMDLMeshBufferAllocator -> ModelIO.MDLMesh
Parameters
- height
- Single
The height of the capsule.
- radii
- Vector2
The radii of the capsule.
- radialSegments
-
UIntPtr
unativeint
The number of radial segments to generate.
- verticalSegments
-
UIntPtr
unativeint
The number of vertical segments to generate in the cylinder.
- hemisphereSegments
-
UIntPtr
unativeint
The number segments to generate in the caps.
- geometryType
- MDLGeometryType
Whether to create triangles, quadrilaterals, or lines.
- inwardNormals
- Boolean
Whether to generate inward-pointing normals.
- allocator
- IMDLMeshBufferAllocator
The allocator to use instead of the default, internal allocator.
This parameter can be null.
Returns
- Attributes