USplineMeshComponent

A Spline Mesh Component is a derivation of a Static Mesh Component which can be deformed using a spline.

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Components/SplineMeshComponent.h

Include

#include "Components/SplineMeshComponent.h"

Syntax

class USplineMeshComponent :
    public UStaticMeshComponent,
    public IInterface_CollisionDataProvider

Remarks

A Spline Mesh Component is a derivation of a Static Mesh Component which can be deformed using a spline. Only a start and end position (and tangent) can be specified.

Variables

Name Description

Public variable

uint8: 1

 

bAllowSplineEditingPerInstance

If true, spline keys may be edited per instance in the level viewport.

Public variable

uint8: 1

 

bMeshDirty

Indicates that the mesh needs updating.

Public variable

UBodySetup *...

 

BodySetup

Physics data.

Public variable

uint8: 1

 

bSelected

Public variable

uint8: 1

 

bSmoothInterpRollScale

If true, will use smooth interpolation (ease in/out) for Scale, Roll, and Offset along this section of spline.

Public variable

FGuid

 

CachedMeshBodySetupGuid

Used to automatically trigger rebuild of collision data.

Public variable

TEnumAsByte< ES...

 

ForwardAxis

Chooses the forward axis for the spline mesh orientation

Public variable

float

 

SplineBoundaryMax

Maximum coordinate along the spline forward axis which corresponds to end of spline.

Public variable

float

 

SplineBoundaryMin

Minimum coordinate along the spline forward axis which corresponds to start of spline.

Public variable

FSplineMeshPara...

 

SplineParams

Spline that is used to deform mesh

Public variable

FVector

 

SplineUpDir

Axis (in component space) that is used to determine X axis for co-ordinates along spline

Public variable

float

 

VirtualTextureMainPassMaxDrawDistance

The max draw distance to use in the main pass when also rendering to a runtime virtual texture.

Constructors

Name Description

Public function

USplineMeshComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

ApplyComponentInstanceData

(
    FSplineMeshInstanceData* Compo...
)

Public function Const

FTransform

 

CalcSliceTransform

(
    const float DistanceAlong
)

Calculates the spline transform, including roll, scale, and offset along the spline at a specified distance

Public function Const

FTransform

 

CalcSliceTransformAtSplineOffset

(
    const float Alpha
)

Calculates the spline transform, including roll, scale, and offset along the spline at a specified alpha interpolation parameter along the spline : This is mirrored to Lightmass::CalcSliceTransform() and LocalVertexShader.usf.

Public function Const

void

 

CalculateScaleZAndMinZ

(
    float& OutScaleZ,
    float& OutMinZ
)

Determines the mesh proxy values for SplineMeshScaleZ and SplineMeshMinZ

Public function

void

 

DestroyBodySetup()

Destroys the body setup, used to clear collision if the mesh goes missing.

Public function Static

FVector

 

GetAxisMask

(
    ESplineMeshAxis::Type InAxis
)

Returns a vector which, when componentwise-multiplied by another vector, will zero all the components not corresponding to the supplied ESplineMeshAxis

Public function Static

const float ...

 

GetAxisValue

(
    const FVector& InVector,
    ESplineMeshAxis::Type InAxis
)

Public function Static

float &

 

GetAxisValue

(
    FVector& InVector,
    ESplineMeshAxis::Type InAxis
)

Public function Const

float

 

GetBoundaryMax()

Get the boundary max

Public function Const

float

 

GetBoundaryMin()

Get the boundary min

Public function Const

FVector2D

 

GetEndOffset()

Get the end offset

Public function Const

FVector

 

GetEndPosition()

Get the end position of spline in local space

Public function Const

float

 

GetEndRoll()

Get the end roll

Public function Const

FVector2D

 

GetEndScale()

Get the end scaling

Public function Const

FVector

 

GetEndTangent()

Get the end tangent vector of spline in local space

Public function Const

ESplineMeshA...

 

GetForwardAxis()

Get the forward axis

Public function Const

FVector

 

GetSplineUpDir()

Get the spline up direction

Public function Const

FVector2D

 

GetStartOffset()

Get the start offset

Public function Const

FVector

 

GetStartPosition()

Get the start position of spline in local space

Public function Const

float

 

GetStartRoll()

Get the start roll

Public function Const

FVector2D

 

GetStartScale()

Get the start scaling

Public function Const

FVector

 

GetStartTangent()

Get the start tangent vector of spline in local space

Public function

void

 

RecreateCollision()

Builds collision for the spline mesh (if collision is enabled)

Public function

void

 

SetBoundaryMax

(
    float InBoundaryMax,
    bool bUpdateMesh
)

Set the boundary max

Public function

void

 

SetBoundaryMin

(
    float InBoundaryMin,
    bool bUpdateMesh
)

