C# Class TressFX.TressFXSimulation

Inheritance: UnityEngine.MonoBehaviour
Afficher le fichier Open project: kennux/TressFXUnity Class Usage Examples

Méthodes publiques

Свойство Type Description
collider2 UnityEngine.SphereCollider
collider3 UnityEngine.SphereCollider
collision bool
doLengthConstraintsWindAndCollision bool
doLocalShapeConstraints bool
followHairs bool
frameLimit float
gravityMagnitude float
isWarping bool
lengthConstraintIterations int
localShapeConstraintIterations int
partConfigs TressFX.HairPartConfig[]
simulationShader UnityEngine.ComputeShader
tipSeperationFactor float
windDirection Vector3
windMagnitude float

Méthodes publiques

Méthode Description
Awake ( ) : void
LateUpdate ( ) : void

Méthodes protégées

Méthode Description
SetBuffers ( int kernelId ) : void

Sets the buffers to the given kernel id. Sets all simulation related buffers: g_HairVertexPositions g_HairVertexPositionsPrev g_HairVertexTangents g_InitialHairPositions g_GlobalRotations g_LocalRotations g_HairRestLengthSRV g_HairStrandType g_HairRefVecsInLocalFrame g_FollowHairRootOffset

SetConstants ( ) : void

Sets the constants for the compute shader simulation.

Private Methods

Méthode Description
MatrixToFloatArray ( Matrix4x4 matrix ) : float[]

Convertes a Matrix4x4 to a float array.

QuaternionToFloatArray ( Quaternion quaternion ) : float[]

Quaternion to float array for passing to compute shader

SimulateWind ( ) : void

Method Details

Awake() public méthode

public Awake ( ) : void
Résultat void

LateUpdate() public méthode

public LateUpdate ( ) : void
Résultat void

SetBuffers() protected méthode

Sets the buffers to the given kernel id. Sets all simulation related buffers: g_HairVertexPositions g_HairVertexPositionsPrev g_HairVertexTangents g_InitialHairPositions g_GlobalRotations g_LocalRotations g_HairRestLengthSRV g_HairStrandType g_HairRefVecsInLocalFrame g_FollowHairRootOffset
protected SetBuffers ( int kernelId ) : void
kernelId int Kernel identifier.
Résultat void

SetConstants() protected méthode

Sets the constants for the compute shader simulation.
protected SetConstants ( ) : void
Résultat void

Property Details

collider2 public_oe property

public SphereCollider,UnityEngine collider2
Résultat UnityEngine.SphereCollider

collider3 public_oe property

public SphereCollider,UnityEngine collider3
Résultat UnityEngine.SphereCollider

collision public_oe property

If this is set to true head collision is performed.
public bool collision
Résultat bool

doLengthConstraintsWindAndCollision public_oe property

public bool doLengthConstraintsWindAndCollision
Résultat bool

doLocalShapeConstraints public_oe property

public bool doLocalShapeConstraints
Résultat bool

followHairs public_oe property

The follow hairs flag. If this flag is checked, follow hairs will get used for the simulation.
public bool followHairs
Résultat bool

frameLimit public_oe property

public float frameLimit
Résultat float

gravityMagnitude public_oe property

The gravity magnitude.
public float gravityMagnitude
Résultat float

isWarping public_oe property

If this is set to true simulation is skipped and instead of this the hairs are just moved staticly.
public bool isWarping
Résultat bool

lengthConstraintIterations public_oe property

The length constraint iterations.
public int lengthConstraintIterations
Résultat int

localShapeConstraintIterations public_oe property

The local shape constraint iterations.
public int localShapeConstraintIterations
Résultat int

partConfigs public_oe property

public HairPartConfig[],TressFX partConfigs
Résultat TressFX.HairPartConfig[]

simulationShader public_oe property

The simulation shader.
public ComputeShader,UnityEngine simulationShader
Résultat UnityEngine.ComputeShader

tipSeperationFactor public_oe property

The tip seperation factor used to update follow hair vertices.
public float tipSeperationFactor
Résultat float

windDirection public_oe property

The wind direction.
public Vector3 windDirection
Résultat Vector3

windMagnitude public_oe property

The wind magnitude.
public float windMagnitude
Résultat float