TriLib 2.2.8
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | List of all members
TriLibCore.Mappers.LipSyncMapper Class Reference

Represents a class used to match Blend-Shape Keys with Visemes. Used by Lip-sync systems. More...

Inheritance diagram for TriLibCore.Mappers.LipSyncMapper:
TriLibCore.Mappers.ByNameLipSyncMapper

Public Member Functions

virtual bool Map (AssetLoaderContext assetLoaderContext, IGeometryGroup geometryGroup, out int[] output)
 Tries to match the Visemes with Blend-Shapes Key indices and outputs the indices in the "output" parameter.
 

Public Attributes

int CheckingOrder
 Defines the mapper priority when using other mappers in the same AssetLoaderOptions.
 

Static Public Attributes

const int VisemeCount = 14
 The viseme count.
 

Protected Member Functions

virtual int MapViseme (AssetLoaderContext assetLoaderContext, LipSyncViseme viseme, IGeometryGroup geometryGroup)
 Maps a Geometry Blend-Shape Key to a Viseme.
 

Detailed Description

Represents a class used to match Blend-Shape Keys with Visemes. Used by Lip-sync systems.

Member Function Documentation

◆ Map()

virtual bool TriLibCore.Mappers.LipSyncMapper.Map ( AssetLoaderContext  assetLoaderContext,
IGeometryGroup  geometryGroup,
out int[]  output 
)
virtual

Tries to match the Visemes with Blend-Shapes Key indices and outputs the indices in the "output" parameter.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
geometryGroupThe Geometry Group, containing all child Geometries.
outputThe found Blend-Shape Key indices.
Returns
true if any blend-shape to viseme mapping has been made, false otherwise.

◆ MapViseme()

virtual int TriLibCore.Mappers.LipSyncMapper.MapViseme ( AssetLoaderContext  assetLoaderContext,
LipSyncViseme  viseme,
IGeometryGroup  geometryGroup 
)
protectedvirtual

Maps a Geometry Blend-Shape Key to a Viseme.

Parameters
assetLoaderContextThe Asset Loader Context reference. Asset Loader Context contains the Model loading data.
visemeThe Viseme name.
geometryGroupThe Geometry Group, containing all child Geometries.
Returns
The blend-shape key index, if found, otherwise, -1.

Reimplemented in TriLibCore.Mappers.ByNameLipSyncMapper.