C# Class TressFXLib.HairMesh

This is the hair mesh class. It contains hair information for a single "hair submesh".
ファイルを表示 Open project: kennux/TressFXUnity Class Usage Examples

Public Properties

Property Type Description
bothEndsImmovable bool

Public Methods

Method Description
ExportAsTFX ( String path, int followHairPerGuideHair, float maxRadiusAroundGuideHair ) : void

Exports this hair mesh as tressfx plaintext file.

PrepareSimulationParameters ( int &hairIndexCounter ) : void

This function will get used by importers for example if there were only strand vertex positions available. It will calculate everything inside of the HairStrand and HairStrandVertex based off the vertex positions. This function assumes that hair strands always have atleast 2 vertices! and atleast 2 strands. NOTE: This is currently non-functional, it seems like somewhere some rounding issues happen that will make the output of this unusable. The logic was taken from AMD's AssetConverter. I already spent some days of debugging on this but there is something really weird going on here. My best guess is that C++ floats are more precise than C# floats for this calculations.

Method Details

ExportAsTFX() public method

Exports this hair mesh as tressfx plaintext file.
public ExportAsTFX ( String path, int followHairPerGuideHair, float maxRadiusAroundGuideHair ) : void
path String
followHairPerGuideHair int
maxRadiusAroundGuideHair float
return void

PrepareSimulationParameters() public method

This function will get used by importers for example if there were only strand vertex positions available. It will calculate everything inside of the HairStrand and HairStrandVertex based off the vertex positions. This function assumes that hair strands always have atleast 2 vertices! and atleast 2 strands. NOTE: This is currently non-functional, it seems like somewhere some rounding issues happen that will make the output of this unusable. The logic was taken from AMD's AssetConverter. I already spent some days of debugging on this but there is something really weird going on here. My best guess is that C++ floats are more precise than C# floats for this calculations.
public PrepareSimulationParameters ( int &hairIndexCounter ) : void
hairIndexCounter int
return void

Property Details

bothEndsImmovable public_oe property

If this is set to true both ends of all strands inside of this hair mesh are not movable by physics.
public bool bothEndsImmovable
return bool