UGroomComponent

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

HairStrandsCore

Header

/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Public/GroomComponent.h

Include

#include "GroomComponent.h"

Syntax

UCLASS(HideCategories=(Object, Physics, Activation, Mobility, "Components|Activation"),
       EditInlineNew, Meta=(BlueprintSpawnableComponent), ClassGroup=Rendering)
class UGroomComponent :
    public UMeshComponent,
    public ILODSyncInterface

Variables

Name Description

Public variable UProperty

TObjectPtr< cla...

 

AngularSpringsSystem

Public variable UProperty Category, EditAnywhere, AdvancedDisplay, Interp BlueprintReadWrite

FString

 

AttachmentName

Optional socket name, where the groom component should be attached at, when parented with a skeletal mesh

Public variable UProperty Category, EditAnywhere, Interp, Meta BlueprintReadOnly

TObjectPtr< cla...

 

BindingAsset

Optional binding asset for binding a groom onto a skeletal mesh.

Public variable

bool

 

bInitSimulation

Boolean to check when the simulation should be initialized

Public variable

bool

 

bResetSimulation

Boolean to check when the simulation should be reset

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

bool

 

bUseCards

Force the groom to use cards/meshes geometry instead of strands.

Public variable UProperty

TObjectPtr< UMa...

 

Cards_DefaultMaterial

Public variable UProperty

TObjectPtr< cla...

 

CosseratRodsSystem

Public variable UProperty Category, EditAnywhere, Interp BlueprintReadWrite

TObjectPtr< UGr...

 

GroomAsset

Groom asset .

Public variable UProperty Category, EditAnywhere, Interp, Meta BlueprintReadWrite

TObjectPtr< UGr...

 

GroomCache

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

TArray< FHairGr...

 

GroomGroupsDesc

Groom's groups info.

Public variable UProperty

TObjectPtr< UMa...

 

Meshes_DefaultMaterial

Public variable UProperty Transient

TArray< TObject...

 

NiagaraComponents

Niagara components that will be attached to the system

Public variable UProperty Category, EditAnywhere BlueprintReadWrite

TObjectPtr< cla...

 

PhysicsAsset

Physics asset to be used for hair simulation

Public variable

FMatrix

 

PrevBoneMatrix

Previous bone matrix to compare the difference and decide to reset or not the simulation

Public variable UProperty Category, EditAnywhere, Interp BlueprintReadWrite

FHairSimulation...

 

SimulationSettings

Groom's simulation settings

Public variable UProperty

TObjectPtr< cla...

 

SourceSkeletalMesh

Kept for debugging mesh transfer.

Public variable UProperty

TObjectPtr< UMa...

 

Strands_DebugMaterial

Reference of the default/debug materials for each geometric representation

Public variable UProperty

TObjectPtr< UMa...

 

Strands_DefaultMaterial

Constructors

Name Description

Public function

UGroomComponent

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const

void

 

BuildSimulationTransform

(
    FTransform& SimulationTransform
)

Build the local simulation transform that could be used in strands simulation

Public function

void

 

CreateHairSimulation

(
    const int32 GroupIndex,
    const int32 LODIndex
)

Create per Group/LOD the Niagara component

Public function Const

float

 

GetAnimationTime()

Public function Const

EHairStrands...

 

GetDebugMode()

Public function Const

int32

 

GetForcedLOD()

Public function Const

UGroomCache ...

 

GetGroomCache()

GroomCache

Public function Const

float

 

GetGroomCacheDuration()

Public function Const

uint32

 

GetGroupCount()

Hair group instance access

Public function Const

const FHairG...

 

GetGroupInstance

(
    int32 Index
)

Public function

FHairGroupIn...

 

GetGroupInstance

(
    int32 Index
)

Public function

FHairStrands...

 

GetGuideStrandsDeformedResource

(
    uint32 GroupIndex
)

Return the guide hairs deformed resources

Public function

FHairStrands...

 

GetGuideStrandsDeformedRootResource

(
    uint32 GroupIndex
)

Public function

FHairStrands...

 

GetGuideStrandsRestResource

(
    uint32 GroupIndex
)

Return the guide hairs rest resources

Public function

FHairStrands...

 

GetGuideStrandsRestRootResource

(
    uint32 GroupIndex
)

Return the guide hairs root resources

Public function UFunction BlueprintCallable, Category

bool

 

GetIsHairLengthScaleEnabled()

Public function Const

bool

 

GetManualTick()

Public function Const

UMaterialInt...

 

GetMaterial

(
    int32 ElementIndex,
    EHairGeometryType GeometryType,
    bool bUseDefaultIfIncompatible
)

Public function Const

EHairGeometr...

 

GetMaterialGeometryType

(
    int32 ElementIndex
)

Public function Const

int32

 

GetNumLODs()

Public function Const

uint32

 

GetResourcesSize()

Public function

void

 

Invalidate()

Public function

void

 

InvalidateAndRecreate()

Public function Const

bool

 

IsLooping()

Public function Const

bool

 

IsSimulationEnable

(
    int32 GroupIndex,
    int32 LODIndex
)

Check if the simulation is enabled or not

Public function

void

 

ReleaseHairSimulation

(
    const int32 GroupIndex
)

Release Niagara components

Public function

void

 

ReleaseHairSimulation()

Release Niagara components

Public function

void

 

ResetAnimationTime()

Public function UFunction BlueprintCallable, Category

