C API Unity API
Unity API Reference (Version 10.22.5)
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
 

Properties

string AlignmentDatabasePath [get, set]
 Optional path to database containing an Area Target to use for alignment of the generated Area Target Capture. More...
 
string AlignmentTargetName [get, set]
 Optional name of the target to use for alignment. More...
 

Member Function Documentation

◆ CancelTargetGeneration()

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.

◆ DestroyCapture()

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

◆ GenerateTarget() [1/2]

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

◆ GenerateTarget() [2/2]

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.

◆ GetGenerationTimeEstimate()

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.

◆ PauseCapture()

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.

◆ ResumeCapture()

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.

>

◆ StartCapture()

void StartCapture ( )
inline

Creates an Area Target capture and Starts capturing.

◆ StopCapture()

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

◆ ClientId

string ClientId

◆ ClientSecret

string ClientSecret

◆ DisplayPreviewMesh

bool DisplayPreviewMesh

◆ FileName

string FileName => mFinalTargetName

Gets the target name used to Generate the target

◆ GenerationProgress

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

◆ OnCaptureCreationError

CaptureCreationErrorEvent OnCaptureCreationError = new CaptureCreationErrorEvent()

◆ OnCaptureStarted

CaptureStartedEvent OnCaptureStarted = new CaptureStartedEvent()

◆ OnCaptureStatusInfoUpdated

CaptureStatusInfoUpdated OnCaptureStatusInfoUpdated = new CaptureStatusInfoUpdated()

◆ OnCaptureStopped

CaptureStoppedEvent OnCaptureStopped = new CaptureStoppedEvent()

◆ OnGenerationCompleted

GenerationCompletedEvent OnGenerationCompleted = new GenerationCompletedEvent()

◆ OnGenerationError

GenerationErrorEvent OnGenerationError = new GenerationErrorEvent()

◆ OnGenerationProgressUpdated

GenerationProgressEvent OnGenerationProgressUpdated = new GenerationProgressEvent()

Provides generation progress percent.

◆ OnGenerationRemainingTimeUpdated

GenerationRemainingTimeEvent OnGenerationRemainingTimeUpdated = new GenerationRemainingTimeEvent()

Provides estimated remaining time in seconds.

◆ OnGenerationStarted

GenerationStartedEvent OnGenerationStarted = new GenerationStartedEvent()

◆ Status

AreaTargetCaptureStatus Status => mAreaTargetCapture.Status

Get status of the capture

Always gives a well defined state

◆ StatusInfo

AreaTargetCaptureStatusInfo StatusInfo => mAreaTargetCapture.StatusInfo

Get additional status info for the capture

◆ TargetName

string TargetName

Property Documentation

◆ AlignmentDatabasePath

string AlignmentDatabasePath
getset

Optional path to database containing an Area Target to use for alignment of the generated Area Target Capture.

Default value is NULL. If no path is provided, then alignment will not be performed. For aligned generation, the generation configuration must also provide the name of the Area Target to be used for alignment, i.e. alignmentTargetName. If generation is successful, then the newly generated Area Target will be aligned to the alignment target coordinate system.

◆ AlignmentTargetName

string AlignmentTargetName
getset

Optional name of the target to use for alignment.

Default value is NULL. If no name is provided, then alignment will not be performed. For aligned generation, the generation configuration must also provide the path to a valid Area Target database that will be used for alignment, i.e. alignmentDatabasePath. If generation is successful, then the newly generated Area Target will be aligned to the alignment target coordinate system.