UNiagaraDataInterfaceHairStrands

Data Interface for the strand base

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

HairStrandsNiagara

Header

/Engine/Plugins/Experimental/HairStrands/Source/HairStrandsNiagara/Public/NiagaraDataInterfaceHairStrands.h

Include

#include "NiagaraDataInterfaceHairStrands.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)(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

UGroomAsset ...

 

DefaultSource

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

Public variable UProperty Category, EditAnywhere

AActor *

 

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

(
    FVectorVMContext& Context
)

Add external torque to the angular velocity and advect node orientation

Public function

void

 

AdvectNodePosition

(
    FVectorVMContext& Context
)

Add external force to the linear velocity and advect node position

Public function

void

 

AttachNodeOrientation

(
    FVectorVMContext& Context
)

Update the root node position based on the current transform

Public function

void

 

AttachNodePosition

(
    FVectorVMContext& Context
)

Update the root node orientation based on the current transform

Public function

void

 

AttachNodeState

(
    FVectorVMContext& Context
)

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

Public function

void

 

BuildBoundingBox

(
    FVectorVMContext& Context
)

Build the groom bounding box

Public function

void

 

ComputeAirDragForce

(
    FVectorVMContext& Context
)

Compute the air drag force

Public function

void

 

ComputeEdgeDirection

(
    FVectorVMContext& Context
)

Compute the rest direction

Public function

void

 

ComputeEdgeLength

(
    FVectorVMContext& Context
)

Compute the edge length (diff between 2 nodes positions)

Public function

void

 

ComputeEdgeRotation

(
    FVectorVMContext& Context
)

Compute the edge orientation (diff between 2 nodes orientations)

Public function

void

 

ComputeLocalState

(
    FVectorVMContext& Context
)

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

Public function

void

 

ComputeMaterialFrame

(
    FVectorVMContext& Context
)

Compute the strands material frame

Public function

void

 

ComputeNodeInertia

(
    FVectorVMContext& Context
)

Get the strand node inertia

Public function

void

 

ComputeNodeMass

(
    FVectorVMContext& Context
)

Get the strand node mass

Public function

void

 

ComputeNodeOrientation

(
    FVectorVMContext& Context
)

Get the strand node orientation in world space

Public function

void

 

ComputeNodePosition

(
    FVectorVMContext& Context
)

Get the strand node position in world space

Public function

void

 

ComputeRestOrientation

(
    FVectorVMContext& Context
)

Compute the rest local orientation

Public function

void

 

ComputeRestPosition

(
    FVectorVMContext& Context
)

Compute the rest local position

Public function

void

 

EvalSkinnedPosition

(
    FVectorVMContext& Context
)

Eval the skinned position given a rest position

Public function

void

 

ExtractDatasAndResources

(
    FNiagaraSystemInstance* System...,
    FHairStrandsDatas*& OutStrands...,
    FHairStrandsRestResource*& Out...,
    FHairStrandsDeformedResource*&...,
    FHairStrandsRestRootResource*&...,
    FHairStrandsDeformedRootResource&#...,
    UGroomAsset*& OutGroomAsset,
    int32& OutGroupIndex
)

Extract datas and resources

Public function

void

 

ExtractSourceComponent

(
    FNiagaraSystemInstance* System...
)

Update the source component

Public function

void

 

GetAirDrag

(
    FVectorVMContext& Context
)

Public function

void

 

GetAirVelocity

(
    FVectorVMContext& Context
)

Public function

void

 

GetBendDamping

(
    FVectorVMContext& Context
)

Public function

void

 

GetBendScale

(
    FVectorVMContext& Context
)

Public function

void

 

GetBendStiffness

(
    FVectorVMContext& Context
)

Public function

void

 

GetBoxCenter

(
    FVectorVMContext& Context
)

Get the bounding box center

Public function

void

 

GetBoxExtent

(
    FVectorVMContext& Context
)

Get the bounding box extent

Public function

void

 

GetCollisionRadius

(
    FVectorVMContext& Context
)

Public function

void

 

GetGravityVector

(
    FVectorVMContext& Context
)

Public function

void

 

GetGridDimension

(
    FVectorVMContext& Context
)

Public function

void

 

GetIterationCount

(
    FVectorVMContext& Context
)

Public function

void

 

GetKineticFriction

(
    FVectorVMContext& Context
)

Public function

void

 

GetNumStrands

(
    FVectorVMContext& Context
)

Get the number of strands

Public function

void

 

GetPointPosition

(
    FVectorVMContext& Context
)

Get the strand vertex position in world space

Public function

void

 

GetProjectBend

(
    FVectorVMContext& Context
)

Public function

void

 

GetProjectCollision

(
    FVectorVMContext& Context
)

Public function

void

 

GetProjectStretch

(
    FVectorVMContext& Context
)

Public function

void

 

GetRadiusScale

(
    FVectorVMContext& Context
)

Public function

void

 

GetSolveBend

(
    FVectorVMContext& Context
)

Public function

void

 

GetSolveCollision

(
    FVectorVMContext& Context
)

Public function

void

 

GetSolveStretch

(
    FVectorVMContext& Context
)

Public function

