Language:
Discover
By Skill Level
By Category

USplineMeshComponent

Choose your OS:

Inheritance Hierarchy

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

uint32 : 1

 

bAllowSplineEditingPerInstance

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

Public variable

uint32 : 1

 

bMeshDirty

Indicates that the mesh needs updating.

Public variable

UBodySetup *...

 

BodySetup

Physics data.

Public variable

uint32 : 1

 

bSelected

Public variable

uint32 : 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

Constructors

Name Description

Public function

USplineMeshComponent

(
    const FObjectInitializer & ObjectIn...
)

SplineMeshComponent.

Functions

Name Description

Public function

void

 

ApplyComponentInstanceData

(
    FSplineMeshInstanceData* Compo...
)

Public function

FTransform

 

CalcSliceTransform

(
    const float DistanceAlong
)

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

Public function

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

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

float

 

GetBoundaryMax()

Get the boundary max

Public function

float

 

GetBoundaryMin()

Get the boundary min

Public function

FVector2D

 

GetEndOffset()

Get the end offset

Public function

FVector

 

GetEndPosition()

Get the end position of spline in local space

Public function

float

 

GetEndRoll()

Get the end roll

Public function

FVector2D

 

GetEndScale()

Get the end scaling

Public function

FVector

 

GetEndTangent()

Get the end tangent vector of spline in local space

Public function

ESplineMeshA ...

 

GetForwardAxis()

Get the forward axis

Public function

FVector

 

GetSplineUpDir()

Get the spline up direction

Public function

FVector2D

 

GetStartOffset()

Get the start offset

Public function

FVector

 

GetStartPosition()

Get the start position of spline in local space

Public function

float

 

GetStartRoll()

Get the start roll

Public function

FVector2D

 

GetStartScale()

Get the start scaling

Public function

FVector

 

GetStartTangent()

Get the start tangent vector of spline in local space

Public function

void

 

MarkSplineParamsDirty()

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 *...
)

End UPrimitiveComponent Interface.

Public function Virtual

float

 

GetTextureStreamingTransformScale()

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

Overridden from UPrimitiveComponent

Name Description

Public function Virtual

FPrimitiveSc ...

 

CreateSceneProxy()

Begin USceneComponent Interface.

Public function Virtual

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

bool

 

ShouldRenderSelected()

True if the owner is selected and this component is selectable

Overridden from USceneComponent

Name Description

Public function Virtual

FBoxSphereBo ...

 

CalcBounds

(
    const FTransform & LocalToWorld
)

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

Public function Virtual

FTransform

 

GetSocketTransform

(
    FName InSocketName,
    ERelativeTransformSpace TransformSp...
)

Get world-space socket transform.

Overridden from UActorComponent

Name Description

Public function Virtual

FActorCompon ...

 

GetComponentInstanceData()

End UObject Interface.

Protected function Virtual

void

 

OnCreatePhysicsState()

End USceneComponent Interface.

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
)

Begin UObject Interface.

Overridden from IInterface_CollisionDataProvider

Name Description

Public function Virtual

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
)

End UStaticMeshComponent Interface.

Public function Virtual

bool

 

WantsNegXTriMesh()

Do we want to create a negative version of this mesh

See Also

References

Module

Engine

Header

Runtime/Engine/Classes/Components/SplineMeshComponent.h