UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
UE::Geometry::FCurvedStairGenerator Class Reference

#include <StairGenerator.h>

+ Inheritance diagram for UE::Geometry::FCurvedStairGenerator:

Public Member Functions

 FCurvedStairGenerator ()
 
virtual ~FCurvedStairGenerator () override
 
- Public Member Functions inherited from UE::Geometry::FStairGenerator
virtual GEOMETRYCORE_API ~FStairGenerator () override
 
virtual GEOMETRYCORE_API FMeshShapeGeneratorGenerate () override
 
- Public Member Functions inherited from UE::Geometry::FMeshShapeGenerator
virtual ~FMeshShapeGenerator ()
 
bool HasAttributes () const
 
void ResetAttributes (bool bResetPolygonIDs=false)
 
void Reset ()
 
void SetBufferSizes (int NumVertices, int NumTriangles, int NumUVs, int NumNormals)
 
void ExtendBufferSizes (int AddVertices, int AddTriangles, int AddUVs, int AddNormals)
 
void SetVertex (int Index, const FVector3d &Position)
 
int AppendVertex (const FVector3d &Position)
 
void SetUV (int Index, const FVector2f &UV, int ParentVertex)
 
int AppendUV (const FVector2f &UV, int ParentVertex)
 
void SetNormal (int Index, const FVector3f &Normal, int ParentVertex)
 
int AppendNormal (const FVector3f &Normal, int ParentVertex)
 
void SetTriangle (int Index, const FIndex3i &Tri)
 
void SetTriangle (int Index, int A, int B, int C)
 
void SetTriangle (int Index, int A, int B, int C, bool bClockwiseOverride)
 
int AppendTriangle (int A, int B, int C)
 
void SetTriangleUVs (int Index, const FIndex3i &Tri)
 
void SetTriangleUVs (int Index, int A, int B, int C)
 
void SetTriangleUVs (int Index, int A, int B, int C, bool bClockwiseOverride)
 
void SetTriangleNormals (int Index, const FIndex3i &Tri)
 
void SetTriangleNormals (int Index, int A, int B, int C)
 
void SetTriangleNormals (int Index, int A, int B, int C, bool bClockwiseOverride)
 
void SetTrianglePolygon (int Index, int PolygonID)
 
void SetTriangleWithMatchedUVNormal (int Index, int A, int B, int C)
 

Public Attributes

float InnerRadius = 150.0f
 
float CurveAngle = 90.0f
 
- Public Attributes inherited from UE::Geometry::FStairGenerator
bool bScaleUVByAspectRatio = true
 
bool bPolygroupPerQuad = false
 
float StepWidth = 150.0f
 
float StepHeight = 20.0f
 
int NumSteps = 8
 
- Public Attributes inherited from UE::Geometry::FMeshShapeGenerator
TArray< FVector3dVertices
 
TArray< FVector2fUVs
 
TArray< int > UVParentVertex
 
TArray< FVector3fNormals
 
TArray< int > NormalParentVertex
 
TArray< FIndex3iTriangles
 
TArray< FIndex3iTriangleUVs
 
TArray< FIndex3iTriangleNormals
 
TArray< int > TrianglePolygonIDs
 
bool bReverseOrientation = false
 

Protected Types

typedef FStairGenerator Super
 
- Protected Types inherited from UE::Geometry::FStairGenerator
enum class  EStairStyle { Solid , Floating }
 

Protected Member Functions

virtual GEOMETRYCORE_API void ResetData () override
 
virtual GEOMETRYCORE_API FVector3d GenerateVertex (ESide Side, int VertexColumn, int VertexRow) override
 
virtual GEOMETRYCORE_API FVector3f GenerateNormal (ESide Side, int VertexId) override
 
virtual GEOMETRYCORE_API FVector2f GenerateUV (ESide Side, int Step, int VertexId, float UVScale) override
 
virtual GEOMETRYCORE_API float GetMaxDimension () override
 

Protected Attributes

bool bIsClockwise = true
 
float CurveRadians = 0.0f
 
float CurveRadiansPerStep = 0.0f
 
float OuterRadius = 0.0f
 
float RadiusRatio = 1.0f
 
FVector3f BackNormal = FVector3f::Zero()
 
- Protected Attributes inherited from UE::Geometry::FStairGenerator
EStairStyle StairStyle = EStairStyle::Solid
 
TArray< TArray< int > > VertexIds
 
TArray< FIndex2iVertexIdsToColumnRow
 
TArray< int > FaceDesc
 
TArray< int > NormalDesc
 
TArray< int > UVDesc
 
int NumQuadsPerSide = 0
 
int NumQuads = 0
 
int NumVertsPerSide = 0
 
int NumVerts = 0
 
int NumAttrs = 0
 
int RightSideColumnId = 0
 
int LeftSideColumnId = 0
 
int RightStartFaceId = 0
 
int LeftStartFaceId = 0
 
int FrontStartFaceId = 0
 
