UNiagaraDataInterfaceHairStrands

Data Interface for the strand base

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

HairStrandsCore

Header

/Engine/Plugins/Runtime/HairStrands/Source/HairStrandsCore/Public/Niagara/NiagaraDataInterfaceHairStrands.h

Include

#include "Niagara/NiagaraDataInterfaceHairStrands.h"

Syntax

UCLASS(EditInlineNew, Category="Strands", Meta=(DisplayName="Hair Strands"))
class UNiagaraDataInterfaceHairStrands : public UNiagaraDataInterface

Remarks

Data Interface for the strand base

Variables

Name Description

Public variable UProperty Category, EditAnywhere

TObjectPtr< UGr...

 

DefaultSource

Hair Strands Asset used to sample from when not overridden by a source actor from the scene.

Public variable UProperty Category, EditAnywhere

TObjectPtr< AAc...

 

SourceActor

The source actor from which to sample

Public variable

TWeakObjectPtr<...

 

SourceComponent

The source component from which to sample

Constructors

Name Description

Public function

UNiagaraDataInterfaceHairStrands

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function

void

 

AdvectNodeOrientation

Add external torque to the angular velocity and advect node orientation

Public function

void

 

AdvectNodePosition

Add external force to the linear velocity and advect node position

Public function

void

 

AttachNodeOrientation

Update the root node position based on the current transform

Public function

void

 

AttachNodePosition

Update the root node orientation based on the current transform

Public function

void

 

AttachNodeState

Attach the node position and orientation to the transform or to the skin cache

Public function

void

 

BuildBoundingBox

Build the groom bounding box

Public function

void

 

ComputeAirDragForce

Compute the air drag force

Public function

void

 

ComputeEdgeDirection

Compute the rest direction

Public function

void

 

ComputeEdgeLength

Compute the edge length (diff between 2 nodes positions)

Public function

void

 

ComputeEdgeRotation

Compute the edge orientation (diff between 2 nodes orientations)

Public function

void

 

ComputeLocalState

Get the rest position and orientation relative to the transform or to the skin cache

Public function

void

 

ComputeMaterialFrame

Compute the strands material frame

Public function

void

 

ComputeNodeInertia

Get the strand node inertia

Public function

void

 

ComputeNodeMass

Get the strand node mass

Public function

void

 

ComputeNodeOrientation

Get the strand node orientation in world space

Public function

void

 

ComputeNodePosition

Get the strand node position in world space

Public function

void

 

ComputeRestOrientation

Compute the rest local orientation

Public function

void

 

ComputeRestPosition

Compute the rest local position

Public function

void

 

EvalSkinnedPosition

Eval the skinned position given a rest position

Public function

void

 

ExtractDatasAndResources

(
    FNiagaraSystemInstance* System...,
    FHairStrandsRestResource*& Out...,
    FHairStrandsDeformedResource*&...,
    FHairStrandsRestRootResource*&...,
    FHairStrandsDeformedRootResource&#...,
    UGroomAsset*& OutGroomAsset,
    int32& OutGroupIndex,
    int32& OutLODIndex,
    FTransform& OutLocalToWorld
)

Extract datas and resources

Public function

void

 

ExtractSourceComponent

(
    FNiagaraSystemInstance* System...
)

Update the source component

Public function

void

 

GetAirDrag

Public function

void

 

GetAirVelocity

Public function

void

 

GetBendDamping

Public function

void

 

GetBendScale

Public function

void

 

GetBendStiffness

Public function

void

 

GetBoundingBox

Get the bounding box center

Public function

void

 

GetCollisionRadius

Public function

void

 

GetGravityVector

Public function

void

 

GetGridDimension

Public function

void

 

GetIterationCount

Public function

void

 

GetKineticFriction

Public function

void

 

GetNumStrands

Get the number of strands

Public function

void

 

GetPointPosition

Get the strand vertex position in world space

Public function

void

 

GetProjectBend

Public function

void

 

GetProjectCollision

Public function

void

 

GetProjectStretch

Public function

void

 

GetRadiusScale

Public function

void

 

GetSampleState

Get the sample state given an index

Public function

void

 

GetSolveBend

Public function

void

 

GetSolveCollision

Public function

void

 

GetSolveStretch

Public function

void

 

GetStaticFriction

Public function

void

 

GetStrandsDensity

Public function

void

 

GetStrandSize

Get the groom asset datas