void

 

ResetSimulation()

Reset the simulation, if enabled

Public function

void

 

SetBinding

(
    UGroomBindingAsset* InBinding
)

Public function UFunction BlueprintCallable, Category

void

 

SetBindingAsset

(
    UGroomBindingAsset* InBinding
)

Accessor function for changing Groom binding asset from blueprint/sequencer

Public function

void

 

SetDebugMode

(
    EHairStrandsDebugMode InMode
)

Public function UFunction BlueprintCallable, Category

void

 

SetEnableSimulation

(
    bool bInEnableSimulation
)

Accessor function for changing the enable simulation flag from blueprint/sequencer

Public function

void

 

SetForcedLOD

(
    int32 LODIndex
)

Public function UFunction BlueprintCallable, Category

void

 

SetGroomAsset

(
    UGroomAsset* Asset
)

Accessor function for changing Groom asset from blueprint/sequencer

Public function

void

 

SetGroomAsset

(
    UGroomAsset* Asset,
    UGroomBindingAsset* InBinding,
    const bool bUpdateSimulation
)

Public function

void

 

SetGroomCache

(
    UGroomCache* InGroomCache
)

Public function UFunction BlueprintCallable, Category

void

 

SetHairLengthScale

(
    float Scale
)

Accessor function for changing hair length scale from blueprint/sequencer

Public function UFunction BlueprintCallable, Category

void

 

SetHairLengthScaleEnable

(
    bool bEnable
)

Public function

void

 

SetHairRootScale

(
    float Scale
)

Public function

void

 

SetHairWidth

(
    float HairWidth
)

Public function

void

 

SetManualTick

(
    bool bInManualTick
)

Public function UFunction BlueprintCallable, Category

void

 

SetPhysicsAsset

(
    UPhysicsAsset* InPhysicsAsset
)

Accessor function for changing Groom physics asset from blueprint/sequencer

Public function

void

 

SetPreviewMode

(
    bool bValue
)

Set the component in preview mode, forcing the loading of certain data.

Public function

void

 

SetScatterSceneLighting

(
    bool Enable
)

Public function

void

 

SetStableRasterization

(
    bool bEnable
)

Public function

void

 

SetUseCards

(
    bool InbUseCards
)

Public function

void

 

SetValidation

(
    bool bEnable
)

Public function

void

 

SwitchSimulationLOD

(
    const int32 PreviousLOD,
    const int32 CurrentLOD
)

Enable/Disable hair simulation while transitioning from one LOD to another one

Public function

void

 

TickAtThisTime

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

Public function

void

 

UpdateHairGroupsDesc()

Update Group Description

Public function

void

 

UpdateHairGroupsDescAndInvalidateRenderState

(
    bool bInvalidate
)

Update Group Description

Public function

void

 

UpdateHairSimulation()

Update Niagara components

Public function

void

 

UpdateSimulatedGroups()

Update simulated groups

Public function Const

void

 

ValidateMaterials

(
    bool bMapCheck
)

Overridden from UMeshComponent

Name Description

Public function Virtual Const

int32

 

GetMaterialIndex

(
    FName MaterialSlotName
)

Public function Virtual Const

TArray< FNam...

 

GetMaterialSlotNames()

Public function Virtual Const

bool

 

IsMaterialSlotNameValid

(
    FName MaterialSlotName
)

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

Public function Virtual Const

void

 

GetUsedMaterials

(
    TArray< UMaterialInterface* > ...,
    bool bGetDebugMaterials
)

Retrieves the materials used in this component

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.

Public function Virtual

void

 

DetachFromComponent

(
    const FDetachmentTransformRules& D...
)

Detach this component from whatever it is attached to.

Public function Virtual

void

 

OnAttachmentChanged()

Called when AttachParent changes, to allow the scene to update its attachment state.

Protected function Virtual

void

 

OnChildAttached

(
    USceneComponent* ChildComponen...
)

Used for tracking if a Niagara component is attached or not.

Protected function Virtual

void

 

OnChildDetached

(
    USceneComponent* ChildComponen...
)

Called after a child scene component is detached from this component.

Overridden from UActorComponent

Name Description

Public function Virtual

void

 

CheckForErrors()

Function that gets called from within Map_Check to allow this actor component to check itself for any potential errors and register them with map check dialog.

Public function Virtual

void

 

OnComponentDestroyed

(
    bool bDestroyingHierarchy
)

Called when a component is destroyed

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

 

SendRenderDynamicData_Concurrent()

Called to send dynamic data for this component to the rendering thread

Public function Virtual

void

 

SendRenderTransform_Concurrent()

Called to send a transform update for this component to the rendering thread

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 Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

Public function Virtual

void

 

FinishDestroy()

Called to finish destroying the object.

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostLoad()

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

Public function Virtual

void

 

PreEditChange

(
    FProperty* PropertyAboutToChan...
)

This is called when a property is about to be modified externally

Overridden from ILODSyncInterface

Name Description

Public function Virtual Const

int32

 

GetCurrentSyncLOD()

Returns what the current sync LOD has bee set to

Public function Virtual Const

int32

 

GetDesiredSyncLOD()

~ Begin ILODSyncInterface Interface.

Public function Virtual Const

int32

 

GetNumSyncLODs()

Returns number of LODs

Public function Virtual

void

 

SetSyncLOD

(
    int32 LODIndex
)

Sets what is synced LOD by 0 based index