UGeometryCacheComponent

GeometryCacheComponent, encapsulates a GeometryCache asset instance and implements functionality for rendering/and playback of GeometryCaches

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

GeometryCache

Header

/Engine/Plugins/Experimental/GeometryCache/Source/GeometryCache/Classes/GeometryCacheComponent.h

Include

#include "GeometryCacheComponent.h"

Syntax

UCLASS(ClassGroup=(Rendering), HideCategories=(Object, LOD), Meta=(BlueprintSpawnableComponent),
       Experimental, ClassGroup=Experimental)
class UGeometryCacheComponent : public UMeshComponent

Remarks

GeometryCacheComponent, encapsulates a GeometryCache asset instance and implements functionality for rendering/and playback of GeometryCaches

Variables

Name Description

Protected variable UProperty Category, EditAnywhere, AdvancedDisplay

bool

 

bExtrapolateFrames

Enable frame extrapolation for sub-frame sampling of non-constant topologies with imported motion vectors

Protected variable UProperty Category, EditAnywhere, Interp

bool

 

bLooping

Protected variable UProperty Category, EditAnywhere

bool

 

bManualTick

Protected variable UProperty Category, EditAnywhere

bool

 

bOverrideWireframeColor

Do we override the wireframe rendering color?

Protected variable UProperty Category, EditAnywhere, Interp

bool

 

bRunning

Protected variable UProperty Category BlueprintReadOnly

float

 

Duration

Duration of the animation (maximum time)

Protected variable UProperty Category Transient visibleanywhere

float

 

ElapsedTime

Public variable UProperty Category, EditAnywhere BlueprintReadOnly

TObjectPtr< UGe...

 

GeometryCache

Geometry Cache instance referenced by the component

Protected variable

FBoxSphereBound...

 

LocalBounds

Component local space bounds of geometry cache mesh

Protected variable UProperty Category, EditAnywhere, Meta BlueprintReadWrite

float

 

MotionVectorScale

Scale factor to apply to the imported motion vectors

Protected variable UProperty Category visibleanywhere

int32

 

NumTracks

Protected variable UProperty Category, EditAnywhere, Interp, Meta

float

 

PlaybackSpeed

Protected variable

float

 

PlayDirection

Play (time) direction, either -1.0f or 1.0f

Protected variable UProperty Category, EditAnywhere, Interp, Meta

float

 

StartTimeOffset

Protected variable

TArray< FTrackR...

 

TrackSections

Array containing the TrackData (used for rendering) for each individual track

Protected variable UProperty Category, EditAnywhere, Meta

FLinearColor

 

WireframeOverrideColor

The wireframe override color.

Constructors

Name Description

Public function

UGeometryCacheComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Protected function

void

 

ClearTrackData()

ClearTrackData Clean up data that was required for playback of geometry cache tracks

Protected function

void

 

CreateTrackSection

(
    int32 TrackIndex
)

CreateTrackSection, Create/replace a track section.

Public function Const UFunction BlueprintCallable, Category

float

 

GetAnimationTime()

Set the current animation time for GeometryCache.

Public function Const UFunction BlueprintCallable, Category

float

 

GetDuration()

Get the duration of the playback

Public function Const

int32

 

GetFrameAtTime

(
    const float Time
)

Helper to get the frame of the ABC asset at this time

Public function Const

UGeometryCac...

 

GetGeometryCache()

Getter for Geometry cache instance referred by the component

Public function Const

bool

 

GetManualTick()

Public function Const UFunction BlueprintCallable, Category

float

 

GetMotionVectorScale()

Get the motion vector scale.

Public function Const UFunction BlueprintCallable, Category

int32

 

GetNumberOfFrames()

Get the number of frames

Public function Const UFunction BlueprintCallable, Category

bool

 

GetOverrideWireframeColor()

Check whether we are overriding the wireframe color or not.

Public function Const UFunction BlueprintCallable, Category

float

 

GetPlaybackDirection()

Set the current animation time for GeometryCache.

Public function Const UFunction BlueprintCallable, Category

float

 

GetPlaybackSpeed()

Get current playback speed for GeometryCache.

Public function Const UFunction BlueprintCallable, Category

float

 

GetStartTimeOffset()

Get current start time offset for GeometryCache.

Public function Const

float

 

GetTimeAtFrame

(
    const int32 Frame
)

Helper to get the time at this frame

Public function Const UFunction BlueprintCallable, Category

FLinearColor

 

GetWireframeOverrideColor()

