Navigation
API > API/Runtime > API/Runtime/Engine
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.
| Name | USplineMeshComponent |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Components/SplineMeshComponent.h |
| Include Path | #include "Components/SplineMeshComponent.h" |
Syntax
UCLASS (ClassGroup=Rendering, HideCategories=(Physics), Meta=(BlueprintSpawnableComponent),
MinimalAPI)
class USplineMeshComponent :
public UStaticMeshComponent ,
public IInterface_CollisionDataProvider
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UActorComponent → USceneComponent → UPrimitiveComponent → UMeshComponent → UStaticMeshComponent → USplineMeshComponent
Implements Interfaces
- IAsyncPhysicsStateProcessor
- IInterface_AssetUserData
- IInterface_AsyncCompilation
- INavRelevantInterface
- IPhysicsComponent
- IInterface_CollisionDataProvider
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
USplineMeshComponent
(
const FObjectInitializer& ObjectInitializer |
Components/SplineMeshComponent.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bAllowSplineEditingPerInstance | uint8 | If true, spline mesh properties - StartPos, EndPos, StartTangent and EndTangent- may be edited per instance in the level viewport. | Components/SplineMeshComponent.h |
|
| bMeshDirty | uint8 | Indicates that the mesh needs updating. | Components/SplineMeshComponent.h |
|
| BodySetup | TObjectPtr< UBodySetup > | Physics data. | Components/SplineMeshComponent.h | |
| bSelected | uint8 | Components/SplineMeshComponent.h |
|
|
| bSmoothInterpRollScale | uint8 | If true, will use smooth interpolation (ease in/out) for Scale, Roll, and Offset along this section of spline. | Components/SplineMeshComponent.h |
|
| CachedMeshBodySetupGuid | FGuid | Used to automatically trigger rebuild of collision data. | Components/SplineMeshComponent.h | |
| CachedNavigationBounds | FBox | Navigation bounds can differ from primitive bounds since NavCollision can hold more geometry. | Components/SplineMeshComponent.h | |
| ForwardAxis | TEnumAsByte< ESplineMeshAxis::Type > | Chooses the forward axis for the spline mesh orientation | Components/SplineMeshComponent.h |
|
| SplineBoundaryMax | float | Maximum coordinate along the spline forward axis which corresponds to end of spline. | Components/SplineMeshComponent.h |
|
| SplineBoundaryMin | float | Minimum coordinate along the spline forward axis which corresponds to start of spline. | Components/SplineMeshComponent.h |
|
| SplineParams | FSplineMeshParams | Spline that is used to deform mesh | Components/SplineMeshComponent.h |
|
| SplineUpDir | FVector | Axis (in component space) that is used to determine X axis for co-ordinates along spline | Components/SplineMeshComponent.h |
|
| VirtualTextureMainPassMaxDrawDistance | float | The max draw distance to use in the main pass when also rendering to a runtime virtual texture. | Components/SplineMeshComponent.h |
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| bNeverNeedsCookedCollisionData | uint8 | Indicates that we will never use convex or trimesh shapes. | Components/SplineMeshComponent.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyComponentInstanceData
(
FSplineMeshInstanceData* ComponentInstanceData |
Components/SplineMeshComponent.h | ||
FTransform CalcSliceTransform
(
const float DistanceAlong |
Calculates the spline transform, including roll, scale, and offset along the spline at a specified distance | Components/SplineMeshComponent.h | |
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 @Note: This is mirrored to Lightmass::CalcSliceTransform() and LocalVertexShader.usf. | Components/SplineMeshComponent.h | |
FSplineMeshShaderParams CalculateShaderParams() |
Generates FSplineMeshShaderParams for the current state of the component | Components/SplineMeshComponent.h | |
void DestroyBodySetup() |
Destroys the body setup, used to clear collision if the mesh goes missing. | Components/SplineMeshComponent.h | |
bool GetbNeverNeedsCookedCollisionData() |
Getter for bNeverNeedsCookedCollisionData | Components/SplineMeshComponent.h | |
UBodySetup * GetBodySetup () |
Components/SplineMeshComponent.h | ||
float GetBoundaryMax() |
Get the boundary max | Components/SplineMeshComponent.h |
|
float GetBoundaryMin() |
Get the boundary min | Components/SplineMeshComponent.h |
|
FVector2D GetEndOffset() |
Get the end offset | Components/SplineMeshComponent.h |
|
FVector GetEndPosition() |
Get the end position of spline in local space | Components/SplineMeshComponent.h |
|
float GetEndRoll() |
Get the end roll, in radians | Components/SplineMeshComponent.h |
|
FVector2D GetEndScale() |
Get the end scaling | Components/SplineMeshComponent.h |
|
FVector GetEndTangent() |
Get the end tangent vector of spline in local space | Components/SplineMeshComponent.h |
|
ESplineMeshAxis::Type GetForwardAxis() |
Get the forward axis | Components/SplineMeshComponent.h |
|
| Components/SplineMeshComponent.h | |||
FVector GetSplineUpDir() |
Get the spline up direction | Components/SplineMeshComponent.h |
|
FVector2D GetStartOffset() |
Get the start offset | Components/SplineMeshComponent.h |
|
FVector GetStartPosition() |
Get the start position of spline in local space | Components/SplineMeshComponent.h |
|
float GetStartRoll() |
Get the start roll, in radians | Components/SplineMeshComponent.h |
|
FVector2D GetStartScale() |
Get the start scaling | Components/SplineMeshComponent.h |
|
FVector GetStartTangent() |
Get the start tangent vector of spline in local space | Components/SplineMeshComponent.h |
|
void InitVertexFactory
(
int32 InLODIndex, |
Components/SplineMeshComponent.h | ||
bool IsRelevantForSplinePartitioning() |
Components/SplineMeshComponent.h | ||
void PropagateSplineDeformationToMesh
(
FMeshDescription& InOutMeshDescription |
Propagates deformation along spline to mesh data | Components/SplineMeshComponent.h | |
void RecreateCollision() |
Builds collision for the spline mesh (if collision is enabled) | Components/SplineMeshComponent.h | |
void SetbNeverNeedsCookedCollisionData
(
bool bInValue |
Setter for bNeverNeedsCookedCollisionData | Components/SplineMeshComponent.h | |
void SetBoundaryMax
(
float InBoundaryMax, |
Set the boundary max | Components/SplineMeshComponent.h |
|
void SetBoundaryMin
(
float InBoundaryMin, |
Set the boundary min | Components/SplineMeshComponent.h |
|
void SetEndOffset
(
FVector2D EndOffset, |
Set the end offset | Components/SplineMeshComponent.h |
|
void SetEndPosition
(
FVector EndPos, |
Set the end position of spline in local space | Components/SplineMeshComponent.h |
|
void SetEndRoll
(
float EndRoll, |
Set the end roll, in radians | Components/SplineMeshComponent.h |
|
void SetEndRollDegrees
(
float EndRollDegrees, |
Set the end roll in degrees | Components/SplineMeshComponent.h |
|
void SetEndScale
(
FVector2D EndScale, |
Set the end scaling | Components/SplineMeshComponent.h |
|
void SetEndTangent
(
FVector EndTangent, |
Set the end tangent vector of spline in local space | Components/SplineMeshComponent.h |
|
void SetForwardAxis
(
ESplineMeshAxis::Type InForwardAxis, |
Set the forward axis | Components/SplineMeshComponent.h |
|
void SetSplineUpDir
(
const FVector& InSplineUpDir, |
Set the spline up direction | Components/SplineMeshComponent.h |
|
void SetStartAndEnd
(
FVector StartPos, |
Set the start and end, position and tangent, all in local space | Components/SplineMeshComponent.h |
|
void SetStartOffset
(
FVector2D StartOffset, |
Set the start offset | Components/SplineMeshComponent.h |
|
void SetStartPosition
(
FVector StartPos, |
Set the start position of spline in local space | Components/SplineMeshComponent.h |
|
void SetStartRoll
(
float StartRoll, |
Set the start roll, in radians | Components/SplineMeshComponent.h |
|
void SetStartRollDegrees
(
float StartRollDegrees, |
Set the start roll in degrees | Components/SplineMeshComponent.h |
|
void SetStartScale
(
FVector2D StartScale, |
Set the start scaling | Components/SplineMeshComponent.h |
|
void SetStartTangent
(
FVector StartTangent, |
Set the start tangent vector of spline in local space | Components/SplineMeshComponent.h |
|
void UpdateMesh() |
Update the collision and render state on the spline mesh following changes to its geometry | Components/SplineMeshComponent.h |
|
void UpdateMesh_Concurrent() |
Same as UpdateMesh, but does not wait until the end of frame and can be used in non-game threads | Components/SplineMeshComponent.h | |
void UpdateRenderStateAndCollision() |
Called to notify render thread and possibly collision of a change in spline params or mesh | Components/SplineMeshComponent.h |
Overridden from UStaticMeshComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FStaticMeshStaticLightingMesh * AllocateStaticLightingMesh
(
int32 LODIndex, |
Allocates an implementation of FStaticLightingMesh that will handle static lighting for this component | Components/SplineMeshComponent.h | |
virtual float GetTextureStreamingTransformScale () |
Get the scale comming form the component, when computing StreamingTexture data. | Components/SplineMeshComponent.h |
Overridden from UPrimitiveComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void CollectPSOPrecacheData
(
const FPSOPrecacheParams& BasePrecachePSOParams, |
Collect all the PSO precache data used by the static mesh component | Components/SplineMeshComponent.h | |
virtual UBodySetup * GetBodySetup () |
Return the BodySetup to use for this PrimitiveComponent (single body case) | Components/SplineMeshComponent.h | |
virtual float GetVirtualTextureMainPassMaxDrawDistance () |
Get the max draw distance to use in the main pass when also rendering to a runtime virtual texture. | Components/SplineMeshComponent.h | |
virtual bool ShouldRenderSelected() |
Return true if the owner is selected and this component is selectable | Components/SplineMeshComponent.h |
Overridden from USceneComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FBoxSphereBounds CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. | Components/SplineMeshComponent.h | |
virtual FTransform GetSocketTransform
(
FName InSocketName, |
Get world-space socket transform. | Components/SplineMeshComponent.h | |
virtual void UpdateBounds() |
Update the Bounds of the component. | Components/SplineMeshComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual TStructOnScope< FActorComponentInstanceData > GetComponentInstanceData() |
Called before we throw away components during RerunConstructionScripts, to cache any data we wish to persist across that operation | Components/SplineMeshComponent.h |
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool IsEditorOnly() |
Returns whether this component is an editor-only object or not | Components/SplineMeshComponent.h | |
virtual bool Modify
(
bool bAlwaysMarkDirty |
Components/SplineMeshComponent.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Components/SplineMeshComponent.h | ||
virtual void Serialize
(
FArchive& Ar |
Components/SplineMeshComponent.h |
Overridden from INavRelevantInterface
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool DoCustomNavigableGeometryExport
(
FNavigableGeometryExport& GeomExport |
Collects custom navigable geometry of component. | Components/SplineMeshComponent.h | |
virtual FBox GetNavigationBounds() |
Get bounds for navigation octree | Components/SplineMeshComponent.h |
Overridden from IInterface_CollisionDataProvider
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool ContainsPhysicsTriMeshData
(
bool InUseAllTriData |
Interface for checking if the implementing objects contains triangle mesh collision data | Components/SplineMeshComponent.h | |
| An optional string identifying the mesh data. | Components/SplineMeshComponent.h | ||
virtual bool GetPhysicsTriMeshData
(
FTriMeshCollisionData* CollisionData, |
Interface for retrieving triangle mesh collision data from the implementing object | Components/SplineMeshComponent.h | |
virtual bool GetTriMeshSizeEstimates
(
FTriMeshCollisionDataEstimates& OutTriMeshEstimates, |
Returns an estimate of how much data would be retrieved by GetPhysicsTriMeshData. | Components/SplineMeshComponent.h | |
virtual bool WantsNegXTriMesh() |
Do we want to create a negative version of this mesh | Components/SplineMeshComponent.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FBox ComputeDistortedBounds
(
const FTransform& InLocalToWorld, |
Computes the bounding box, in world space, for a given bounding box distorted by the spline in local space. | Components/SplineMeshComponent.h | |
float ComputeRatioAlongSpline
(
float DistanceAlong |
Components/SplineMeshComponent.h | ||
void ComputeVisualMeshSplineTRange
(
float& MinT, |
Returns the normalized range on the spline where the visual mesh is located taking custom range into account. | Components/SplineMeshComponent.h | |
virtual FPrimitiveSceneProxy * CreateStaticMeshSceneProxy
(
::Nanite::FMaterialAudit& NaniteMaterials, |
Components/SplineMeshComponent.h |
Overridden from UActorComponent
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void OnCreatePhysicsState() |
Used to create any physics engine information for this component | Components/SplineMeshComponent.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
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 | Components/SplineMeshComponent.h | |
static const double & GetAxisValueRef
(
const FVector3d& InVector, |
Components/SplineMeshComponent.h | ||
static double & GetAxisValueRef
(
FVector3d& InVector, |
Components/SplineMeshComponent.h | ||
static const float & GetAxisValueRef
(
const FVector3f& InVector, |
Components/SplineMeshComponent.h | ||
static float & GetAxisValueRef
(
FVector3f& InVector, |
Components/SplineMeshComponent.h | ||
static bool ShouldRenderNaniteSplineMeshes() |
Components/SplineMeshComponent.h |