Public function

void

 

GetStrandsSmoothing

Public function

void

 

GetStrandsThickness

Public function

void

 

GetStrandsViscosity

Public function

void

 

GetStretchDamping

Public function

void

 

GetStretchScale

Public function

void

 

GetStretchStiffness

Public function

void

 

GetSubSteps

Public function

void

 

GetThicknessScale

Public function

void

 

GetWorldInverse

Get the world inverse

Public function

void

 

GetWorldTransform

Get the world transform

Public function

void

 

HasGlobalInterpolation

Check if we have a global interpolation

Public function

void

 

InitGridSamples

Init the samples along the strands that will be used to transfer informations to the grid

Public function Const

bool

 

IsComponentValid()

Check if the component is Valid

Public function

void

 

NeedRestUpdate

Check if we need a rest pose update

Public function

void

 

NeedSimulationReset

Check if we need or not a simulation reset

Public function

void

 

ProjectAngularSpringMaterial

Project the angular spring material

Public function

void

 

ProjectBendRodMaterial

Project the bend rod material

Public function

void

 

ProjectDistanceSpringMaterial

Project the distance spring material

Public function

void

 

ProjectHardCollisionConstraint

Project the static collision constraint

Public function

void

 

ProjectSoftCollisionConstraint

Project the soft collision constraint

Public function

void

 

ProjectStretchRodMaterial

Project the stretch rod material

Public function

void

 

ResetBoundingBox

Reset the bounding box extent

Public function

void

 

ResetPointPosition

Reset the point position to be the rest one

Public function

void

 

SetupAngularSpringMaterial

Setup the angular spring material

Public function

void

 

SetupBendRodMaterial

Setup the bend rod material

Public function

void

 

SetupDistanceSpringMaterial

Setup the distance spring material

Public function

void

 

SetupSoftCollisionConstraint

Setup the soft collision constraint

Public function

void

 

SetupStretchRodMaterial

Setup the stretch rod material

Public function

void

 

SolveAngularSpringMaterial

Solve the angular spring material

Public function

void

 

SolveBendRodMaterial

Solve the bend rod material

Public function

void

 

SolveDistanceSpringMaterial

Solve the distance spring material

Public function

void

 

SolveHardCollisionConstraint

Solve the static collision constraint

Public function

void

 

SolveSoftCollisionConstraint

Solve the soft collision constraint

Public function

void

 

SolveStretchRodMaterial

Solve the stretch rod material

Public function

void

 

UpdateAngularVelocity

Update the node angular velocity based on the node orientation difference

Public function

void

 

UpdateLinearVelocity

Update the node linear velocity based on the node position difference

Public function

void

 

UpdateMaterialFrame

Update the strands material frame

Public function

void

 

UpdateNodeState

Update the node position and orientation based on rbf transfer

Public function

void

 

UpdatePointPosition

Report the node displacement onto the points position

Overridden from UNiagaraDataInterface

Name Description

Public function Virtual Const

bool

 

AppendCompileHash

(
    FNiagaraCompileHashVisitor* In...
)

Allows the generic class defaults version of this class to specify any dependencies/version/etc that might invalidate the compile.

Public function Virtual Const

ETickingGrou...

 

CalculateTickGroup

(
    const void* PerInstanceData
)

Public function Virtual Const

bool

 

CanExecuteOnTarget

(
    ENiagaraSimTarget Target
)

Protected function Virtual Const

bool

 

CopyToInternal

(
    UNiagaraDataInterface* Destina...
)

Copy one niagara DI to this

Public function Virtual

void

 

DestroyPerInstanceData

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...
)

Destroys the per instance data for this interface.

Public function Virtual Const

bool

 

Equals

(
    const UNiagaraDataInterface* O...
)

Determines if this DataInterface is the same as another.

Public function Virtual

void

 

GetCommonHLSL

(
    FString& OutHLSL
)

GPU simulation functionality

Public function Virtual

bool

 

GetFunctionHLSL

(
    const FNiagaraDataInterfaceGPUParam...,
    const FNiagaraDataInterfaceGenerate...,
    int FunctionInstanceIndex,
    FString& OutHLSL
)

Public function Virtual

void

 

GetFunctions

UNiagaraDataInterface Interface

Public function Virtual

void

 

GetParameterDefinitionHLSL

(
    const FNiagaraDataInterfaceGPUParam...,
    FString& OutHLSL
)

