C# Class TressFX.TressFXSimulation

Inheritance: UnityEngine.MonoBehaviour
Mostrar archivo Open project: kennux/TressFXUnity Class Usage Examples

Public Properties

Property 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

Public Methods

Method Description
Awake ( ) : void
LateUpdate ( ) : void

Protected Methods

Method 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

Method 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 method

public Awake ( ) : void
return void

LateUpdate() public method

public LateUpdate ( ) : void
return void

SetBuffers() protected method

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.
return void

SetConstants() protected method

Sets the constants for the compute shader simulation.
protected SetConstants ( ) : void
return void

Property Details

collider2 public_oe property

public SphereCollider,UnityEngine collider2
return UnityEngine.SphereCollider

collider3 public_oe property

public SphereCollider,UnityEngine collider3
return UnityEngine.SphereCollider

collision public_oe property

If this is set to true head collision is performed.
public bool collision
return bool

doLengthConstraintsWindAndCollision public_oe property

public bool doLengthConstraintsWindAndCollision
return bool

doLocalShapeConstraints public_oe property

public bool doLocalShapeConstraints
return 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
return bool

frameLimit public_oe property

public float frameLimit
return float

gravityMagnitude public_oe property

The gravity magnitude.
public float gravityMagnitude
return 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
return bool

lengthConstraintIterations public_oe property

The length constraint iterations.
public int lengthConstraintIterations
return int

localShapeConstraintIterations public_oe property

The local shape constraint iterations.
public int localShapeConstraintIterations
return int

partConfigs public_oe property

public HairPartConfig[],TressFX partConfigs
return TressFX.HairPartConfig[]

simulationShader public_oe property

The simulation shader.
public ComputeShader,UnityEngine simulationShader
return UnityEngine.ComputeShader

tipSeperationFactor public_oe property

The tip seperation factor used to update follow hair vertices.
public float tipSeperationFactor
return float

windDirection public_oe property

The wind direction.
public Vector3 windDirection
return Vector3

windMagnitude public_oe property

The wind magnitude.
public float windMagnitude
return float