Local Compute Avatar SDK  3.0.1
To generate Full Body avatars
avatar_sdk.hpp File Reference

Go to the source code of this file.

Typedefs

typedef void(* avatar_sdk_full_body::ReportProgress) (float)
 

Functions

DllExport int avatar_sdk_full_body::initAvatarSdk (const char *programName, const char *resourcesPath)
 
DllExport int avatar_sdk_full_body::releaseAvatarSdk ()
 
DllExport int avatar_sdk_full_body::generateAvatar (AvatarSdkParams &avatarParams, ReportProgress reportProgress)
 
DllExport int avatar_sdk_full_body::exportAvatar (char *outputDirPath, char *intermediateDirPath, AvatarSdkExportParams &exportParams)
 
DllExport const char * avatar_sdk_full_body::getAvailableHaircuts (unsigned int &size)
 
DllExport const char * avatar_sdk_full_body::getAvailableOutfits (unsigned int &size)
 
DllExport const char * avatar_sdk_full_body::getAvailableBlendshapes (unsigned int &size)
 
DllExport AvatarSdkModelInfoEntry avatar_sdk_full_body::getAvatarModelInfo ()
 
DllExport int avatar_sdk_full_body::getAvatarBonesCount ()
 
DllExport AvatarSdkBone avatar_sdk_full_body::getAvatarBone (int boneIdx)
 
DllExport int avatar_sdk_full_body::getHaircutsMeshesCount ()
 
DllExport int avatar_sdk_full_body::getOutfitsMeshesCount ()
 
DllExport AvatarSdkMesh avatar_sdk_full_body::getAvatarMesh ()
 
DllExport AvatarSdkMesh avatar_sdk_full_body::getHaircutMesh (const char *haircutName)
 
DllExport AvatarSdkMesh avatar_sdk_full_body::getHaircutMeshByIdx (int haircutIdx)
 
DllExport AvatarSdkMesh avatar_sdk_full_body::getOutfitMesh (const char *outfitName)
 
DllExport AvatarSdkMesh avatar_sdk_full_body::getOutfitMeshByIdx (int outfitIdx)
 
DllExport void avatar_sdk_full_body::clearLatestAvatarData ()
 
DllExport void avatar_sdk_full_body::getLastError (char *buffer, int bufferSize)
 
DllExport void avatar_sdk_full_body::setLoggingFile (const char *logFile)
 
DllExport void avatar_sdk_full_body::setAdvancedLogs (bool isAdvanced)
 
DllExport bool avatar_sdk_full_body::isHardwareSupported ()
 
DllExport void avatar_sdk_full_body::enableNetworkTracing (bool detailedDump, char *logFile)
 
DllExport void avatar_sdk_full_body::setApiUrl (const char *apiUrl)
 

Detailed Description

This file contains public methods of the itSeez3D Offline Avatar SDK.

Definition in file avatar_sdk.hpp.

Typedef Documentation

◆ ReportProgress

typedef void(* avatar_sdk_full_body::ReportProgress) (float)

The handler of the calculation progress.

Parameters
[in]floatThe calculation progress in percents.

Definition at line 24 of file avatar_sdk.hpp.

Function Documentation

◆ clearLatestAvatarData()

DllExport void avatar_sdk_full_body::clearLatestAvatarData ( )

Release memory that is used to store latest avatar's data.

◆ enableNetworkTracing()

DllExport void avatar_sdk_full_body::enableNetworkTracing ( bool  detailedDump,
char *  logFile 
)

Enables tracking of network packets. By default tracing is performed into the stderr.

Parameters
[in]detailedDumpTo show packets content, not only headers.
[in]logFilePath to the log file.

◆ exportAvatar()

DllExport int avatar_sdk_full_body::exportAvatar ( char *  outputDirPath,
char *  intermediateDirPath,
AvatarSdkExportParams exportParams 
)

This method allows to make additional exports of an avatar. The avatar can be exported in a different format or with other assets such as haircuts, outfits and blendshapes.

Parameters
[in]outputDirPathOutput directory where the exported avatar will be saved.
[in]intermediateDirPathPath to the intermediate data of the avatar. This data is generated in the "generateAvatar" method.
[in]exportParamsExport parameters.
Returns
Zero in the successful execution.

◆ generateAvatar()

DllExport int avatar_sdk_full_body::generateAvatar ( AvatarSdkParams avatarParams,
ReportProgress  reportProgress 
)

Generates an avatar with the given params. Only one avatar can be genearted at a time.

Parameters
[in]avatarParamsGeneration parameters.
[in]reportProgressCallback that is invoked when the calculation progress is changed.
Returns
Zero in the successful execution. 13: in case the input image can't be read. 26: the face isn't detected on the provided image. -3: exception occured. Use getLastError method to get more info. -4: license error. Use getLastError method to get more info.

◆ getAvailableBlendshapes()

DllExport const char* avatar_sdk_full_body::getAvailableBlendshapes ( unsigned int &  size)

Get blendshapes sets names that can be generated for an avatar.

Parameters
[out]sizeNumber of symbols in the list
Returns
Pointer to blendshapes sets names separated by the ';'.

◆ getAvailableHaircuts()

DllExport const char* avatar_sdk_full_body::getAvailableHaircuts ( unsigned int &  size)

Get haircuts names that can be generated for an avatar.

Parameters
[out]sizeNumber of symbols in the list
Returns
Pointer to haircuts names separated by the ';'.

◆ getAvailableOutfits()

DllExport const char* avatar_sdk_full_body::getAvailableOutfits ( unsigned int &  size)

Get outfits names that can be generated for an avatar.

Parameters
[out]sizeNumber of symbols in the list
Returns
Pointer to outfits names separated by the ';'.

◆ getAvatarBone()

DllExport AvatarSdkBone avatar_sdk_full_body::getAvatarBone ( int  boneIdx)

Get bone data for the latest generated avatar.

Parameters
[in]boneIdxBone index
Returns
Strcuture with bone data.

◆ getAvatarBonesCount()

DllExport int avatar_sdk_full_body::getAvatarBonesCount ( )

Get bones count in the avatar's skeleton for the latest generated avatar.

Returns
Bones count.

◆ getAvatarMesh()

DllExport AvatarSdkMesh avatar_sdk_full_body::getAvatarMesh ( )

Get mesh data for the latest generated avatar.

Returns
Structure with mesh data.

◆ getAvatarModelInfo()

DllExport AvatarSdkModelInfoEntry avatar_sdk_full_body::getAvatarModelInfo ( )

Get model info for the latest generated avatar.

Returns
Model Info structure.

◆ getHaircutMesh()

DllExport AvatarSdkMesh avatar_sdk_full_body::getHaircutMesh ( const char *  haircutName)

Get haircut mesh data for the latest generated avatar.

Parameters
[in]haircutNameName of the haircut.
Returns
Structure with mesh data.

◆ getHaircutMeshByIdx()

DllExport AvatarSdkMesh avatar_sdk_full_body::getHaircutMeshByIdx ( int  haircutIdx)

Get haircut mesh data for the latest generated avatar.

Parameters
[in]haircutIdxIndex of the haircut mesh.
Returns
Structure with mesh data.

◆ getHaircutsMeshesCount()

DllExport int avatar_sdk_full_body::getHaircutsMeshesCount ( )

Get a count of haircuts meshes for the latest avatar.

Returns
Meshes count.

◆ getLastError()

DllExport void avatar_sdk_full_body::getLastError ( char *  buffer,
int  bufferSize 
)

Returns the description of the latest error.

Parameters
[out]bufferPointer to the buffer where the message will be written.
[in]bufferSizeSize of the buffer.

◆ getOutfitMesh()

DllExport AvatarSdkMesh avatar_sdk_full_body::getOutfitMesh ( const char *  outfitName)

Get outfit mesh data for the latest generated avatar.

Parameters
[in]outfitNameName of the outfit.
Returns
Structure with mesh data.

◆ getOutfitMeshByIdx()

DllExport AvatarSdkMesh avatar_sdk_full_body::getOutfitMeshByIdx ( int  outfitIdx)

Get outfit mesh data for the latest generated avatar.

Parameters
[in]outfitIdxIndex of the outfit.
Returns
Structure with mesh data.

◆ getOutfitsMeshesCount()

DllExport int avatar_sdk_full_body::getOutfitsMeshesCount ( )

Get a count of outfits meshes for the latest avatar.

Returns
Meshes count.

◆ initAvatarSdk()

DllExport int avatar_sdk_full_body::initAvatarSdk ( const char *  programName,
const char *  resourcesPath 
)

Initializes the Avatar SDK. Should be called once before any other methods.

Parameters
[in]programNameName of your application.
[in]resourcesPathPath to the resources.
Returns
Zero in the successful execution.

◆ isHardwareSupported()

DllExport bool avatar_sdk_full_body::isHardwareSupported ( )

Check if the avatar can be generated with this hardware configuration. Windows requirements: CPU must support AVX extensions set.

Returns
True if supported.

◆ releaseAvatarSdk()

DllExport int avatar_sdk_full_body::releaseAvatarSdk ( )

Deinitializes the Avatar SDK and releases available resources. Should be called before the app terminates.

Returns
Zero in the successful execution.

◆ setAdvancedLogs()

DllExport void avatar_sdk_full_body::setAdvancedLogs ( bool  isAdvanced)

Configures if the advanced (more detailed) logs are written.

Parameters
[in]isAdvancedTrue for advanced logging.

◆ setApiUrl()

DllExport void avatar_sdk_full_body::setApiUrl ( const char *  apiUrl)

Set API URL address. Possible examples: https://api.avatarsdk.com or https://avatar-api.itseez3d.com

Parameters
[in]apiUrlAPI URL address.

◆ setLoggingFile()

DllExport void avatar_sdk_full_body::setLoggingFile ( const char *  logFile)

Set the logs file. By default logs are not written to file.

Parameters
[in]logFilePath to the log file.