UGeometryCacheComponent

Inheritance Hierarchy

Syntax

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

bool

 

bLooping

Protected variable

bool

 

bRunning

Protected variable

float

 

Duration

Duration of the animation (maximum time)

Protected variable

float

 

ElapsedTime

Public variable

friend

 

FGeometryCacheSceneProxy

Required for access to (protected) TrackSections

Public variable

UGeometryCache ...

 

GeometryCache

Geometry Cache instance referenced by the component

Protected variable

FBoxSphereBound ...

 

LocalBounds

Local space bounds of mesh

Protected variable

int32

 

NumTracks

Protected variable

float

 

PlaybackSpeed

Protected variable

float

 

PlayDirection

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

Protected variable

float

 

StartTimeOffset

Protected variable

TArray < int32 >

 

TrackMatrixSampleIndices

Protected variable

TArray < int32 >

 

TrackMeshSampleIndices

Matrix and Mesh sample index for each individual track

Protected variable

TArray < FTrackR ...

 

TrackSections

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

Constructors

Name Description

Public function

UGeometryCacheComponent

(
    const FObjectInitializer & ObjectIn...
)

Functions

Name Description

Public function

void

 

ClearTrackData()

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

Public function

void

 

CreateTrackSection

(
    int32 SectionIndex,
    const FMatrix & WorldMatrix,
    FGeometryCacheMeshData * MeshDa...
)

CreateTrackSection, Create/replace a track section.

Public function

UGeometryCac ...

 

GetGeometryCache()

Getter for Geometry cache instance referred by the component

Public function

float

 

GetPlaybackSpeed()

Get current playback speed for GeometryCache.

Public function

float

 

GetStartTimeOffset()

Get current start time offset for GeometryCache.

Protected function

void

 

InvalidateTrackSampleIndices()

Invalidate both the Matrix and Mesh sample indices

Public function

bool

 

IsLooping()

Get whether this GeometryCache is looping or not.

Public function

bool

 

IsPlaying()

Get whether this GeometryCache is playing or not.

Public function

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

void

 

Pause()

Pause playback of GeometryCache

Public function

void

 

Play()

Start playback of GeometryCache

Public function

void

 

PlayFromStart()

Start playback of GeometryCache from the start

Public function

void

 

PlayReversed()

Start playback of GeometryCache in reverse

Public function

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 Virtual

bool

 

SetGeometryCache

(
    UGeometryCache * NewGeomCache
)

Change the Geometry Cache used by this instance.

Public function

void

 

SetLooping

(
    const bool bNewLooping
)

Set whether this GeometryCache is looping or not.

Public function

void

 

SetPlaybackSpeed

(
    const float NewPlaybackSpeed
)

Set new playback speed for GeometryCache.

Public function

void

 

SetStartTimeOffset

(
    const float NewStartTimeOffset
)

Set current start time offset for GeometryCache.

Public function

void

 

SetupTrackData()

SetupTrackData Setup data required for playback of geometry cache tracks

Public function

void

 

Stop()

Stop playback of GeometryCache

Public function

void

 

UpdateLocalBounds()

Update LocalBounds member from the local box of each section

Public function

void

 

UpdateTrackSectionIndexbuffer

(
    int32 SectionIndex,
    const TArray < uint32 >& Indices
)

UpdateTrackSectionIndexbuffer, Update only the Index Buffer for a specific section

Public function

void

 

UpdateTrackSectionMatrixData

(
    int32 SectionIndex,
    const FMatrix & WorldMatrix
)

UpdateTrackSectionMatrixData, Update only the World Matrix for a specific section

Public function

void

 

UpdateTrackSectionMeshData

(
    int32 SectionIndex,
    FGeometryCacheMeshData * MeshDa...
)

UpdateTrackSectionMeshData, Update only the Mesh Data (Vertices) for a specific section

Public function

void

 

UpdateTrackSectionVertexbuffer

(
    int32 SectionIndex,
    FGeometryCacheMeshData * MeshDa...
)

UpdateTrackSectionVertexbuffer, Update only the Vertex Buffer for a specific 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

UMaterialInt ...

 

GetMaterial

(
    int32 ElementIndex
)

Returns the material used by the element at the specified index

Public function Virtual

int32

 

GetNumMaterials()

Number of material elements in this primitive

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.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

OnRegister()

WITH_EDITOR.

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

 

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

 

PreEditUndo()

Called before applying a transaction to the object.

References

Module

GeometryCache

Header

Runtime/GeometryCache/Classes/GeometryCacheComponent.h