Navigation
API > API/Runtime > API/Runtime/GeometryCore > API/Runtime/GeometryCore/Generators
Inheritance Hierarchy
- FMeshShapeGenerator
- FCapsuleGenerator
References
| Module | GeometryCore |
| Header | /Engine/Source/Runtime/GeometryCore/Public/Generators/CapsuleGenerator.h |
| Include | #include "Generators/CapsuleGenerator.h" |
Syntax
class FCapsuleGenerator : public UE::Geometry::FMeshShapeGenerator
Remarks
Generate a Capsule mesh, with UVs wrapped cylindrically. This is basically a "stretched" standard sphere triangulation, where we have a set of quad strips "around" the sphere with a disc-shaped cap at each pole. For the Capsule we duplicate the equatorial ring, creating two separate hemispherical caps which are joined with a single quad strip.
The Capsule line segment is oriented along +Z, with the start point at (0,0,0) and the end point at (0,0,SegmentLength). So the lower hemispherical cap is below the origin, ie the bottom pole is at (0,0,-Radius) and the top pole is at (0,0,SegmentLength+Radius).
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bPolygroupPerQuad | If true, each quad gets a separate polygroup, otherwise the entire mesh is a single polygroup | |
| int | NumCircleSteps | Number of vertices along each circle | |
| int | NumHemisphereArcSteps | Number of vertices along the 90-degree arc from the pole to edge of spherical cap. | |
| double | Radius | Radius of capsule | |
| double | SegmentLength | Length of capsule line segment, so total height is SegmentLength + 2*Radius |
Overridden from FMeshShapeGenerator
| Type | Name | Description | |
|---|---|---|---|
| FMeshShapeGenerator & | Generate () |
Generate the mesh |
Typedefs
| Name | Description |
|---|---|
| CornerIndices |