Navigation
API > API/Plugins > API/Plugins/HairStrandsCore
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- USceneComponent
- UPrimitiveComponent
- UMeshComponent
- UGroomComponent
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 ,
public INiagaraPhysicsAssetDICollectorInterface
Variables
| Type | Name | Description | |
|---|---|---|---|
| TObjectPtr< class UNiagaraSystem > | AngularSpringsSystem | ||
| FString | AttachmentName | Optional socket name, where the groom component should be attached at, when parented with a skeletal mesh | |
| TObjectPtr< class UGroomBindingAsset > | BindingAsset | Optional binding asset for binding a groom onto a skeletal mesh. | |
| bool | bInitSimulation | Boolean to check when the simulation should be initialized | |
| bool | bResetSimulation | Boolean to check when the simulation should be reset | |
| bool | bUseCards | Force the groom to use cards/meshes geometry instead of strands. | |
| TObjectPtr< UMaterialInterface > | Cards_DefaultMaterial | ||
| TArray< TWeakObjectPtr< class USkeletalMeshComponent > > | CollisionComponents | List of collision components to be used | |
| TObjectPtr< class UNiagaraSystem > | CosseratRodsSystem | ||
| TObjectPtr< UGroomAsset > | GroomAsset | Groom asset . | |
| TObjectPtr< UGroomCache > | GroomCache | ||
| TArray< FHairGroupDesc > | GroomGroupsDesc | Groom's groups info. | |
| TObjectPtr< UMeshDeformer > | MeshDeformer | If set the MeshDeformer will be applied on groom instance for deformation. | |
| TObjectPtr< UMeshDeformerInstance > | MeshDeformerInstance | Object containing state for the bound MeshDeformer. | |
| TObjectPtr< UMeshDeformerInstanceSettings > | MeshDeformerInstanceSettings | Object containing instance settings for the bound MeshDeformer. | |
| TObjectPtr< UMaterialInterface > | Meshes_DefaultMaterial | ||
| TArray< TObjectPtr< class UNiagaraComponent > > | NiagaraComponents | Niagara components that will be attached to the system | |
| TObjectPtr< class UPhysicsAsset > | PhysicsAsset | Physics asset to be used for hair simulation | |
| FMatrix | PrevBoneMatrix | Previous bone matrix to compare the difference and decide to reset or not the simulation | |
| FHairSimulationSettings | SimulationSettings | Groom's simulation settings | |
| TObjectPtr< class USkeletalMesh > | SourceSkeletalMesh | Kept for debugging mesh transfer. | |
| TObjectPtr< UMaterialInterface > | Strands_DebugMaterial | Reference of the default/debug materials for each geometric representation | |
| TObjectPtr< UMaterialInterface > | Strands_DefaultMaterial |
Constructors
| Type | Name | Description | |
|---|---|---|---|
UGroomComponent
(
const FObjectInitializer& ObjectInitializer |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddCollisionComponent
(
USkeletalMeshComponent* SkeletalMeshComponent |
Add a skeletal mesh to the collision components | |
| UPhysicsAsset * | BuildAndCollect
(
FTransform& BoneTransform, |
||
| void | BuildSimulationTransform
(
FTransform& SimulationTransform |
Build the local simulation transform that could be used in strands simulation | |
| bool | ContainsGroupInstance
(
FHairGroupInstance* Instance |
||
| void | CreateHairSimulation
(
const int32 GroupIndex, |
Create per Group/LOD the Niagara component | |
| float | |||
| int32 | |||
| int32 | ~ Begin ILODSyncInterface Interface. | ||
| int32 | GetForcedLOD () |
||
| int32 | |||
| int32 | |||
| UGroomCache * | GroomCache | ||
| float | |||
| uint32 | Hair group instance access | ||
| const FHairGroupInstance * | GetGroupInstance
(
int32 Index |
||
| FHairGroupInstance * | GetGroupInstance
(
int32 Index |
||
| FHairStrandsDeformedResource * | GetGuideStrandsDeformedResource
(
uint32 GroupIndex |
Return the guide hairs deformed resources | |
| FHairStrandsDeformedRootResource * | GetGuideStrandsDeformedRootResource
(
uint32 GroupIndex |
||
| FHairStrandsRestResource * | GetGuideStrandsRestResource
(
uint32 GroupIndex |
Return the guide hairs rest resources | |
| FHairStrandsRestRootResource * | GetGuideStrandsRestRootResource
(
uint32 GroupIndex |
Return the guide hairs root resources | |
| bool | |||
| bool | |||
| UMaterialInterface * | GetMaterial
(
int32 ElementIndex, |
||
| EHairGeometryType | GetMaterialGeometryType
(
int32 ElementIndex |
||
| UNiagaraComponent * | GetNiagaraComponent
(
const int32 GroupIndex |
Given the group index return the matching niagara component | |
| int32 | GetNumLODs () |
||
| int32 | |||
| uint32 | |||
| void | HandleFeatureLevelChanged
(
ERHIFeatureLevel::Type InFeatureLevel |
||
| void | HandlePlatformPreviewChanged
(
ERHIFeatureLevel::Type InFeatureLevel |
||
| void | Invalidate () |
||
| void | |||
| bool | IsLooping () |
||
| bool | IsSimulationEnable
(
int32 GroupIndex, |
Check if the simulation is enabled or not | |
| void | |||
| void | Release Niagara components | ||
| void | ReleaseHairSimulation
(
const int32 GroupIndex |
||
| void | |||
| void | Reset the collision components | ||
| void | Reset the simulation, if enabled | ||
| void | SetBinding
(
UGroomBindingAsset* InBinding |
||
| void | SetBindingAsset
(
UGroomBindingAsset* InBinding |
Accessor function for changing Groom binding asset from blueprint/sequencer | |
| void | SetEnableSimulation
(
bool bInEnableSimulation |
Accessor function for changing the enable simulation flag from blueprint/sequencer | |
| void | SetForcedLOD
(
int32 LODIndex |
||
| void | SetForceRenderedLOD
(
int32 LODIndex |
||
| void | SetForceStreamedLOD
(
int32 LODIndex |
||
| void | SetGroomAsset
(
UGroomAsset* Asset |
Accessor function for changing Groom asset from blueprint/sequencer | |
| void | SetGroomAsset
(
UGroomAsset* Asset, |
||
| void | SetGroomCache
(
UGroomCache* InGroomCache |
Accessor function for changing GroomCache asset from blueprint/sequencer | |
| void | SetHairLengthScale
(
float Scale |
Accessor function for changing hair length scale from blueprint/sequencer | |
| void | SetHairLengthScaleEnable
(
bool bEnable |
||
| void | SetHairRootScale
(
float Scale |
||
| void | SetHairWidth
(
float HairWidth |
||
| void | SetManualTick
(
bool bInManualTick |
||
| void | SetMeshDeformer
(
UMeshDeformer* InMeshDeformer |
Change the MeshDeformer that is used for this Component. | |
| void | SetPhysicsAsset
(
UPhysicsAsset* InPhysicsAsset |
Accessor function for changing Groom physics asset from blueprint/sequencer | |
| void | SetPreviewMode
(
bool bValue |
Set the component in preview mode, forcing the loading of certain data. | |
| void | SetScatterSceneLighting
(
bool Enable |
||
| void | SetStableRasterization
(
bool bEnable |
||
| void | SetUseCards
(
bool InbUseCards |
||
| void | SetValidation
(
bool bEnable |
||
| void | SwitchSimulationLOD
(
const int32 PreviousLOD, |
Enable/Disable hair simulation while transitioning from one LOD to another one | |
| void | TickAtThisTime
(
const float Time, |
||
| void | Update Group Description | ||
| void | UpdateHairGroupsDescAndInvalidateRenderState
(
bool bInvalidate |
||
| void | Update Niagara components | ||
| void | Update simulated groups | ||
| void | ValidateMaterials
(
bool bMapCheck |
Overridden from UPrimitiveComponent
| Type | Name | Description | |
|---|---|---|---|
| void | CollectPSOPrecacheData
(
const FPSOPrecacheParams& BasePrecachePSOParams, |
Collect all the data required for PSO precaching | |
| 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 | GetMaterialIndex
(
FName MaterialSlotName |
||
| TArray< FName > | |||
| int32 | Return number of material elements in this primitive | ||
| void | GetUsedMaterials
(
TArray< UMaterialInterface* >& OutMaterials, |
Retrieves the materials used in this component | |
| bool | IsMaterialSlotNameValid
(
FName MaterialSlotName |
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. | |
| void | DetachFromComponent
(
const FDetachmentTransformRules& DetachmentRules |
Detach this component from whatever it is attached to. | |
| void | Called when AttachParent changes, to allow the scene to update its attachment state. | ||
| void | PreFeatureLevelChange
(
ERHIFeatureLevel::Type PendingFeatureLevel |
Called to update any visuals needed for a feature level change |
Overridden from UActorComponent
| Type | Name | Description | |
|---|---|---|---|
| void | 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. | ||
| void | CreateRenderState_Concurrent
(
FRegisterComponentContext* Context |
Used to create any rendering thread information for this component | |
| void | Used to shut down any rendering thread structure for this component | ||
| void | OnComponentDestroyed
(
bool bDestroyingHierarchy |
Called when a component is destroyed | |
| 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. | |
| bool | Return true if this component requires end of frame recreates to happen from the game thread. | ||
| void | Called to send dynamic data for this component to the rendering thread | ||
| void | TickComponent
(
float DeltaTime, |
Function called every frame on this ActorComponent. |
Overridden from UObject
| Type | Name | Description | |
|---|---|---|---|
| void | BeginDestroy () |
Called before destroying the object. | |
| bool | CanEditChange
(
const FProperty* InProperty |
Called by the editor to query whether a property of this object is allowed to be modified. | |
| void | Called to finish destroying the object. | ||
| void | GetResourceSizeEx
(
FResourceSizeEx& CumulativeResourceSize |
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). | |
| void | PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Called when a property on this object has been modified externally | |
| void | PostLoad () |
Do any object-specific cleanup required immediately after loading an object. | |
| void | PreEditChange
(
FProperty* PropertyAboutToChange |
This is called when a property is about to be modified externally |
Overridden from IInterface_AsyncCompilation
| Type | Name | Description | |
|---|---|---|---|
| bool | IsCompiling () |
Returns whether this component is still being compiled or dependent on other objects being compiled. |