Public function Virtual

void

 

GetVMExternalFunction

(
    const FVMExternalFunctionBindingInf...,
    void* InstanceData,
    FVMExternalFunction& OutFunc
)

Returns the delegate for the passed function signature.

Public function Virtual Const

bool

 

HasPreSimulateTick()

Public function Virtual Const

bool

 

HasTickGroupPrereqs()

Public function Virtual

bool

 

InitPerInstanceData

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...
)

Initializes the per instance data for this interface.

Public function Virtual Const

int32

 

PerInstanceDataSize()

Returns the size of the per instance data for this interface.

Public function Virtual

bool

 

PerInstanceTick

(
    void* PerInstanceData,
    FNiagaraSystemInstance* System...,
    float DeltaSeconds
)

Ticks the per instance data for this interface, if it has any.

Public function Virtual

void

 

ProvidePerInstanceDataForRenderThread

(
    void* DataForRenderThread,
    void* PerInstanceData,
    const FNiagaraSystemInstanceID& Sy...
)

Subclasses that wish to work with GPU systems/emitters must implement this.

Overridden from UNiagaraDataInterfaceBase

Name Description

Public function Virtual

void

 

BindParameters

(
    FNiagaraDataInterfaceParametersCS&...,
    const FNiagaraDataInterfaceGPUParam...,
    const FShaderParameterMap& Paramet...
)

Methods that operate on an instance of type FNiagaraDataInterfaceParametersCS*, created by the above CreateComputeParameters() method

Public function Virtual Const

FNiagaraData...

 

CreateComputeParameters()

Constructs the correct CS parameter type for this DI (if any).

Public function Virtual Const

const FTypeL...

 

GetComputeParametersTypeDesc()

Public function Virtual Const

void

 

SetParameters

(
    const FNiagaraDataInterfaceParamete...,
    FRHICommandList& RHICmdList,
    const FNiagaraDataInterfaceSetArgs ...
)

Public function Virtual Const

void

 

UnsetParameters

(
    const FNiagaraDataInterfaceParamete...,
    FRHICommandList& RHICmdList,
    const FNiagaraDataInterfaceSetArgs ...
)

Overridden from UObject

Name Description

Public function Virtual

void

 

PostInitProperties()

UObject Interface

Constants

Name

Description

BoneAngularAccelerationName

Name of the bone angular acceleration

BoneAngularVelocityName

Name of the bone angular velocity

BoneInverseName

Name of the bone inverse transform

BoneLinearAccelerationName

Name of the bone linear acceleration

BoneLinearVelocityName

Name of the bone linear velocity

BoneRotationName

Name of the world rotation

BoneTransformName

Name of the bone transform

BoundingBoxBufferName

Name of bounding box buffer

BoundingBoxOffsetsName

Name of the bounding box offsets

CurvesOffsetsBufferName

Name of the curves offsets buffer

DeformedPositionBufferName

Name of the points positions buffer

DeformedPositionOffsetName

Deformed center of all the position

DeformedRootOffsetName

Deformed center of all the roots

DeformedTrianglePositionAName

Deformed position of the triangle vertex A

DeformedTrianglePositionBName

Deformed position of the triangle vertex A

DeformedTrianglePositionCName

Deformed position of the triangle vertex A

InterpolationModeName

Param to check if the roots have been attached to the skin

LocalSimulationName

Param to check if the simulation is going to be run in local space

MeshSampleWeightsName

Rbf sample weights

NumStrandsName

Name of the number of strands

ParamsScaleBufferName

Params scale buffer

ResetSimulationName

Boolean to check if we need to rest the simulation

RestPositionBufferName

Name of the nodes positions buffer

RestPositionOffsetName

Rest center of all the position

RestRootOffsetName

Rest center of all the roots

RestSamplePositionsName

Rbf Sample rest positions

RestTrianglePositionAName

Rest position of the triangle vertex A

RestTrianglePositionBName

Rest position of the triangle vertex B

RestTrianglePositionCName

Rest position of the triangle vertex C

RestUpdateName

Param to check if we need to update the rest pose

RootBarycentricCoordinatesName

Root barycentric coordinates

SampleCountName

Number of samples for rbf interpolation

StrandSizeName

Name of the strand size

WorldInverseName

Name of the world inverse transform

WorldRotationName

Name of the world rotation

WorldTransformName

Name of the world transform