int TopStartFaceId = 0
 
int BackStartFaceId = 0
 
int BottomStartFaceId = 0
 
int LastFaceId = 0
 

Additional Inherited Members

- Public Types inherited from UE::Geometry::FStairGenerator
enum class  ESide {
  Right , Left , Front , Top ,
  Back , Bottom
}
 
- Static Public Member Functions inherited from UE::Geometry::FMeshShapeGenerator
static FVector3d BilinearInterp (const FVector3d &v00, const FVector3d &v10, const FVector3d &v11, const FVector3d &v01, double tx, double ty)
 
static FVector2d BilinearInterp (const FVector2d &v00, const FVector2d &v10, const FVector2d &v11, const FVector2d &v01, double tx, double ty)
 
static FVector2f BilinearInterp (const FVector2f &v00, const FVector2f &v10, const FVector2f &v11, const FVector2f &v01, float tx, float ty)
 
static FVector3i LinearInterp (const FVector3i &a, const FVector3i &b, double t)
 

Detailed Description

Generate an oriented Curved Stair mesh.

Member Typedef Documentation

◆ Super

Constructor & Destructor Documentation

◆ FCurvedStairGenerator()

UE::Geometry::FCurvedStairGenerator::FCurvedStairGenerator ( )
inline

◆ ~FCurvedStairGenerator()

virtual UE::Geometry::FCurvedStairGenerator::~FCurvedStairGenerator ( )
inlineoverridevirtual

Member Function Documentation

◆ GenerateNormal()

FVector3f FCurvedStairGenerator::GenerateNormal ( ESide  Side,
int  VertexId 
)
overrideprotectedvirtual

Returns a vertex normal vector.

All normals for a given side are shared except for Front & Top. Border vertex normals per side are not shared.

Parameters
SideThe side of the stairs to compute the normal.
VertexIdThe vertex index to compute the normal.

Implements UE::Geometry::FStairGenerator.

◆ GenerateUV()

FVector2f FCurvedStairGenerator::GenerateUV ( ESide  Side,
int  Step,
int  VertexId,
float  UVScale 
)
overrideprotectedvirtual

Returns a UV vector.

The Step parameter provides the Side-relative face. This indicates which face for a given side is computing its UV.

All UVs for a given side are shared except for Front & Top. Border edges along each side are UV island edges.

Parameters
SideThe side of the stairs to compute the UV.
StepThe Side-relative step face ID.
VertexIdThe vertex index to compute the UV.
UVScaleThe UV scale

Implements UE::Geometry::FStairGenerator.

Reimplemented in UE::Geometry::FSpiralStairGenerator.

◆ GenerateVertex()

FVector3d FCurvedStairGenerator::GenerateVertex ( ESide  Side,
int  VertexColumn,
int  VertexRow 
)
overrideprotectedvirtual

Returns a vertex position.

The method is provided the Right or Left side and the corresponding vertex column/row index to compute. Column and row indices refer to the matrix-like ordered vertex layout. See diagram in GenerateSolidStairs() / GenerateFloatingStairs().

This generator only generates vertices for the Right & Left Sides of the stairs.

Mesh count protected variables are the only transient variables guaranteed to be valid at the time GenerateVertex is invoked.

Parameters
SideThe Right or Left side of the stairs.
VertexColumnThe column index into the stair vertex layout.
VertexRowThe row index into the stair vertex layout.

Implements UE::Geometry::FStairGenerator.

Reimplemented in UE::Geometry::FSpiralStairGenerator.

◆ GetMaxDimension()

float FCurvedStairGenerator::GetMaxDimension ( )
overrideprotectedvirtual

Returns the max dimension of the staircase for the purposes of computing the world UV scale.

Implements UE::Geometry::FStairGenerator.

◆ ResetData()

void FCurvedStairGenerator::ResetData ( )
overrideprotectedvirtual

Member Data Documentation

◆ BackNormal

FVector3f UE::Geometry::FCurvedStairGenerator::BackNormal = FVector3f::Zero()
protected

◆ bIsClockwise

bool UE::Geometry::FCurvedStairGenerator::bIsClockwise = true
protected

Precompute/cached data

◆ CurveAngle

float UE::Geometry::FCurvedStairGenerator::CurveAngle = 90.0f

Curve angle of the staircase (in degrees)

◆ CurveRadians

float UE::Geometry::FCurvedStairGenerator::CurveRadians = 0.0f
protected

◆ CurveRadiansPerStep

float UE::Geometry::FCurvedStairGenerator::CurveRadiansPerStep = 0.0f
protected

◆ InnerRadius

float UE::Geometry::FCurvedStairGenerator::InnerRadius = 150.0f

Inner radius of the curved staircase

◆ OuterRadius

float UE::Geometry::FCurvedStairGenerator::OuterRadius = 0.0f
protected

◆ RadiusRatio

float UE::Geometry::FCurvedStairGenerator::RadiusRatio = 1.0f
protected

The documentation for this class was generated from the following files: