FCapsuleGenerator

Generate a Capsule mesh, with UVs wrapped cylindrically.

Windows
MacOS
Linux

Inheritance Hierarchy

FMeshShapeGenerator

FCapsuleGenerator

References

Module

GeometricObjects

Header

/Engine/Plugins/Experimental/GeometryProcessing/Source/GeometricObjects/Public/Generators/CapsuleGenerator.h

Include

#include "Generators/CapsuleGenerator.h"

Syntax

class FCapsuleGenerator : public 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

Name Description

Public variable

bool

 

bPolygroupPerQuad

If true, each quad gets a separate polygroup, otherwise the entire mesh is a single polygroup

Public variable

int

 

NumCircleSteps

Number of vertices along each circle

Public variable

int

 

NumHemisphereArcSteps

Number of vertices along the 90-degree arc from the pole to edge of spherical cap.

Public variable

double

 

Radius

Radius of capsule

Public variable

double

 

SegmentLength

Length of capsule line segment, so total height is SegmentLength + 2*Radius

Overridden from FMeshShapeGenerator

Name Description

Public function Virtual

FMeshShapeGe...

 

Generate()

Generate the mesh

Typedefs

Name

Description

CornerIndices

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss