Navigation
API > API/Plugins > API/Plugins/GeometryCache
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- UGeometryCacheComponent
- UGeometryCacheAbcFileComponent
- UGeometryCacheUsdComponent
References
| Module | GeometryCache |
| Header | /Engine/Plugins/Runtime/GeometryCache/Source/GeometryCache/Classes/GeometryCacheComponent.h |
| Include | #include "GeometryCacheComponent.h" |
Syntax
UCLASS&40;ClassGroup&61;&40;Rendering&41;, HideCategories&61;&40;Object, LOD&41;, Meta&61;&40;BlueprintSpawnableComponent&41;&41;
class UGeometryCacheComponent : public UMeshComponent
Remarks
GeometryCacheComponent, encapsulates a GeometryCache asset instance and implements functionality for rendering/and playback of GeometryCaches
Variables
| Type | Name | Description | |
|---|---|---|---|
| bool | bExtrapolateFrames | Enable frame extrapolation for sub-frame sampling of non-constant topologies with imported motion vectors | |
| bool | bLooping | ||
| bool | bManualTick | ||
| bool | bOverrideWireframeColor | Do we override the wireframe rendering color? | |
| bool | bRunning | ||
| float | Duration | Duration of the animation (maximum time) | |
| float | ElapsedTime | ||
| TObjectPtr< UGeometryCache > | GeometryCache | Geometry Cache instance referenced by the component | |
| FBoxSphereBounds | LocalBounds | Component local space bounds of geometry cache mesh | |
| float | MotionVectorScale | Scale factor to apply to the imported motion vectors | |
| int32 | NumTracks | ||
| float | PlaybackSpeed | ||
| float | PlayDirection | Play (time) direction, either -1.0f or 1.0f | |
| float | StartTimeOffset | ||
| TArray< FTrackRenderData > | TrackSections | Array containing the TrackData (used for rendering) for each individual track | |
| FLinearColor | WireframeOverrideColor | The wireframe override color. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGeometryCacheComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | ClearTrackData Clean up data that was required for playback of geometry cache tracks | ||
| void | CreateTrackSection
(
int32 TrackIndex |
CreateTrackSection, Create/replace a track section. | |
| float | Set the current animation time for GeometryCache. | ||
| float | GetDuration () |
Get the duration of the playback | |
| int32 | GetFrameAtTime
(
const float Time |
Helper to get the frame of the ABC asset at this time | |
| UGeometryCache * | Getter for Geometry cache instance referred by the component Note: This getter is not exposed to blueprints as you can use the readonly Uproperty for that | ||
| bool | |||
| float | Get the motion vector scale. | ||
| int32 | Get the number of frames | ||
| bool | Check whether we are overriding the wireframe color or not. | ||
| float | Set the current animation time for GeometryCache. | ||
| float | Get current playback speed for GeometryCache. | ||
| float | Get current start time offset for GeometryCache. | ||
| float | GetTimeAtFrame
(
const int32 Frame |
Helper to get the time at this frame | |
| FLinearColor | Get the wireframe override color, used when overriding the wireframe color is enabled. | ||
| void | Invalidate both the Matrix and Mesh sample indices | ||
| bool | Get whether this GeometryCache is extrapolating frames. | ||
| bool | IsLooping () |
Get whether this GeometryCache is looping or not. | |
| bool | IsPlaying () |
Get whether this GeometryCache is playing or not. | |
| bool | Get whether this GeometryCache is playing in reverse or not. | ||
| void | OnObjectReimported
(
UGeometryCache* ImportedGeometryCache |
OnObjectReimported, Callback function to refresh section data and update scene proxy. | |
| void | Pause () |
Pause playback of GeometryCache | |
| void | Play () |
Start playback of GeometryCache | |
| void | Start playback of GeometryCache from the start | ||
| void | PlayReversed () |
Start playback of GeometryCache in reverse | |
| void | Start playback of GeometryCache from the end and play in reverse | ||
| void | ReleaseResources, clears and removes data stored/copied from GeometryCache instance | ||
| void | |||
| void | SetExtrapolateFrames
(
const bool bNewExtrapolating |
Set whether this GeometryCache is extrapolating frames. | |
| bool | SetGeometryCache
(
UGeometryCache* NewGeomCache |
Change the Geometry Cache used by this instance. | |
| void | SetLooping
(
const bool bNewLooping |
Set whether this GeometryCache is looping or not. | |
| void | SetManualTick
(
bool bInManualTick |
Functions to override the default TickComponent | |
| void | SetMotionVectorScale
(
const float NewMotionVectorScale |
Set new motion vector scale. | |
| void | SetOverrideWireframeColor
(
bool bOverride |
Override wireframe color? | |
| void | SetPlaybackSpeed
(
const float NewPlaybackSpeed |
Set new playback speed for GeometryCache. | |
| void | SetStartTimeOffset
(
const float NewStartTimeOffset |
Set current start time offset for GeometryCache. | |
| void | SetupTrackData Call CreateTrackSection for all tracks in the GeometryCache assigned to this object. | ||
| void | SetWireframeOverrideColor
(
const FLinearColor Color |
Set the color, used when overriding the wireframe color is enabled. | |
| void | Stop () |
Stop playback of GeometryCache | |
| void | TickAtThisTime
(
const float Time, |
||
| void | Update LocalBounds member from the local box of each section | ||
| bool | UpdateTrackSection
(
int32 TrackIndex, |
Updates the game thread state of a track section |
Overridden from UMeshComponent
| Type | Name | Description | |
|---|---|---|---|
| int32 | GetMaterialIndex
(
FName MaterialSlotName |
||
| TArray< FName > | |||
| bool | IsMaterialSlotNameValid
(
FName MaterialSlotName |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| FPrimitiveSceneProxy * | Creates a proxy to represent the primitive to the scene manager in the rendering thread. | ||
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex |
Returns the material used by the element at the specified index | |
| int32 | Return number of material elements in this primitive |
Overridden from USceneComponent
| Type | Name | Description | |
|---|---|---|---|
| FBoxSphereBounds | CalcBounds
(
const FTransform& LocalToWorld |
Calculate the bounds of the component. Default behavior is a bounding box/sphere of zero size. |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | OnRegister () |
Called when a component is registered, after Scene is set, but before CreateRenderState_Concurrent or OnCreatePhysicsState are called. | |
| void | OnUnregister () |
Called when a component is unregistered. | |
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| void | Called to finish destroying the object. | ||
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostEditUndo () |
Called after applying a transaction to the object. | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditUndo () |
Called before applying a transaction to the object. |