Set the boundary min

Public function

void

 

SetEndOffset

(
    FVector2D EndOffset,
    bool bUpdateMesh
)

Set the end offset

Public function

void

 

SetEndPosition

(
    FVector EndPos,
    bool bUpdateMesh
)

Set the end position of spline in local space

Public function

void

 

SetEndRoll

(
    float EndRoll,
    bool bUpdateMesh
)

Set the end roll

Public function

void

 

SetEndScale

(
    FVector2D EndScale,
    bool bUpdateMesh
)

Set the end scaling

Public function

void

 

SetEndTangent

(
    FVector EndTangent,
    bool bUpdateMesh
)

Set the end tangent vector of spline in local space

Public function

void

 

SetForwardAxis

(
    ESplineMeshAxis::Type InForwardAxis,
    bool bUpdateMesh
)

Set the forward axis

Public function

void

 

SetSplineUpDir

(
    const FVector& InSplineUpDir,
    bool bUpdateMesh
)

Set the spline up direction

Public function

void

 

SetStartAndEnd

(
    FVector StartPos,
    FVector StartTangent,
    FVector EndPos,
    FVector EndTangent,
    bool bUpdateMesh
)

Set the start and end, position and tangent, all in local space

Public function

void

 

SetStartOffset

(
    FVector2D StartOffset,
    bool bUpdateMesh
)

Set the start offset

Public function

void

 

SetStartPosition

(
    FVector StartPos,
    bool bUpdateMesh
)

Set the start position of spline in local space

Public function

void

 

SetStartRoll

(
    float StartRoll,
    bool bUpdateMesh
)

Set the start roll

Public function

void

 

SetStartScale

(
    FVector2D StartScale,
    bool bUpdateMesh
)

Set the start scaling

Public function

void

 

SetStartTangent

(
    FVector StartTangent,
    bool bUpdateMesh
)

Set the start tangent vector of spline in local space

Public function

void

 

UpdateMesh()

Update the collision and render state on the spline mesh following changes to its geometry

Public function

void

 

UpdateMesh_Concurrent()

Same as UpdateMesh, but does not wait until the end of frame and can be used in non-game threads

Public function

void

 

UpdateRenderStateAndCollision()

Called to notify render thread and possibly collision of a change in spline params or mesh

Overridden from UStaticMeshComponent

Name Description

Public function Virtual

FStaticMeshS...

 

AllocateStaticLightingMesh

(
    int32 LODIndex,
    const TArray< ULightComponent*...
)

Allocates an implementation of FStaticLightingMesh that will handle static lighting for this component

Public function Virtual Const

float

 

GetTextureStreamingTransformScale()

Get the scale comming form the component, when computing StreamingTexture data.

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc...

 

CreateSceneProxy()

Creates a proxy to represent the primitive to the scene manager in the rendering thread.

Public function Virtual Const

bool

 

DoCustomNavigableGeometryExport

(
    FNavigableGeometryExport& GeomExpo...
)

Collects custom navigable geometry of component.

Public function Virtual

UBodySetup &...

 

GetBodySetup()

Return the BodySetup to use for this PrimitiveComponent (single body case)

Public function Virtual Const

float

 

GetVirtualTextureMainPassMaxDrawDistance()

Get the max draw distance to use in the main pass when also rendering to a runtime virtual texture.

Public function Virtual Const

bool

 

ShouldRenderSelected()

Return true if the owner is selected and this component is selectable

Overridden from USceneComponent

Name Description

Public function Virtual Const

FBoxSphereBo...

 

CalcBounds

(
    const FTransform& LocalToWorld
)

Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size.

Public function Virtual Const

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Overridden from UActorComponent

Name Description

Public function Virtual Const

TStructOnSco...

 

GetComponentInstanceData()

Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation

Protected function Virtual

void

 

OnCreatePhysicsState()

Used to create any physics engine information for this component

Overridden from UObject

Name Description

Public function Virtual

bool

 

Modify

(
    bool bAlwaysMarkDirty
)

Note that the object will be modified.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual Const

bool

 

ContainsPhysicsTriMeshData

(
    bool InUseAllTriData
)

Interface for checking if the implementing objects contains triangle mesh collision data

Public function Virtual

void

 

GetMeshId

(
    FString& OutMeshId
)

An optional string identifying the mesh data.

Public function Virtual

bool

 

GetPhysicsTriMeshData

(
    FTriMeshCollisionData* Collisi...,
    bool InUseAllTriData
)

Interface for retrieving triangle mesh collision data from the implementing object

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

Deprecated Functions

Name Description

Public function

void

 

MarkSplineParamsDirty()

This method has been renamed to UpdateRenderStateAndCollision, but use of UpdateMesh is preferred

See Also

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