makeup|SDK
makeup|SDK is a library based on visage|SDK face tracking used to configure and render virtual makeup.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
com.visagetechnologies.makeupsdk.FeatureTemplate Class Reference

Public Member Functions

JSONObject ToJSON ()
 

Static Public Member Functions

static FeatureTemplate FromJSON (JSONObject jsonObject)
 
static FeatureTemplate FromJSON (String json)
 

Public Attributes

String name
 
String type
 
List< ElementTemplateelements = new ArrayList<ElementTemplate>()
 

Detailed Description

Stores a definition of makeup feature. One makeup feature contains all information required to render virtual makeup:

One FeatureTemplate instance can contain multiple rendering elements which share the mesh but can have different application area, color or blending and filtering algorithm. The simplest use-case for this class is using one of the predefined template specified in FeatureTemplateRepository obtained from MakeupEngine::GetFeatures function and setting the color of each element in elements array.

FeatureTemplate is defined by the following:

The following types are supported:

Each type maps to a single mesh. The meshes used are stored in .obj format in the "Assets/Models" folder. The name of the .obj corresponds to the type name.

Additionally, this class provides methods for serialization and deserialization of FeatureTemplate instances from and to JSON format.

Member Function Documentation

◆ FromJSON() [1/2]

static FeatureTemplate com.visagetechnologies.makeupsdk.FeatureTemplate.FromJSON ( JSONObject  jsonObject)
inlinestatic

Deserializes FeatureTemplate object from JSON representation

Parameters
jsonObjectJSON object
Returns
deserialized FeatureTemplate object

◆ FromJSON() [2/2]

static FeatureTemplate com.visagetechnologies.makeupsdk.FeatureTemplate.FromJSON ( String  json)
inlinestatic

Returns FeatureTemplate object out of JSON string

Parameters
jsonJSON string
Returns
deserialized FeatureTemplate object

◆ ToJSON()

JSONObject com.visagetechnologies.makeupsdk.FeatureTemplate.ToJSON ( )
inline

Returns JSON object out of this FeatureTemplate object

Returns
JSON representation of this FeatureTemplate returned as JSON object

Member Data Documentation

◆ elements

List<ElementTemplate> com.visagetechnologies.makeupsdk.FeatureTemplate.elements = new ArrayList<ElementTemplate>()

A list of elements required for rendering this feature.

◆ name

String com.visagetechnologies.makeupsdk.FeatureTemplate.name

Name of the feature

◆ type

String com.visagetechnologies.makeupsdk.FeatureTemplate.type

Type of the feature. Specifies one of the predefined meshes to use to represent this feature.