Get the wireframe override color, used when overriding the wireframe color is enabled.

Protected function

void

 

InvalidateTrackSampleIndices()

Invalidate both the Matrix and Mesh sample indices

Public function Const UFunction BlueprintCallable, Category

bool

 

IsExtrapolatingFrames()

Get whether this GeometryCache is extrapolating frames.

Public function Const UFunction BlueprintCallable, Category

bool

 

IsLooping()

Get whether this GeometryCache is looping or not.

Public function Const UFunction BlueprintCallable, Category

bool

 

IsPlaying()

Get whether this GeometryCache is playing or not.

Public function Const UFunction BlueprintCallable, Category

bool

 

IsPlayingReversed()

Get whether this GeometryCache is playing in reverse or not.

Public function

void

 

OnObjectReimported

(
    UGeometryCache* ImportedGeomet...
)

OnObjectReimported, Callback function to refresh section data and update scene proxy.

Public function UFunction BlueprintCallable, Category

void

 

Pause()

Pause playback of GeometryCache

Public function UFunction BlueprintCallable, Category

void

 

Play()

Start playback of GeometryCache

Public function UFunction BlueprintCallable, Category

void

 

PlayFromStart()

Start playback of GeometryCache from the start

Public function UFunction BlueprintCallable, Category

void

 

PlayReversed()

Start playback of GeometryCache in reverse

Public function UFunction BlueprintCallable, Category

void

 

PlayReversedFromEnd()

Start playback of GeometryCache from the end and play in reverse

Protected function

void

 

ReleaseResources()

ReleaseResources, clears and removes data stored/copied from GeometryCache instance

Public function

void

 

ResetAnimationTime()

Public function UFunction BlueprintCallable, Category

void

 

SetExtrapolateFrames

(
    const bool bNewExtrapolating
)

Set whether this GeometryCache is extrapolating frames.

Public function UFunction BlueprintCallable, Category

bool

 

SetGeometryCache

(
    UGeometryCache* NewGeomCache
)

Change the Geometry Cache used by this instance.

Public function UFunction BlueprintCallable, Category

void

 

SetLooping

(
    const bool bNewLooping
)

Set whether this GeometryCache is looping or not.

Public function

void

 

SetManualTick

(
    bool bInManualTick
)

Functions to override the default TickComponent

Public function UFunction BlueprintCallable, Category

void

 

SetMotionVectorScale

(
    const float NewMotionVectorScale
)

Set new motion vector scale.

Public function UFunction BlueprintCallable, Category

void

 

SetOverrideWireframeColor

(
    bool bOverride
)

Override wireframe color?

Public function UFunction BlueprintCallable, Category

void

 

SetPlaybackSpeed

(
    const float NewPlaybackSpeed
)

Set new playback speed for GeometryCache.

Public function UFunction BlueprintCallable, Category

void

 

SetStartTimeOffset

(
    const float NewStartTimeOffset
)

Set current start time offset for GeometryCache.

Protected function

void

 

SetupTrackData()

SetupTrackData Call CreateTrackSection for all tracks in the GeometryCache assigned to this object.

Public function UFunction BlueprintCallable, Category

void

 

SetWireframeOverrideColor

(
    const FLinearColor Color
)

Set the color, used when overriding the wireframe color is enabled.

Public function UFunction BlueprintCallable, Category

void

 

Stop()

Stop playback of GeometryCache

Public function UFunction BlueprintCallable, Category

void

 

TickAtThisTime

(
    const float Time,
    bool bInIsRunning,
    bool bInBackwards,
    bool bInIsLooping
)

Public function

void

 

UpdateLocalBounds()

Update LocalBounds member from the local box of each section

Protected function

bool

 

UpdateTrackSection

(
    int32 TrackIndex,
    float Time
)

Updates the game thread state of a track section

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

UMaterialInt...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual Const

int32

 

GetNumMaterials()

Return number of material elements in this primitive

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.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

OnRegister()

Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called.

Public function Virtual

void

 

OnUnregister()

Called when a component is unregistered.

Public function Virtual

void

 

TickComponent

(
    float DeltaTime,
    enum ELevelTick TickType,
    FActorComponentTickFunction* T...
)

Function called every frame on this ActorComponent.

Overridden from UObject

Name Description

Public function Virtual

void

 

BeginDestroy()

Called before destroying the object.

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

PostLoad()

Do any object-specific cleanup required immediately after loading an object.

Public function Virtual

void

 

PreEditUndo()

Called before applying a transaction to the object.