Sony Corporation
|
mocopi mobile SDK
|
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< EnumParts > | GetPartsListWithTargetBody (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. | |
Class that summarizes the processing related to mocopi sensor
.
| 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)?
| callback | Callback |
| 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[])
| callback | Callback |
| 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)
| callback | callback |
| 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)
| callback | Callback |
| 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.
| callback | Callback |
| 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.
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| 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)
| callback | Callback |
| bool Mocopi.Mobile.Sdk.MocopiManager.CancelCalibration | ( | ) |
Cancel the calibration.
.
Return false if calibration is not in progress.
| EnumFirmwareStatus string firmwareVersion Mocopi.Mobile.Sdk.MocopiManager.CheckFirmwareVersion | ( | string | sensorName | ) |
| 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.
| void Mocopi.Mobile.Sdk.MocopiManager.CreateBond | ( | string | sensorName, |
| EnumParts | part ) |
Pair the mocopi sensor.
.
Callback OnSensorConnect sends a notification when the connection is completed.
| sensorName | mocopi sensor name |
| part | Connecting body part |
| bool Mocopi.Mobile.Sdk.MocopiManager.DeleteMotionFile | ( | string | fileName | ) |
Delete BVH file.
.
error if the file doesn't exist.
| fileName | BVH file name to be deleted. |
| 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.
| part | Body part for which mocopi sensor is disconnected |
| 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.
| List< MocopiSensor > Mocopi.Mobile.Sdk.MocopiManager.FindSensorList | ( | EnumSensorStatus | status | ) |
Retrieve a list of sensors that match the specified status.
.
| status | Sensor status |
| bool Mocopi.Mobile.Sdk.MocopiManager.GetAppPermissionStatus | ( | EnumPermissionType | type | ) |
Get app permission settings (Bluetooth/location information/storage usage).
.
Return Disable for iOS on every occasion.
| type | App permission settings (Bluetooth/location information/storage usage) |
| 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.
| sensorName | mocopi sensor name |
| 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)
| 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.
| bool Mocopi.Mobile.Sdk.MocopiManager.GetMotionFileInformations | ( | ) |
Get information of BVH file list (file name, size).
.
Get the result with callback OnGetRecordedBvhFileInformations.
| 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.
| type | OS settings (Bluetooth/location information) |
| 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.
| part | Connecting body part |
| bool Mocopi.Mobile.Sdk.MocopiManager.GetPartFromSensorName | ( | string | sensorName, |
| out EnumParts | part ) |
Get the connecting body part linked to the mocopi sensor name.
.
| sensorName | mocopi sensor name |
| part | The connecting body part linked to the mocopi sensor name is stored. |
| List< EnumParts > Mocopi.Mobile.Sdk.MocopiManager.GetPartsListWithTargetBody | ( | EnumTargetBodyType | bodyType | ) |
Get a list of connecting body parts used for the specified tracking type.
.
| bodyType | Connection mode |
| bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor | ( | EnumParts | part, |
| out MocopiSensor | foundSensor ) |
Retrieve sensor information by body part name.
.
| part | Mounting 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. |
| bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor | ( | EnumSensorStatus | status, |
| string | sensorName, | ||
| out MocopiSensor | foundSensor ) |
Retrieve sensor information that matches the sensor name and status.
.
| status | Sensor status |
| sensorName | Sensor 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. |
| bool Mocopi.Mobile.Sdk.MocopiManager.GetSensor | ( | string | sensorName, |
| out MocopiSensor | foundSensor ) |
Retrieve sensor information from sensor name.
.
| sensorName | Sensor Name |
| foundSensor | [out]If a sensor with the specified name is found, store the sensor object. If it does not exist, store null. |
| string Mocopi.Mobile.Sdk.MocopiManager.GetSplitCode | ( | ) |
Get split code for Motion file list.
| 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.
@
| void Mocopi.Mobile.Sdk.MocopiManager.GetVerifiedFirmwareVersionList | ( | ) |
Get a list of verified firmware versions of mocopi sensors.
.
Callback OnGetVerifiedFirmwareVersion sends a notification of the result.
| 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.
| 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.
| bodyType | Tracking type |
| 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.
@
| 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.
| parts | List of paired body parts |
| 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.
| part | Connecting body part |
| 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.
| EnumFirmwareVersionResultForStableCalibration Mocopi.Mobile.Sdk.MocopiManager.IsSupportedVersionOfStableCalibration | ( | string | sensorName | ) |
ファームウェアが高性能キャリブレーションに対応しているバージョンかチェック
| sensorName | センサー名 |
| 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.
@
| frame | Read frame |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveAllCallback | ( | ) |
Delete all callbacks.
.
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnAllSensorReady | ( | UnityAction< EnumCallbackStatus > | callback | ) |
Delete callback for OnAllSensorReady.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnCalibrationUpdated | ( | UnityAction< EnumCalibrationCallbackStatus, EnumCalibrationStatus?, string[]> | callback | ) |
Delete the callback for OnCalibrationUpdated.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnCheckMotionFormatCompleted | ( | UnityAction< EnumMotionFormat > | callback | ) |
Delete callback, OnCheckMotionFormatCompleted .
.
| callback | callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnDeleteMotionFileCompleted | ( | UnityAction< bool > | callback | ) |
Delete the callback for OnDeleteBvhFileCompleted.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnFixedHipSwitched | ( | UnityAction< bool > | callback | ) |
Delete the callback for OnFixedHipSwitched.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnGetRecordedMotionFileInformations | ( | UnityAction<(string fileName, long fileSize)[]> | callback | ) |
Add a callback for OnGetRecordedBvhFileInformations.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnMotionConvertProgressUpdated | ( | UnityAction< int > | callback | ) |
Delete the callback for OnBvhConvertProgressUpdated.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRecordingMotionExternalStorageUriSelected | ( | UnityAction< bool > | callback | ) |
Delete the callback for OnRecordingBvhExternalStorageUriSelected.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRecordingMotionUpdated | ( | UnityAction< string, EnumRecordingMotionAllStatus > | callback | ) |
Delete the callback for OnRecordingMotionUpdated.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnRenameMotionFileCompleted | ( | UnityAction< bool > | callback | ) |
Delete the callback for OnRenameBvhFileCompleted.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorBatteryLevelUpdated | ( | UnityAction< string, int, EnumCallbackStatus > | callback | ) |
Delete the callback for OnSensorBatteryLevelUpdate.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorConnected | ( | UnityAction< EnumParts, string, EnumCallbackStatus, EnumSensorConnectionErrorStatus?> | callback | ) |
Delete the callback for OnSensorConnected.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorDisconnected | ( | UnityAction< string > | callback | ) |
Delete the callback for OnSensorDisconnected.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSensorFound | ( | UnityAction< string > | callback | ) |
Delete the callback for OnSensorFound.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSkeletonDefinitionUpdated | ( | UnityAction< SkeletonDefinitionData > | callback | ) |
Delete the callback for OnSkeletonDefinitionUpdated.
.
| callback | Callback |
| void Mocopi.Mobile.Sdk.MocopiManager.RemoveCallbackOnSkeletonUpdated | ( | UnityAction< SkeletonData > | callback | ) |
Delete the callback for OnSkeletonUpdated.
.
| callback | Callback |
| 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.
| part | Connecting body part |
| bool Mocopi.Mobile.Sdk.MocopiManager.RenameMotionFile | ( | string | oldFileName, |
| string | newFilename ) |
Change the name of BVH file.
.
error if file doesn't exist
| oldFileName | Old BVH file name |
| newFileName | New BVH file name |
| 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.
| 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.
| fileName | Saved file name (extension not required) |
| 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.
| 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.
| fixedHip | True to turn ON hip fixing. False to turn OFF hip fixing. |
| 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.
| heightStruct | Height setting structure |
| 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.
| part | Connecting body parts to be linked |
| sensorName | mocopi sensor name to be linked |
| bool Mocopi.Mobile.Sdk.MocopiManager.SetRootPosition | ( | Vector3 | position | ) |
Reset the avatar position.
.
Not available except during tracking.
| position | Avatar position |
| 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.
| targetBodyType | Tracking type to be configured |
| 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.
| 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.
| excludeSettedPart | True will exclude previously paired mocopi sensors from the search. False will continue searching irrespective of pairing status. |
| bool Mocopi.Mobile.Sdk.MocopiManager.StartMotionRecording | ( | ) |
Start motion recording.
.
Not available except during tracking.
| void Mocopi.Mobile.Sdk.MocopiManager.StartMotionStreamingRead | ( | string | fileName, |
| int | motionFormat ) |
Initiate BVH read status.
.
| fileName | File name |
| motionFormat | BVH file format |
| 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.
| 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.
| part | Connecting body part |
| 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.
| 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.
| bool Mocopi.Mobile.Sdk.MocopiManager.StopMotionRecording | ( | ) |
Stop motion recording.
.
Not available except during tracking.
| void Mocopi.Mobile.Sdk.MocopiManager.StopMotionStreamingRead | ( | ) |
Stop BVH from being readable.
.
| void Mocopi.Mobile.Sdk.MocopiManager.StopSensor | ( | ) |
Stop tracking and disconnect all sensors.
.
Callback OnSensorDisconnected sends a notification upon disconnection.
| 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.
| 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.
.
| sensorName | mocopi sensor name |
| isActiveSingle | if single press |
| isActiveDouble | if double presses |
| isActiveTriple | if triple presses |
Register mocopi sensor and number of presses to invoke callback OnSensorButtonPressed when the button on the mocopi sensor is pressed.
| MocopiEventHandlerSettings Mocopi.Mobile.Sdk.MocopiManager.EventHandleSettings |
User configuration callbacks
.
| 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.
| sensorName | mocopi sensor name |
|
staticget |
Own singleton instance.
|
getset |
Whether to convert advanced functions to connecting body part.
|
get |
Whether the calibration is successful.
|
get |
Whether the sensor is connected.
|
get |
Whether the hip is fixed.
|
get |
Whether the motion recording is ON.
|
get |
Whether the tracking is ON.
|
get |
Latest firmware version of sensor.
|
get |
Log output class.
|
getset |
Avatar used in mocopi.
|
get |
List of mocopi sensors with old firmware versions.
|
staticgetset |
SDK operation mode.
|
getset |
Context for main thread execution.
|
get |
Tracking type.