CapsuleGeometry QML Type

Provides geometry for a capsule. More...

Import Statement: import QtQuick3D.Helpers
Since: Qt 6.10
Inherits:

Geometry

Properties

Detailed Description

A geometry for generating a capsule model. The capsule is centered at (0, 0, 0) with the height of the capsule extending in the x direction and the diameter on the yz plane.

Property Documentation

asynchronous : bool [default: true]

This property holds whether the geometry generation should be asynchronous.


diameter : real [default: 100]

Diameter on the yz plane.


enableNormals : bool [default: true]

Generate mesh face normals.


enableUV : bool [default: false]

Generate mesh uv coordinates.


height : real [default: 100]

Height of the middle cylinder on the x axis, excluding the hemispheres.


latitudes : int [default: 16]

Number of latitudes, distributed by inclination. Will always be snapped to an even number.


longitudes : int [default: 32]

Number of longitudes, or meridians, distributed by azimuth.


rings : int [default: 1]

Number of sections in cylinder between hemispheres.


status : bool [read-only]

This property holds the status of the geometry generation when asynchronous is true.

ConstantDescription
CapsuleGeometry.NullThe geometry generation has not started
CapsuleGeometry.ReadyThe geometry generation is complete.
CapsuleGeometry.LoadingThe geometry generation is in progress.
CapsuleGeometry.ErrorThe geometry generation failed.

uvProfile : UvProfile [default: CapsuleGeometry.Fixed]

Manner in which UV coordinates are distributed along the length of the capsule.

ConstantDescription
CapsuleGeometry.FixedThe upper third of the uv texture is the North hemisphere, the middle third is the cylinder and the last third is the South hemisphere.
CapsuleGeometry.AspectUVs match the height to radius ratio.
CapsuleGeometry.UniformUniform proportion for all UV cells, according to the ratio of latitudes to rings.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.