C API Unity API
Unity API Reference
AreaTargetCaptureBehaviour Class Reference
Inheritance diagram for AreaTargetCaptureBehaviour:

Classes

class  CaptureCreationErrorEvent
 
class  CaptureStartedEvent
 
class  CaptureStatusInfoUpdated
 
class  CaptureStoppedEvent
 
class  GenerationCompletedEvent
 
class  GenerationErrorEvent
 
class  GenerationProgressEvent
 Provides generation progress percent. More...
 
class  GenerationRemainingTimeEvent
 Provides estimated remaining time in seconds. More...
 
class  GenerationStartedEvent
 

Public Member Functions

async void CancelTargetGeneration ()
 Cancels target generation asynchronously. If a generation has been canceled successfully, the capture will switch to CANCELED state. The latter allows the capture to call generate again to successfully generate a target. More...
 
void DestroyCapture ()
 Destroys the current capture. Cannot destroy the capture while it is Generating the target More...
 
void GenerateTarget ()
 Generates the Target using the name retrieved from the TargetName property with current timestamp Resulting target name will be in the form of TargetName-yyyyMMdd-HHmmss which can be retrieved using the FileName property More...
 
void GenerateTarget (string targetName)
 Generates the target asynchronously. If the generation is successful then the capture is Destroyed. The capture switches to GENERATING and generates a target from the captured data. When generation successfully completes, the capture switches to the STOPPED state. If generation fails, StatusInfo will hold an error status that reflects the cause of the error. More...
 
bool GetGenerationTimeEstimate (out int generationTimeEstimate)
 Gets the estimated time remaining to complete the current generation in seconds. More...
 
bool PauseCapture ()
 Pauses the Area Target capture. More...
 
bool ResumeCapture ()
 Resumes the Area Target capture. More...
 
void StartCapture ()
 Creates an Area Target capture and Starts capturing. More...
 
void StopCapture ()
 Stops the Area Target capture. More...
 

Public Attributes

string ClientId
 
string ClientSecret
 
bool DisplayPreviewMesh
 
string FileName => mFinalTargetName
 Gets the target name used to Generate the target More...
 
float GenerationProgress => mAreaTargetCapture.GenerationProgress
 Get progress information of the current generation in the range [0.0f, 1.0f] More...
 
CaptureCreationErrorEvent OnCaptureCreationError = new CaptureCreationErrorEvent()
 
CaptureStartedEvent OnCaptureStarted = new CaptureStartedEvent()
 
CaptureStatusInfoUpdated OnCaptureStatusInfoUpdated = new CaptureStatusInfoUpdated()
 
CaptureStoppedEvent OnCaptureStopped = new CaptureStoppedEvent()
 
GenerationCompletedEvent OnGenerationCompleted = new GenerationCompletedEvent()
 
GenerationErrorEvent OnGenerationError = new GenerationErrorEvent()
 
GenerationProgressEvent OnGenerationProgressUpdated = new GenerationProgressEvent()
 Provides generation progress percent. More...
 
GenerationRemainingTimeEvent OnGenerationRemainingTimeUpdated = new GenerationRemainingTimeEvent()
 Provides estimated remaining time in seconds. More...
 
GenerationStartedEvent OnGenerationStarted = new GenerationStartedEvent()
 
AreaTargetCaptureStatus Status => mAreaTargetCapture.Status
 Get status of the capture More...
 
AreaTargetCaptureStatusInfo StatusInfo => mAreaTargetCapture.StatusInfo
 Get additional status info for the capture More...
 
string TargetName
 

Member Function Documentation

async void CancelTargetGeneration ( )
inline

Cancels target generation asynchronously. If a generation has been canceled successfully, the capture will switch to CANCELED state. The latter allows the capture to call generate again to successfully generate a target.

Will do nothing if the status is not AreaTargetCaptureStatus.GENERATING.

void DestroyCapture ( )
inline

Destroys the current capture. Cannot destroy the capture while it is Generating the target

The capture will be cancelled if it is running

void GenerateTarget ( )
inline

Generates the Target using the name retrieved from the TargetName property with current timestamp Resulting target name will be in the form of TargetName-yyyyMMdd-HHmmss which can be retrieved using the FileName property

void GenerateTarget ( string  targetName)
inline

Generates the target asynchronously. If the generation is successful then the capture is Destroyed. The capture switches to GENERATING and generates a target from the captured data. When generation successfully completes, the capture switches to the STOPPED state. If generation fails, StatusInfo will hold an error status that reflects the cause of the error.

Parameters
targetNameTarget name for the capture. It is required to respect the following restrictions: Length: 1 - 64 characters Allowed ASCII characters: numerals, literals, dash, underscore

A target can only be generated if the capture accumulated sufficient data to switch from the PREPARING state to the CAPTURING state.

If target generation fails with ERROR_NO_NETWORK_CONNECTION, ERROR_SERVICE_NOT_AVAILABLE or ERROR_CANCELED one may attempt to call this function again to successfully generate a target.

bool GetGenerationTimeEstimate ( out int  generationTimeEstimate)
inline

Gets the estimated time remaining to complete the current generation in seconds.

The capture has to be in status GENERATING or COMPLETED for this call to succeed. It may take few seconds after the generation started for the time estimate to become available.

bool PauseCapture ( )
inline

Pauses the Area Target capture.

The capture pauses data acquisition, and switches to status PAUSED. Fails if the capture is not in PREPARING or CAPTURING state.

bool ResumeCapture ( )
inline

Resumes the Area Target capture.

The capture resumes data acquisition, and switches to either PREPARING or CAPTURING. Fails if the capture is not in PAUSED state.

>

void StartCapture ( )
inline

Creates an Area Target capture and Starts capturing.

void StopCapture ( )
inline

Stops the Area Target capture.

The capture stops data acquisition, and switches to status STOPPED. Fails if the capture is not in PREPARING, CAPTURING or PAUSED state.

Member Data Documentation

string ClientId
string ClientSecret
bool DisplayPreviewMesh
string FileName => mFinalTargetName

Gets the target name used to Generate the target

float GenerationProgress => mAreaTargetCapture.GenerationProgress

Get progress information of the current generation in the range [0.0f, 1.0f]

Note that the capture has to be in status GENERATING or COMPLETED for this call to succeed. Otherwise this call will throw an exception

CaptureCreationErrorEvent OnCaptureCreationError = new CaptureCreationErrorEvent()
CaptureStartedEvent OnCaptureStarted = new CaptureStartedEvent()
CaptureStatusInfoUpdated OnCaptureStatusInfoUpdated = new CaptureStatusInfoUpdated()
CaptureStoppedEvent OnCaptureStopped = new CaptureStoppedEvent()
GenerationCompletedEvent OnGenerationCompleted = new GenerationCompletedEvent()
GenerationErrorEvent OnGenerationError = new GenerationErrorEvent()
GenerationProgressEvent OnGenerationProgressUpdated = new GenerationProgressEvent()

Provides generation progress percent.

GenerationRemainingTimeEvent OnGenerationRemainingTimeUpdated = new GenerationRemainingTimeEvent()

Provides estimated remaining time in seconds.

GenerationStartedEvent OnGenerationStarted = new GenerationStartedEvent()
AreaTargetCaptureStatus Status => mAreaTargetCapture.Status

Get status of the capture

Always gives a well defined state

AreaTargetCaptureStatusInfo StatusInfo => mAreaTargetCapture.StatusInfo

Get additional status info for the capture

string TargetName