![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <StairGenerator.h>
Inheritance diagram for UE::Geometry::FStairGenerator:Public Types | |
| enum class | ESide { Right , Left , Front , Top , Back , Bottom } |
Public Attributes | |
| 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< FVector3d > | Vertices |
| TArray< FVector2f > | UVs |
| TArray< int > | UVParentVertex |
| TArray< FVector3f > | Normals |
| TArray< int > | NormalParentVertex |
| TArray< FIndex3i > | Triangles |
| TArray< FIndex3i > | TriangleUVs |
| TArray< FIndex3i > | TriangleNormals |
| TArray< int > | TrianglePolygonIDs |
| bool | bReverseOrientation = false |
Protected Types | |
| enum class | EStairStyle { Solid , Floating } |
Protected Member Functions | |
| virtual GEOMETRYCORE_API void | ResetData () |
| virtual FVector3d | GenerateVertex (ESide Side, int VertexColumn, int VertexRow)=0 |
| virtual FVector3f | GenerateNormal (ESide Side, int VertexId)=0 |
| virtual FVector2f | GenerateUV (ESide Side, int Step, int VertexId, float UVScale)=0 |
| virtual float | GetMaxDimension ()=0 |
Protected Attributes | |
| EStairStyle | StairStyle = EStairStyle::Solid |
| TArray< TArray< int > > | VertexIds |
| TArray< FIndex2i > | VertexIdsToColumnRow |
| 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 | |
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) |
Base Stair mesh generator class.
|
strong |
|
strongprotected |
|
overridevirtualdefault |
|
overridevirtual |
Generate the mesh
Implements UE::Geometry::FMeshShapeGenerator.
|
protectedpure virtual |
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.
| Side | The side of the stairs to compute the normal. |
| VertexId | The vertex index to compute the normal. |
Implemented in UE::Geometry::FLinearStairGenerator, and UE::Geometry::FCurvedStairGenerator.
|
protectedpure virtual |
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.
| Side | The side of the stairs to compute the UV. |
| Step | The Side-relative step face ID. |
| VertexId | The vertex index to compute the UV. |
| UVScale | The UV scale |
Implemented in UE::Geometry::FLinearStairGenerator, UE::Geometry::FFloatingStairGenerator, UE::Geometry::FCurvedStairGenerator, and UE::Geometry::FSpiralStairGenerator.
|
protectedpure virtual |
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.
| Side | The Right or Left side of the stairs. |
| VertexColumn | The column index into the stair vertex layout. |
| VertexRow | The row index into the stair vertex layout. |
Implemented in UE::Geometry::FLinearStairGenerator, UE::Geometry::FFloatingStairGenerator, UE::Geometry::FCurvedStairGenerator, and UE::Geometry::FSpiralStairGenerator.
Returns the max dimension of the staircase for the purposes of computing the world UV scale.
Implemented in UE::Geometry::FLinearStairGenerator, and UE::Geometry::FCurvedStairGenerator.
|
protectedvirtual |
Reset state data on the generator
Reset state data on the generator.
This is invoked at the head of the Generate() method.
Reimplemented in UE::Geometry::FCurvedStairGenerator.
|
protected |
|
protected |
If true, each quad of box gets a separate polygroup
If true (default), UVs are scaled so that there is no stretching. If false, UVs are scaled to fill unit square
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Mesh counts.
| int UE::Geometry::FStairGenerator::NumSteps = 8 |
The number of steps in this staircase.
|
protected |
|
protected |
|
protected |
Vertex column indices.
|
protected |
Face descriptor indices.
|
protected |
The style of the stairs
| float UE::Geometry::FStairGenerator::StepHeight = 20.0f |
The height of each step.
| float UE::Geometry::FStairGenerator::StepWidth = 150.0f |
The width of each step.
|
protected |
|
protected |