C# Класс TressFX.TressFXSimulation

Наследование: UnityEngine.MonoBehaviour
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
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

Открытые методы

Метод Описание
Awake ( ) : void
LateUpdate ( ) : void

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
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

Описание методов

Awake() публичный Метод

public Awake ( ) : void
Результат void

LateUpdate() публичный Метод

public LateUpdate ( ) : void
Результат void

SetBuffers() защищенный Метод

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.
Результат void

SetConstants() защищенный Метод

Sets the constants for the compute shader simulation.
protected SetConstants ( ) : void
Результат void

Описание свойств

collider2 публичное свойство

public SphereCollider,UnityEngine collider2
Результат UnityEngine.SphereCollider

collider3 публичное свойство

public SphereCollider,UnityEngine collider3
Результат UnityEngine.SphereCollider

collision публичное свойство

If this is set to true head collision is performed.
public bool collision
Результат bool

doLengthConstraintsWindAndCollision публичное свойство

public bool doLengthConstraintsWindAndCollision
Результат bool

doLocalShapeConstraints публичное свойство

public bool doLocalShapeConstraints
Результат bool

followHairs публичное свойство

The follow hairs flag. If this flag is checked, follow hairs will get used for the simulation.
public bool followHairs
Результат bool

frameLimit публичное свойство

public float frameLimit
Результат float

gravityMagnitude публичное свойство

The gravity magnitude.
public float gravityMagnitude
Результат float

isWarping публичное свойство

If this is set to true simulation is skipped and instead of this the hairs are just moved staticly.
public bool isWarping
Результат bool

lengthConstraintIterations публичное свойство

The length constraint iterations.
public int lengthConstraintIterations
Результат int

localShapeConstraintIterations публичное свойство

The local shape constraint iterations.
public int localShapeConstraintIterations
Результат int

partConfigs публичное свойство

public HairPartConfig[],TressFX partConfigs
Результат TressFX.HairPartConfig[]

simulationShader публичное свойство

The simulation shader.
public ComputeShader,UnityEngine simulationShader
Результат UnityEngine.ComputeShader

tipSeperationFactor публичное свойство

The tip seperation factor used to update follow hair vertices.
public float tipSeperationFactor
Результат float

windDirection публичное свойство

The wind direction.
public Vector3 windDirection
Результат Vector3

windMagnitude публичное свойство

The wind magnitude.
public float windMagnitude
Результат float