void

 

GetStaticFriction

(
    FVectorVMContext& Context
)

Public function

void

 

GetStrandsDensity

(
    FVectorVMContext& Context
)

Public function

void

 

GetStrandSize

(
    FVectorVMContext& Context
)

Get the groom asset datas

Public function

void

 

GetStrandsSmoothing

(
    FVectorVMContext& Context
)

Public function

void

 

GetStrandsThickness

(
    FVectorVMContext& Context
)

Public function

void

 

GetStrandsViscosity

(
    FVectorVMContext& Context
)

Public function

void

 

GetStretchDamping

(
    FVectorVMContext& Context
)

Public function

void

 

GetStretchScale

(
    FVectorVMContext& Context
)

Public function

void

 

GetStretchStiffness

(
    FVectorVMContext& Context
)

Public function

void

 

GetSubSteps

(
    FVectorVMContext& Context
)

Public function

void

 

GetThicknessScale

(
    FVectorVMContext& Context
)

Public function

void

 

GetWorldInverse

(
    FVectorVMContext& Context
)

Get the world inverse

Public function

void

 

GetWorldTransform

(
    FVectorVMContext& Context
)

Get the world transform

Public function

void

 

HasGlobalInterpolation

(
    FVectorVMContext& Context
)

Check if we have a global interpolation

Public function Const

bool

 

IsComponentValid()

Check if the component is Valid

Public function

void

 

NeedSimulationReset

(
    FVectorVMContext& Context
)

Check if we need or not a simulation reset

Public function

void

 

ProjectAngularSpringMaterial

(
    FVectorVMContext& Context
)

Project the angular spring material

Public function

void

 

ProjectBendRodMaterial

(
    FVectorVMContext& Context
)

Project the bend rod material

Public function

void

 

ProjectDistanceSpringMaterial

(
    FVectorVMContext& Context
)

Project the distance spring material

Public function

void

 

ProjectHardCollisionConstraint

(
    FVectorVMContext& Context
)

Project the static collision constraint

Public function

void

 

ProjectSoftCollisionConstraint

(
    FVectorVMContext& Context
)

Project the soft collision constraint

Public function

void

 

ProjectStretchRodMaterial

(
    FVectorVMContext& Context
)

Project the stretch rod material

Public function

void

 

ResetPointPosition

(
    FVectorVMContext& Context
)

Reset the point position to be the rest one

Public function

void

 

SetupAngularSpringMaterial

(
    FVectorVMContext& Context
)

Setup the angular spring material

Public function

void

 

SetupBendRodMaterial

(
    FVectorVMContext& Context
)

Setup the bend rod material

Public function

void

 

SetupDistanceSpringMaterial

(
    FVectorVMContext& Context
)

Setup the distance spring material

Public function

void

 

SetupSoftCollisionConstraint

(
    FVectorVMContext& Context
)

Setup the soft collision constraint

Public function

void

 

SetupStretchRodMaterial

(
    FVectorVMContext& Context
)

Setup the stretch rod material

Public function

void

 

SolveAngularSpringMaterial

(
    FVectorVMContext& Context
)

Solve the angular spring material

Public function

void

 

SolveBendRodMaterial

(
    FVectorVMContext& Context
)

Solve the bend rod material

Public function

void

 

SolveDistanceSpringMaterial

(
    FVectorVMContext& Context
)

Solve the distance spring material

Public function

void

 

SolveHardCollisionConstraint

(
    FVectorVMContext& Context
)

Solve the static collision constraint

Public function

void

 

SolveSoftCollisionConstraint

(
    FVectorVMContext& Context
)

Solve the soft collision constraint

Public function

void

 

SolveStretchRodMaterial

(
    FVectorVMContext& Context
)

Solve the stretch rod material

Public function

void

 

UpdateAngularVelocity

(
    FVectorVMContext& Context
)

Update the node angular velocity based on the node orientation difference

Public function

void

 

UpdateLinearVelocity

(
    FVectorVMContext& Context
)

Update the node linear velocity based on the node position difference

Public function

void

 

UpdateMaterialFrame

(
    FVectorVMContext& Context
)

Update the strands material frame

Public function

void

 

UpdateNodeState

(
    FVectorVMContext& Context
)

Update the node position and orientation based on rbf transfer

Public function

void

 

UpdatePointPosition

(
    FVectorVMContext& Context
)

Report the node displacement onto the points position

Overridden from UNiagaraDataInterface

Name Description

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
)

Allows data interfaces to provide common functionality that will be shared across interfaces on that type.

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
)

GPU simulation functionality

Public function Virtual

void

 

GetVMExternalFunction

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

Returns the delegate for the passed function signature.

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

BoundingBoxBufferAName

Name of bounding box buffer

BoundingBoxBufferBName

Name of node bound buffer

BoxCenterName

Name of the box center

BoxExtentName

Name of the box extent

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

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

RootBarycentricCoordinatesName

Root barycentric coordinates

SampleCountName

Number of samples for rbf interpolation

StrandSizeName

Name of the strand size

WorldInverseName

Name of the world transform

WorldRotationName

Name of the world rotation

WorldTransformName

Name of the world transform

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss