mocopi mobile SDK
Loading...
Searching...
No Matches
Mocopi.Mobile.Sdk.MocopiManager Class Reference

Class that summarizes the processing related to mocopi sensor
. More...

Public Member Functions

void StartDiscovery (bool excludeSettedPart=false)
 Start searching for mocopi sensor via Bluetooth.
.
 
void StopDiscovery ()
 Stop the mocopi sensor search.
.
 
string GetPart (EnumParts part)
 Get the mocopi sensor name based on the configured connecting body part.
.
 
bool SetPart (EnumParts part, string sensorName)
 Link the specified connecting body part to the specified mocopi sensor.
.
 
bool RemovePart (EnumParts part)
 Delete the linking of the connecting body part to the sensor name.
.
 
void CreateBond (string sensorName, EnumParts part)
 Pair the mocopi sensor.
.
 
bool StartSensor ()
 Connect all paired mocopi sensors.
.
 
void StartSingleSensor (EnumParts part)
 Connect the connecting body part to the mocopi sensor.
.
 
List< EnumPartsGetPartsListWithTargetBody (EnumTargetBodyType bodyType)
 Get a list of connecting body parts used for the specified tracking type.
.
 
bool IsAllPartsSetted ()
 Are all connecting body parts for the current tracking type linked to the mocopi sensor?
.
 
bool IsAllPartsSetted (EnumTargetBodyType bodyType)
 Are all connecting parts and sensors for the specified tracking type linked to the sensor?
.
 
bool IsAllSensorsReady ()
 Are the mocopi sensors connected to all connecting body parts being used?
.
 
bool GetPartFromSensorName (string sensorName, out EnumParts part)
 Get the connecting body part linked to the mocopi sensor name.
.
 
void DisconnectSensors ()
 Disconnect all connected mocopi sensors.
.
 
void DisconnectSensor (EnumParts part)
 Disconnect the mocopi sensor of a specific body part.
.
 
void StopSensor ()
 Stop tracking and disconnect all sensors.
.
 
MocopiHeightStruct GetHeight ()
 Get height information used for calibration.
.
 
bool SetHeight (MocopiHeightStruct heightStruct)
 Set height used for calibration.
.
 
async Task< bool > StartCalibration ()
 Initiate calibration.
.
 
bool CancelCalibration ()
 Cancel the calibration.
.
 
bool StartTracking ()
 Initiate tracking.
.
 
void StopTracking ()
 Stop tracking.
.
 
bool SetRootPosition (Vector3 position)
 Reset the avatar position.
.
 
bool SetFixedHip (bool fixedHip)
 Set whether to fix the hip of the avatar
.
 
bool ResetPose ()
 Reset the avatar pose to the initial posture.
.
 
bool IsSensorConnected (EnumParts part)
 Is the mocopi sensor connected to a specific body part?
.
 
void SetTargetBody (EnumTargetBodyType targetBodyType)
 Set the specified tracking type and update the mocopi sensor linking.
.
 
EnumTargetBodyType GetTargetBody ()
 Get the current tracking type.
.
 
bool GetBatteryLevel (string sensorName)
 Get the remaining battery level of the mocopi sensor.
.
 
bool GetOsSettingStatus (EnumOsSettingType type)
 Get the OS settings (Bluetooth/location information).
.
 
bool GetAppPermissionStatus (EnumPermissionType type)
 Get app permission settings (Bluetooth/location information/storage usage).
.
 
bool StartMotionRecording ()
 Start motion recording.
.
 
bool StopMotionRecording ()
 Stop motion recording.
.
 
bool SaveMotionFiles (string fileName="")
 Save motion data in BVH file.
.
 
bool RenameMotionFile (string oldFileName, string newFilename)
 Change the name of BVH file.
.
 
bool DeleteMotionFile (string fileName)
 Delete BVH file.
.
 
bool GetMotionFileInformations ()
 Get information of BVH file list (file name, size).
.
 
bool SelectMotionExternalStorageUri ()
 Select the directory to save the BVH file.
.
 
string GetMotionExternalStorageUri ()
 Get the directory used to save the BVH file.
.
 
void CheckMotionFormat (string fileName)
 Check the format of motion file.
.
 
void StartMotionStreamingRead (string fileName, int motionFormat)
 Initiate BVH read status.
.
 
void ReadMotionFrame (int frame)
 Read one frame of the BVH file.
.
 
void StopMotionStreamingRead ()
 Stop BVH from being readable.
.
 
void GetVerifiedFirmwareVersionList ()
 Get a list of verified firmware versions of mocopi sensors.
.
 
bool IsLatestFirmwareVersion (EnumParts[] parts)
 Verify whether the firmware version of the mocopi sensor for the specified connecting body part is up to date.
.
 
EnumFirmwareStatus string firmwareVersion CheckFirmwareVersion (string sensorName)
 
bool IsSensorConnectedStably (string sensorName)
 Get the calibration result.
.
 
EnumFirmwareVersionResultForStableCalibration IsSupportedVersionOfStableCalibration (string sensorName)
 ファームウェアが高性能キャリブレーションに対応しているバージョンかチェック
 
string GetSplitCode ()
 Get split code for Motion file list.
 
bool GetSensor (string sensorName, out MocopiSensor foundSensor)
 Retrieve sensor information from sensor name.
.
 
bool GetSensor (EnumParts part, out MocopiSensor foundSensor)
 Retrieve sensor information by body part name.
.
 
bool GetSensor (EnumSensorStatus status, string sensorName, out MocopiSensor foundSensor)
 Retrieve sensor information that matches the sensor name and status.
.
 
List< MocopiSensor > FindSensorList (EnumSensorStatus status)
 Retrieve a list of sensors that match the specified status.
.
 
void RemoveAllCallback ()
 Delete all callbacks.
.
 
void AddCallbackOnSensorFound (UnityAction< string > callback)
 Add a callback for OnSensorFound.
.
 
void RemoveCallbackOnSensorFound (UnityAction< string > callback)
 Delete the callback for OnSensorFound.
.
 
void AddCallbackOnSensorConnected (UnityAction< EnumParts, string, EnumCallbackStatus, EnumSensorConnectionErrorStatus?> callback)
 Add a callback for OnSensorConnected.
.
 
void RemoveCallbackOnSensorConnected (UnityAction< EnumParts, string, EnumCallbackStatus, EnumSensorConnectionErrorStatus?> callback)
 Delete the callback for OnSensorConnected.
.
 
void AddCallbackOnSensorDisconnected (UnityAction< string > callback)
 Add a callback for OnSensorDisconnected.
.
 
void RemoveCallbackOnSensorDisconnected (UnityAction< string > callback)
 Delete the callback for OnSensorDisconnected.
.
 
void AddCallbackOnAllSensorReady (UnityAction< EnumCallbackStatus > callback)
 Add a callback for OnAllSensorReady.
.
 
void RemoveCallbackOnAllSensorReady (UnityAction< EnumCallbackStatus > callback)
 Delete callback for OnAllSensorReady.
.
 
void AddCallbackOnCalibrationUpdated (UnityAction< EnumCalibrationCallbackStatus, EnumCalibrationStatus?, string[]> callback)
 Add a callback for OnCalibrationUpdated.
.
 
void RemoveCallbackOnCalibrationUpdated (UnityAction< EnumCalibrationCallbackStatus, EnumCalibrationStatus?, string[]> callback)
 Delete the callback for OnCalibrationUpdated.
.
 
void AddCallbackOnRecordingMotionUpdated (UnityAction< string, EnumRecordingMotionAllStatus > callback)
 Add a callback for OnRecordingMotionUpdated.
.
 
void RemoveCallbackOnRecordingMotionUpdated (UnityAction< string, EnumRecordingMotionAllStatus > callback)
 Delete the callback for OnRecordingMotionUpdated.
.
 
void AddCallbackOnMotionConvertProgressUpdated (UnityAction< int > callback)
 Add a callback for OnBvhConvertProgressUpdated.
.
 
void RemoveCallbackOnMotionConvertProgressUpdated (UnityAction< int > callback)
 Delete the callback for OnBvhConvertProgressUpdated.
.
 
void AddCallbackOnGetRecordedMotionFileInformations (UnityAction<(string fileName, long fileSize)[]> callback)
 Add a callback for OnGetRecordedBvhFileInformations.
.
 
void RemoveCallbackOnGetRecordedMotionFileInformations (UnityAction<(string fileName, long fileSize)[]> callback)
 Add a callback for OnGetRecordedBvhFileInformations.
.
 
void AddCallbackOnRenameMotionFileCompleted (UnityAction< bool > callback)
 Add a callback for OnRenameBvhFileCompleted.
.
 
void RemoveCallbackOnRenameMotionFileCompleted (UnityAction< bool > callback)
 Delete the callback for OnRenameBvhFileCompleted.
.
 
void AddCallbackOnDeleteMotionFileCompleted (UnityAction< bool > callback)
 Add a callback for OnDeleteBvhFileCompleted.
.
 
void RemoveCallbackOnDeleteMotionFileCompleted (UnityAction< bool > callback)
 Delete the callback for OnDeleteBvhFileCompleted.
.
 
void AddCallbackOnRecordingMotionExternalStorageUriSelected (UnityAction< bool > callback)
 Add a callback for OnRecordingBvhExternalStorageUriSelected.
.
 
void RemoveCallbackOnRecordingMotionExternalStorageUriSelected (UnityAction< bool > callback)
 Delete the callback for OnRecordingBvhExternalStorageUriSelected.
.
 
void AddCallbackOnFixedHipSwitched (UnityAction< bool > callback)
 Add a callback for OnFixedHipSwitched.
.
 
void RemoveCallbackOnFixedHipSwitched (UnityAction< bool > callback)
 Delete the callback for OnFixedHipSwitched.
.
 
void AddCallbackOnSkeletonDefinitionUpdated (UnityAction< SkeletonDefinitionData > callback)
 Add a callback for OnSkeletonDefinitionUpdated.
.
 
void RemoveCallbackOnSkeletonDefinitionUpdated (UnityAction< SkeletonDefinitionData > callback)
 Delete the callback for OnSkeletonDefinitionUpdated.
.
 
void AddCallbackOnSkeletonUpdated (UnityAction< SkeletonData > callback)
 Add a callback for OnSkeletonUpdated.
.
 
void RemoveCallbackOnSkeletonUpdated (UnityAction< SkeletonData > callback)
 Delete the callback for OnSkeletonUpdated.
.
 
void AddCallbackOnSensorBatteryLevelUpdated (UnityAction< string, int, EnumCallbackStatus > callback)
 Add a callback for OnSensorBatteryLevelUpdate.
.
 
void RemoveCallbackOnSensorBatteryLevelUpdated (UnityAction< string, int, EnumCallbackStatus > callback)
 Delete the callback for OnSensorBatteryLevelUpdate.
.
 
void AddCallbackOnCheckMotionFormatCompleted (UnityAction< EnumMotionFormat > callback)
 Register callback, OnCheckMotionFormatCompleted .
.
 
void RemoveCallbackOnCheckMotionFormatCompleted (UnityAction< EnumMotionFormat > callback)
 Delete callback, OnCheckMotionFormatCompleted .
.
 
bool SwitchButtonNotify (string sensorName, bool isActiveSingle, bool isActiveDouble, bool isActiveTriple)
 Configure notifications for when the button on the mocopi sensor is pressed.
.
 

Public Attributes

MocopiEventHandlerSettings EventHandleSettings
 User configuration callbacks
.
 
EnumFirmwareStatus status
 Verify the firmware version of the specified mocopi sensor.
.
 

Properties

static MocopiManager Instance [get]
 Own singleton instance.
 
MocopiAvatar MocopiAvatar [get, set]
 Avatar used in mocopi.
 
LogUtility Logger [get]
 Log output class.
 
static EnumRunMode RunMode [get, set]
 SDK operation mode.
 
EnumTargetBodyType TargetBodyType [get]
 Tracking type.
 
bool IsCalibrationCompleted [get]
 Whether the calibration is successful.
 
bool IsDiscoverying = false [get]
 Whether the sensor is connected.
 
bool IsTracking = false [get]
 Whether the tracking is ON.
 
bool IsFixedHip = false [get]
 Whether the hip is fixed.
 
bool IsRecordingMotion = false [get]
 Whether the motion recording is ON.
 
List< string > OlderSensorArray [get]
 List of mocopi sensors with old firmware versions.
 
Version LatestFirmwareVersion = null [get]
 Latest firmware version of sensor.
 
SynchronizationContext SynchronizationContext [get, set]
 Context for main thread execution.
 
bool IsAutoMappingBodyPart = false [get, set]
 Whether to convert advanced functions to connecting body part.
 

Detailed Description

Class that summarizes the processing related to mocopi sensor
.

Member Function Documentation

◆ AddCallbackOnAllSensorReady()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnAllSensorReady ( UnityAction< EnumCallbackStatus > callback)

Add a callback for OnAllSensorReady.
.

Callback OnAllSensorReady sends a notification when the mocopi sensor is connected. Callback argument: Is the connection complete for all body parts of the currently set tracking type (bool)?

Parameters
callbackCallback

◆ AddCallbackOnCalibrationUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnCalibrationUpdated ( UnityAction< EnumCalibrationCallbackStatus, EnumCalibrationStatus?, string[]> callback)

Add a callback for OnCalibrationUpdated.
.

Callback OnCalibrationUpdated sends a notification when calibration status is updated. Calibration has three phases; stationary/step forward/stationary, and a callback sends a notification when they change respectively. If the calibration result is Warning, recalibration is recommended as it may affect the tracking accuracy. Callback argument: Calibration status (EnumCalibrationCallbackStatus) Calibration result (EnumCalibrationStatus) Calibrated mocopi sensor list (string[])

Parameters
callbackCallback

◆ AddCallbackOnCheckMotionFormatCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnCheckMotionFormatCompleted ( UnityAction< EnumMotionFormat > callback)

Register callback, OnCheckMotionFormatCompleted .
.

When the verification of the motion file format is completed, the confirmation result will be notified via the callback OnCheckMotionFormatCompleted.
Callback parameters: Confirmation result of motion file format(Irregular format file, File recorded by mocopi, File not recorded by mocopi)

Parameters
callbackcallback

◆ AddCallbackOnDeleteMotionFileCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnDeleteMotionFileCompleted ( UnityAction< bool > callback)

Add a callback for OnDeleteBvhFileCompleted.
.

Callback OnDeleteBvhFileCompleted sends a notification of the result of BVH file deletion. Callback argument: Is the deletion successful? (bool)

Parameters
callbackCallback

◆ AddCallbackOnFixedHipSwitched()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnFixedHipSwitched ( UnityAction< bool > callback)

Add a callback for OnFixedHipSwitched.
.

Callback OnFixedHipSwitched sends a notification when hip fixing setting of the avatar is changed. Callback argument: True when hip fixing is ON. False when hip fixing is OFF.

Parameters
callbackCallback

◆ AddCallbackOnGetRecordedMotionFileInformations()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnGetRecordedMotionFileInformations ( UnityAction<(string fileName, long fileSize)[]> callback)

Add a callback for OnGetRecordedBvhFileInformations.
.

Callback OnGetRecordedBvhFileInformations sends a notification of the result on acquisition of BVH file list. Callback argument: File-by-file information (array) One element contains the file name (string) and file size (long) information.

Parameters
callbackCallback

◆ AddCallbackOnMotionConvertProgressUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnMotionConvertProgressUpdated ( UnityAction< int > callback)

Add a callback for OnBvhConvertProgressUpdated.
.

Callback OnBvhConvertProgressUpdated sends a notification of the progress of saving the results of motion recording. Saving itself fails if the process is interrupted for any reason before progress reaches a 100%. Callback argument: Motion save progress rate (int)

Parameters
callbackCallback

◆ AddCallbackOnRecordingMotionExternalStorageUriSelected()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnRecordingMotionExternalStorageUriSelected ( UnityAction< bool > callback)

Add a callback for OnRecordingBvhExternalStorageUriSelected.
.

Callback OnRecordingBvhExternalStorageUriSelected sends a notification of the result of destination directory selection when saving the motion recording. Callback argument: Is directory selection successful? (bool)

Parameters
callbackCallback

◆ AddCallbackOnRecordingMotionUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnRecordingMotionUpdated ( UnityAction< string, EnumRecordingMotionAllStatus > callback)

Add a callback for OnRecordingMotionUpdated.
.

Callback OnRecordingMotionUpdated sends a notification when motion recording status is updated. Respective callbacks notify when motion recording starts/storage is completed/error occurs. Callback argument: Motion recording status message (string) Motion recording status (EnumRecordingMotionAllStatus)

Parameters
callbackCallback

◆ AddCallbackOnRenameMotionFileCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnRenameMotionFileCompleted ( UnityAction< bool > callback)

Add a callback for OnRenameBvhFileCompleted.
.

Callback OnRenameBvhFileCompleted sends a notification of the result of BVH file renaming. Callback argument: Is the file renamed successfully? (bool)

Parameters
callbackCallback

◆ AddCallbackOnSensorBatteryLevelUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSensorBatteryLevelUpdated ( UnityAction< string, int, EnumCallbackStatus > callback)

Add a callback for OnSensorBatteryLevelUpdate.
.

A callback is received from the mocopi sensor firmware on successful battery level acquisition and a notification is sent to the callback OnSensorBatteryLevelUpdated. Callback argument: Sensor name (string) mocopi sensor remaining battery level (int) Callback result (EnumCallbackStatus)

Parameters
callbackCallback

◆ AddCallbackOnSensorConnected()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSensorConnected ( UnityAction< EnumParts, string, EnumCallbackStatus, EnumSensorConnectionErrorStatus?> callback)

Add a callback for OnSensorConnected.
.

Callback OnSensorConnected sends a notification of the connection result of mocopi sensor. Callback argument: Connecting body part (EnumParts) mocopi sensor name to be connected (string) Callback result (EnumCallbackStatus) Error status (EnumSensorConnectionErrorStatus) *Enter null when connection is successful

Parameters
callbackCallback

◆ AddCallbackOnSensorDisconnected()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSensorDisconnected ( UnityAction< string > callback)

Add a callback for OnSensorDisconnected.
.

Callback OnSensorDisconnected sends a notification when the mocopi sensor is disconnected. Callback argument: Disconnected mocopi sensor name (string)

Parameters
callbackCallback

◆ AddCallbackOnSensorFound()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSensorFound ( UnityAction< string > callback)

Add a callback for OnSensorFound.
.

Callback OnSensorFound sends a notification when a mocopi sensor is found after executing StartDiscovery. Callback argument: mocopi sensor name that is found (string)

Parameters
callbackCallback

◆ AddCallbackOnSkeletonDefinitionUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSkeletonDefinitionUpdated ( UnityAction< SkeletonDefinitionData > callback)

Add a callback for OnSkeletonDefinitionUpdated.
.

Callback OnSkeletonDefinitionUpdated sends a notification when tracking is initiated. Callback argument: Skeleton definition data structure (SkeletonDefinitionData)

Parameters
callbackCallback

◆ AddCallbackOnSkeletonUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.AddCallbackOnSkeletonUpdated ( UnityAction< SkeletonData > callback)

Add a callback for OnSkeletonUpdated.
.

Callback OnSkeletonUpdated sends a notification (50FPS) of the skeleton information while tracking. Callback argument: Skeleton frame data structure (SkeletonData)

Parameters
callbackCallback

◆ CancelCalibration()

bool Mocopi.Mobile.Sdk.MocopiManager.CancelCalibration ( )

Cancel the calibration.
.

Return false if calibration is not in progress.

Returns
True if canceled. False if not linked.

◆ CheckFirmwareVersion()

EnumFirmwareStatus string firmwareVersion Mocopi.Mobile.Sdk.MocopiManager.CheckFirmwareVersion ( string sensorName)

◆ CheckMotionFormat()

void Mocopi.Mobile.Sdk.MocopiManager.CheckMotionFormat ( string fileName)

Check the format of motion file.
.

Check the format of motion file to be loaded.
OnCheckMotionFormatCompleted callback is invoked when completed.

Returns
Motion file name

◆ CreateBond()

void Mocopi.Mobile.Sdk.MocopiManager.CreateBond ( string sensorName,
EnumParts part )

Pair the mocopi sensor.
.

Callback OnSensorConnect sends a notification when the connection is completed.

Parameters
sensorNamemocopi sensor name
partConnecting body part

◆ DeleteMotionFile()

bool Mocopi.Mobile.Sdk.MocopiManager.DeleteMotionFile ( string fileName)

Delete BVH file.
.

error if the file doesn't exist.

Parameters
fileNameBVH file name to be deleted.
Returns
Return true if the file is successfully deleted. Return false if it fails.

◆ DisconnectSensor()

void Mocopi.Mobile.Sdk.MocopiManager.DisconnectSensor ( EnumParts part)

Disconnect the mocopi sensor of a specific body part.
.

Callback OnSensorDisconnected sends a notification upon disconnection. The disconnected mocopi sensor is excluded if it is included in the list of reserved connection mocopi sensors.

Parameters
partBody part for which mocopi sensor is disconnected

◆ DisconnectSensors()

void Mocopi.Mobile.Sdk.MocopiManager.DisconnectSensors ( )

Disconnect all connected mocopi sensors.
.

Callback OnSensorDisconnected sends a notification upon disconnection. If connection of the mocopi sensor to be disconnected is in connection standby state, cancel the connection standby state. See StartSensor for connection standby state.

◆ FindSensorList()

List< MocopiSensor > Mocopi.Mobile.Sdk.MocopiManager.FindSensorList ( EnumSensorStatus status)

Retrieve a list of sensors that match the specified status.
.

Parameters
statusSensor status
Returns
Sensor list

◆ GetAppPermissionStatus()

bool Mocopi.Mobile.Sdk.MocopiManager.GetAppPermissionStatus ( EnumPermissionType type)

Get app permission settings (Bluetooth/location information/storage usage).
.

Return Disable for iOS on every occasion.

Parameters
typeApp permission settings (Bluetooth/location information/storage usage)
Returns
True if specified app permission is granted or disabled (iOS only). False if no permission is granted.

◆ GetBatteryLevel()

bool Mocopi.Mobile.Sdk.MocopiManager.GetBatteryLevel ( string sensorName)

Get the remaining battery level of the mocopi sensor.
.

Callback OnSensorBatteryLevelUpdate sends a notification about the result of battery level acquisition.

Parameters
sensorNamemocopi sensor name
Returns
True if remaining battery level acquisition can be initiated. False if not possible.

◆ GetHeight()

MocopiHeightStruct Mocopi.Mobile.Sdk.MocopiManager.GetHeight ( )

Get height information used for calibration.
.

Obtained information is as follows. - Height (meter/feet/inch) - Configured unit (meter/feet/inch)

Returns
Height setting structure

◆ GetMotionExternalStorageUri()

string Mocopi.Mobile.Sdk.MocopiManager.GetMotionExternalStorageUri ( )

Get the directory used to save the BVH file.
.

Get destination directory for the selected BVH file with SelectBvhExternalStorageUri iOS does not require to execute this API. Saving to Documents is now fixed. An empty string is obtained if the destination directory is not set.

Returns
Destination directory path (URI).

◆ GetMotionFileInformations()

bool Mocopi.Mobile.Sdk.MocopiManager.GetMotionFileInformations ( )

Get information of BVH file list (file name, size).
.

Get the result with callback OnGetRecordedBvhFileInformations.

Returns
True if BVH file list is successfully acquired. False in case of failure.

◆ GetOsSettingStatus()

bool Mocopi.Mobile.Sdk.MocopiManager.GetOsSettingStatus ( EnumOsSettingType type)

Get the OS settings (Bluetooth/location information).
.

Get whether OS setting is ON or OFF. Return Disable for iOS on every occasion.

Parameters
typeOS settings (Bluetooth/location information)
Returns
True if specified OS setting is ON or disabled (iOS only). False if setting is OFF.

◆ GetPart()

string Mocopi.Mobile.Sdk.MocopiManager.GetPart ( EnumParts part)

Get the mocopi sensor name based on the configured connecting body part.
.

Return null if non-existent body part is specified.

Parameters
partConnecting body part

◆ GetPartFromSensorName()

bool Mocopi.Mobile.Sdk.MocopiManager.GetPartFromSensorName ( string sensorName,
out EnumParts part )

Get the connecting body part linked to the mocopi sensor name.
.

Parameters
sensorNamemocopi sensor name
partThe connecting body part linked to the mocopi sensor name is stored.
Returns
True if specified mocopi sensor is linked to one of the parts. False if not linked.

◆ GetPartsListWithTargetBody()

List< EnumParts > Mocopi.Mobile.Sdk.MocopiManager.GetPartsListWithTargetBody ( EnumTargetBodyType bodyType)

Get a list of connecting body parts used for the specified tracking type.
.

Parameters
bodyTypeConnection mode
Returns
List of connecting body parts

◆ GetSensor() [1/3]

bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor ( EnumParts part,
out MocopiSensor foundSensor )

Retrieve sensor information by body part name.
.

Parameters
partMounting position
foundSensor[out]If a sensor linked to the specified body part is found, store the sensor object.
If it does not exist, store null.
Returns
Return true if the sensor information is retrieved. If not, return false.

◆ GetSensor() [2/3]

bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor ( EnumSensorStatus status,
string sensorName,
out MocopiSensor foundSensor )

Retrieve sensor information that matches the sensor name and status.
.

Parameters
statusSensor status
sensorNameSensor name
foundSensor[out]If a sensor matching the sensor status and sensor name is found, store the sensor object.
If it does not exist, store null.
Returns
Return true if the sensor information is retrieved. If it is not, return false.

◆ GetSensor() [3/3]

bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor ( string sensorName,
out MocopiSensor foundSensor )

Retrieve sensor information from sensor name.
.

Parameters
sensorNameSensor Name
foundSensor[out]If a sensor with the specified name is found, store the sensor object.
If it does not exist, store null.
Returns
Return true if sensor information is successfully retrieved. if not, return false.

◆ GetSplitCode()

string Mocopi.Mobile.Sdk.MocopiManager.GetSplitCode ( )

Get split code for Motion file list.

Returns
split code

◆ GetTargetBody()

EnumTargetBodyType Mocopi.Mobile.Sdk.MocopiManager.GetTargetBody ( )

Get the current tracking type.
.

Get the information about which body part the mocopi sensor should be attached to.
@

Returns
Tracking type (whole body (default)/upper body/lower body)

◆ GetVerifiedFirmwareVersionList()

void Mocopi.Mobile.Sdk.MocopiManager.GetVerifiedFirmwareVersionList ( )

Get a list of verified firmware versions of mocopi sensors.
.

Callback OnGetVerifiedFirmwareVersion sends a notification of the result.

◆ IsAllPartsSetted() [1/2]

bool Mocopi.Mobile.Sdk.MocopiManager.IsAllPartsSetted ( )

Are all connecting body parts for the current tracking type linked to the mocopi sensor?
.

Verify whether a mocopi sensor is linked to the required body part in the current tracking type.

Returns
True if the mocopi sensor is linked to all connecting body parts. False if not linked.

◆ IsAllPartsSetted() [2/2]

bool Mocopi.Mobile.Sdk.MocopiManager.IsAllPartsSetted ( EnumTargetBodyType bodyType)

Are all connecting parts and sensors for the specified tracking type linked to the sensor?
.

Verify whether a mocopi sensor is linked to the required body part in the specified tracking type.

Parameters
bodyTypeTracking type
Returns
True if the mocopi sensor is linked to all connecting body parts. False if not linked.

◆ IsAllSensorsReady()

bool Mocopi.Mobile.Sdk.MocopiManager.IsAllSensorsReady ( )

Are the mocopi sensors connected to all connecting body parts being used?
.

Verify whether all the mocopi sensors of the parts corresponding to the current tracking type are connected.
@

Returns
True if the mocopi sensors of all the connecting body parts being used are connected. False if not linked.

◆ IsLatestFirmwareVersion()

bool Mocopi.Mobile.Sdk.MocopiManager.IsLatestFirmwareVersion ( EnumParts[] parts)

Verify whether the firmware version of the mocopi sensor for the specified connecting body part is up to date.
.

This must be executed after executing CheckFirmwareVersion. Return true if this is executed before executing CheckFirmwareVersion.

Parameters
partsList of paired body parts
Returns
True if all the specified body parts have latest versions of mocopi sensor. False if any one of the mocopi sensors is of an older version.

◆ IsSensorConnected()

bool Mocopi.Mobile.Sdk.MocopiManager.IsSensorConnected ( EnumParts part)

Is the mocopi sensor connected to a specific body part?
.

Return false if non-existent body part is specified.

Parameters
partConnecting body part
Returns
True if connected. False if not connected.

◆ IsSensorConnectedStably()

bool Mocopi.Mobile.Sdk.MocopiManager.IsSensorConnectedStably ( string sensorName)

Get the calibration result.
.

Once the sensor connection is complete, this API can be used after the result of MocopiLibrary_SetCallback_OnSensorConnectedStably is returned.

Returns
True when API command is successfully executed, or when timed out; false when failed.

◆ IsSupportedVersionOfStableCalibration()

EnumFirmwareVersionResultForStableCalibration Mocopi.Mobile.Sdk.MocopiManager.IsSupportedVersionOfStableCalibration ( string sensorName)

ファームウェアが高性能キャリブレーションに対応しているバージョンかチェック

Parameters
sensorNameセンサー名
Returns
対応しているか

◆ ReadMotionFrame()

void Mocopi.Mobile.Sdk.MocopiManager.ReadMotionFrame ( int frame)

Read one frame of the BVH file.
.

Read the specified frame. The callback OnRecordingStreamingReadFrame is triggered if read action is successful, and OnRecordingStreamingReadFrameFailed in case it fails.
@

Parameters
frameRead frame

◆ RemoveAllCallback()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveAllCallback ( )

Delete all callbacks.
.

◆ RemoveCallbackOnAllSensorReady()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnAllSensorReady ( UnityAction< EnumCallbackStatus > callback)

Delete callback for OnAllSensorReady.
.

Parameters
callbackCallback

◆ RemoveCallbackOnCalibrationUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnCalibrationUpdated ( UnityAction< EnumCalibrationCallbackStatus, EnumCalibrationStatus?, string[]> callback)

Delete the callback for OnCalibrationUpdated.
.

Parameters
callbackCallback

◆ RemoveCallbackOnCheckMotionFormatCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnCheckMotionFormatCompleted ( UnityAction< EnumMotionFormat > callback)

Delete callback, OnCheckMotionFormatCompleted .
.

Parameters
callbackcallback

◆ RemoveCallbackOnDeleteMotionFileCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnDeleteMotionFileCompleted ( UnityAction< bool > callback)

Delete the callback for OnDeleteBvhFileCompleted.
.

Parameters
callbackCallback

◆ RemoveCallbackOnFixedHipSwitched()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnFixedHipSwitched ( UnityAction< bool > callback)

Delete the callback for OnFixedHipSwitched.
.

Parameters
callbackCallback

◆ RemoveCallbackOnGetRecordedMotionFileInformations()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnGetRecordedMotionFileInformations ( UnityAction<(string fileName, long fileSize)[]> callback)

Add a callback for OnGetRecordedBvhFileInformations.
.

Parameters
callbackCallback

◆ RemoveCallbackOnMotionConvertProgressUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnMotionConvertProgressUpdated ( UnityAction< int > callback)

Delete the callback for OnBvhConvertProgressUpdated.
.

Parameters
callbackCallback

◆ RemoveCallbackOnRecordingMotionExternalStorageUriSelected()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRecordingMotionExternalStorageUriSelected ( UnityAction< bool > callback)

Delete the callback for OnRecordingBvhExternalStorageUriSelected.
.

Parameters
callbackCallback

◆ RemoveCallbackOnRecordingMotionUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRecordingMotionUpdated ( UnityAction< string, EnumRecordingMotionAllStatus > callback)

Delete the callback for OnRecordingMotionUpdated.
.

Parameters
callbackCallback

◆ RemoveCallbackOnRenameMotionFileCompleted()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRenameMotionFileCompleted ( UnityAction< bool > callback)

Delete the callback for OnRenameBvhFileCompleted.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSensorBatteryLevelUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorBatteryLevelUpdated ( UnityAction< string, int, EnumCallbackStatus > callback)

Delete the callback for OnSensorBatteryLevelUpdate.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSensorConnected()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorConnected ( UnityAction< EnumParts, string, EnumCallbackStatus, EnumSensorConnectionErrorStatus?> callback)

Delete the callback for OnSensorConnected.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSensorDisconnected()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorDisconnected ( UnityAction< string > callback)

Delete the callback for OnSensorDisconnected.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSensorFound()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorFound ( UnityAction< string > callback)

Delete the callback for OnSensorFound.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSkeletonDefinitionUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSkeletonDefinitionUpdated ( UnityAction< SkeletonDefinitionData > callback)

Delete the callback for OnSkeletonDefinitionUpdated.
.

Parameters
callbackCallback

◆ RemoveCallbackOnSkeletonUpdated()

void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSkeletonUpdated ( UnityAction< SkeletonData > callback)

Delete the callback for OnSkeletonUpdated.
.

Parameters
callbackCallback

◆ RemovePart()

bool Mocopi.Mobile.Sdk.MocopiManager.RemovePart ( EnumParts part)

Delete the linking of the connecting body part to the sensor name.
.

Return false if non-existent body part is specified.

Parameters
partConnecting body part
Returns
True if linking information is deleted successfully. False in case of failure.

◆ RenameMotionFile()

bool Mocopi.Mobile.Sdk.MocopiManager.RenameMotionFile ( string oldFileName,
string newFilename )

Change the name of BVH file.
.

error if file doesn't exist

Parameters
oldFileNameOld BVH file name
newFileNameNew BVH file name
Returns
Return true if rename succeeded. Return false if failed.

◆ ResetPose()

bool Mocopi.Mobile.Sdk.MocopiManager.ResetPose ( )

Reset the avatar pose to the initial posture.
.

Not available except during tracking. The character must remain stationary while executing ResetPose.

Returns
True if the avatar pose can be reset. False if not possible.

◆ SaveMotionFiles()

bool Mocopi.Mobile.Sdk.MocopiManager.SaveMotionFiles ( string fileName = "")

Save motion data in BVH file.
.

Motion data will be retained in SDK upon executing StartMotionRecording. This data will be output in BVH file when this API is executed.

Parameters
fileNameSaved file name (extension not required)
Returns
True if the data is successfully saved in BVH file. False in case of failure.

◆ SelectMotionExternalStorageUri()

bool Mocopi.Mobile.Sdk.MocopiManager.SelectMotionExternalStorageUri ( )

Select the directory to save the BVH file.
.

Works with Android only. A directory selection screen is displayed after executing this API. iOS does not require to execute this API. Saving to Documents is now fixed.

Returns
True if the folder selection screen is displayed successfully. False in case of failure.

◆ SetFixedHip()

bool Mocopi.Mobile.Sdk.MocopiManager.SetFixedHip ( bool fixedHip)

Set whether to fix the hip of the avatar
.

Callback OnFixedHipSwitched sends a notification when the settings are updated. If hip fixation settings have no change, return false if the hip fixation setting is already done.

Parameters
fixedHipTrue to turn ON hip fixing. False to turn OFF hip fixing.
Returns
True if setting is possible. False if not possible.

◆ SetHeight()

bool Mocopi.Mobile.Sdk.MocopiManager.SetHeight ( MocopiHeightStruct heightStruct)

Set height used for calibration.
.

Use the respective units such as meter or feet-inch to enter values accordingly. Verify that the values range within the specified values.

Parameters
heightStructHeight setting structure
Returns
True if setting can be done. False if numeric value is non-default.

◆ SetPart()

bool Mocopi.Mobile.Sdk.MocopiManager.SetPart ( EnumParts part,
string sensorName )

Link the specified connecting body part to the specified mocopi sensor.
.

Use specified connecting body parts for respective linking. Return false if no part is found.

Parameters
partConnecting body parts to be linked
sensorNamemocopi sensor name to be linked
Returns
True if linked successfully. False in case of failure.

◆ SetRootPosition()

bool Mocopi.Mobile.Sdk.MocopiManager.SetRootPosition ( Vector3 position)

Reset the avatar position.
.

Not available except during tracking.

Parameters
positionAvatar position
Returns
True if position can be reset. False if not possible.

◆ SetTargetBody()

void Mocopi.Mobile.Sdk.MocopiManager.SetTargetBody ( EnumTargetBodyType targetBodyType)

Set the specified tracking type and update the mocopi sensor linking.
.

When setting the tracking type, update the linking of mounting part according to the body part if paired mocopi sensor is present. Ex: Link RightWrist mocopi sensor to the RightUpperLeg when setting from normal 6-point mode to lower body 6-point mode.

Parameters
targetBodyTypeTracking type to be configured

◆ StartCalibration()

async Task< bool > Mocopi.Mobile.Sdk.MocopiManager.StartCalibration ( )

Initiate calibration.
.

Callback OnCalibrationUpdated respectively notify of the calibration progress. Even if initiation of calibration fails, continue the initiation process for the set number of attempts, and if all the set number of attempts fail, judge the calibration initiation as a failure.

Returns
True if calibration can be initiated. False if not possible.

◆ StartDiscovery()

void Mocopi.Mobile.Sdk.MocopiManager.StartDiscovery ( bool excludeSettedPart = false)

Start searching for mocopi sensor via Bluetooth.
.

Return true if the mocopi sensor search is in progress, else return false. When a mocopi sensor is found, callback MocopiEventHandlerSettings.OnSensorFound “OnSensorFound” sends a notification. Notification status: Discovery Set usage timing: Until before sensor connection.

Parameters
excludeSettedPartTrue will exclude previously paired mocopi sensors from the search. False will continue searching irrespective of pairing status.

◆ StartMotionRecording()

bool Mocopi.Mobile.Sdk.MocopiManager.StartMotionRecording ( )

Start motion recording.
.

Not available except during tracking.

Returns
True if motion recording is started. False if recording is already in progress.

◆ StartMotionStreamingRead()

void Mocopi.Mobile.Sdk.MocopiManager.StartMotionStreamingRead ( string fileName,
int motionFormat )

Initiate BVH read status.
.

Parameters
fileNameFile name
motionFormatBVH file format

◆ StartSensor()

bool Mocopi.Mobile.Sdk.MocopiManager.StartSensor ( )

Connect all paired mocopi sensors.
.

The connection process is initiated for all body parts of the currently set tracking type. Callback OnSensorConnect sends a notification for each mocopi sensor when the connection is completed, and callback OnAllSensorReady sends a notification when all the connections are completed.

◆ StartSingleSensor()

void Mocopi.Mobile.Sdk.MocopiManager.StartSingleSensor ( EnumParts part)

Connect the connecting body part to the mocopi sensor.
.

SetPart must be set in advance to complete the linking of the connecting body part and the sensor name.

Parameters
partConnecting body part

◆ StartTracking()

bool Mocopi.Mobile.Sdk.MocopiManager.StartTracking ( )

Initiate tracking.
.

If tracking is already initiated, treat the tracking initiation as a failure if calibration is incomplete. OnCalibrationStateFinished determines outcome of the calibration.

Returns
True if tracking initiation is successful, false if it fails.

◆ StopDiscovery()

void Mocopi.Mobile.Sdk.MocopiManager.StopDiscovery ( )

Stop the mocopi sensor search.
.

No action if StartDiscovery is executed and the mocopi sensor search is not running.

◆ StopMotionRecording()

bool Mocopi.Mobile.Sdk.MocopiManager.StopMotionRecording ( )

Stop motion recording.
.

Not available except during tracking.

Returns
True if motion recording is stopped. False if motion recording is not in progress.

◆ StopMotionStreamingRead()

void Mocopi.Mobile.Sdk.MocopiManager.StopMotionStreamingRead ( )

Stop BVH from being readable.
.

◆ StopSensor()

void Mocopi.Mobile.Sdk.MocopiManager.StopSensor ( )

Stop tracking and disconnect all sensors.
.

Callback OnSensorDisconnected sends a notification upon disconnection.

◆ StopTracking()

void Mocopi.Mobile.Sdk.MocopiManager.StopTracking ( )

Stop tracking.
.

Execute stop process if tracking is already in progress. No action if tracking is not initiated. Simultaneously end motion recording process.

◆ SwitchButtonNotify()

bool Mocopi.Mobile.Sdk.MocopiManager.SwitchButtonNotify ( string sensorName,
bool isActiveSingle,
bool isActiveDouble,
bool isActiveTriple )

Configure notifications for when the button on the mocopi sensor is pressed.
.

Parameters
sensorNamemocopi sensor name
isActiveSingleif single press
isActiveDoubleif double presses
isActiveTripleif triple presses
Returns
true, if configured successfully. false,if not

Register mocopi sensor and number of presses to invoke callback OnSensorButtonPressed when the button on the mocopi sensor is pressed.

Member Data Documentation

◆ EventHandleSettings

MocopiEventHandlerSettings Mocopi.Mobile.Sdk.MocopiManager.EventHandleSettings

User configuration callbacks
.

◆ status

EnumFirmwareStatus Mocopi.Mobile.Sdk.MocopiManager.status

Verify the firmware version of the specified mocopi sensor.
.

Return the firmware version of the specified mocopi sensor and details of whether that version is newer, older, or equivalent to the latest version.

Parameters
sensorNamemocopi sensor name
Returns
Labeled as "Tuple", but actually it is "(EnumFirmwareStatus status, string firmwareVersion)". The result of the version check (status) and the firmware version of the acquired mocopi sensor (firmwareVersion).

Property Documentation

◆ Instance

MocopiManager Mocopi.Mobile.Sdk.MocopiManager.Instance
staticget

Own singleton instance.

◆ IsAutoMappingBodyPart

bool Mocopi.Mobile.Sdk.MocopiManager.IsAutoMappingBodyPart = false
getset

Whether to convert advanced functions to connecting body part.

◆ IsCalibrationCompleted

bool Mocopi.Mobile.Sdk.MocopiManager.IsCalibrationCompleted
get

Whether the calibration is successful.

◆ IsDiscoverying

bool Mocopi.Mobile.Sdk.MocopiManager.IsDiscoverying = false
get

Whether the sensor is connected.

◆ IsFixedHip

bool Mocopi.Mobile.Sdk.MocopiManager.IsFixedHip = false
get

Whether the hip is fixed.

◆ IsRecordingMotion

bool Mocopi.Mobile.Sdk.MocopiManager.IsRecordingMotion = false
get

Whether the motion recording is ON.

◆ IsTracking

bool Mocopi.Mobile.Sdk.MocopiManager.IsTracking = false
get

Whether the tracking is ON.

◆ LatestFirmwareVersion

Version Mocopi.Mobile.Sdk.MocopiManager.LatestFirmwareVersion = null
get

Latest firmware version of sensor.

◆ Logger

LogUtility Mocopi.Mobile.Sdk.MocopiManager.Logger
get

Log output class.

◆ MocopiAvatar

MocopiAvatar Mocopi.Mobile.Sdk.MocopiManager.MocopiAvatar
getset

Avatar used in mocopi.

◆ OlderSensorArray

List<string> Mocopi.Mobile.Sdk.MocopiManager.OlderSensorArray
get

List of mocopi sensors with old firmware versions.

◆ RunMode

EnumRunMode Mocopi.Mobile.Sdk.MocopiManager.RunMode
staticgetset

SDK operation mode.

◆ SynchronizationContext

SynchronizationContext Mocopi.Mobile.Sdk.MocopiManager.SynchronizationContext
getset

Context for main thread execution.

◆ TargetBodyType

EnumTargetBodyType Mocopi.Mobile.Sdk.MocopiManager.TargetBodyType
get

Tracking type.


The documentation for this class was generated from the following file:
  • MocopiManager.cs