C# Class TressFXLib.HairStrandVertex

This class represents a single vertex inside a hair strand.
Show file Open project: kennux/TressFXUnity Class Usage Examples

Public Properties

Property Type Description
distanceToRoot float
globalTransform TressFXLib.HairStrandVertexTransform
isMovable bool
localTransform TressFXLib.HairStrandVertexTransform
position System.Vector3
referenceVector System.Vector4
restLength float
tangent System.Vector3
texcoord System.Vector4
thicknessCoefficient float

Public Methods

Method Description
GetTressFXPosition ( ) : System.Vector4

Creates a 4-component tressfx position vector. Tressfx uses the first 3 components for the actual world position (XYZ) and the fourth component as "movable flag". If the movable flag is 0, the hair is immovable. If it is > 0 it is movable.

HairStrandVertex ( System.Vector3 position, System.Vector3 tangent, System.Vector4 texcoord ) : System

"Easy-init" constructor.

Method Details

GetTressFXPosition() public method

Creates a 4-component tressfx position vector. Tressfx uses the first 3 components for the actual world position (XYZ) and the fourth component as "movable flag". If the movable flag is 0, the hair is immovable. If it is > 0 it is movable.
public GetTressFXPosition ( ) : System.Vector4
return System.Vector4

HairStrandVertex() public method

"Easy-init" constructor.
public HairStrandVertex ( System.Vector3 position, System.Vector3 tangent, System.Vector4 texcoord ) : System
position System.Vector3
tangent System.Vector3
texcoord System.Vector4
return System

Property Details

distanceToRoot public property

The distance from this vertex to the root of the hair. This is generated during simulation data preparation. This value is normalized between 0 and 1
public float distanceToRoot
return float

globalTransform public property

The global transformation of the current vertex.
public HairStrandVertexTransform,TressFXLib globalTransform
return TressFXLib.HairStrandVertexTransform

isMovable public property

If this is set to false, the hair strand vertex will become immovable.
public bool isMovable
return bool

localTransform public property

The local transformation of the current vertex.
public HairStrandVertexTransform,TressFXLib localTransform
return TressFXLib.HairStrandVertexTransform

position public property

The position of this vertex.
public Vector3,System position
return System.Vector3

referenceVector public property

The reference vector.
public Vector4,System referenceVector
return System.Vector4

restLength public property

The rest length of this vertex.
public float restLength
return float

tangent public property

The tangent of this vertex.
public Vector3,System tangent
return System.Vector3

texcoord public property

The texcoord of this strand. xy = 1. texcoord, zw = 2. texcoord (normally unused)
public Vector4,System texcoord
return System.Vector4

thicknessCoefficient public property

The thickness coefficient of this vertex.
public float thicknessCoefficient
return float