Struct CaptureCamera.CaptureState
Capture state when asynchronously capturing a camera render.
Namespace: Unity.Simulation
Syntax
public struct CaptureState
Fields
camera
The camera associated with this capture request.
Declaration
public Camera camera
Field Value
| Type | Description |
|---|---|
| Camera |
colorBuffer
While in flight, references the source buffer to read from. When completed, references the captured data in Array form.
Declaration
public object colorBuffer
Field Value
| Type | Description |
|---|---|
| Object |
colorFunctor
Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> colorFunctor
Field Value
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> |
colorTrigger
Action to populate the command buffer to readback a color target.
Declaration
public Action<CommandBuffer, RenderTargetIdentifier> colorTrigger
Field Value
| Type | Description |
|---|---|
| Action<CommandBuffer, RenderTargetIdentifier> |
depthBuffer
While in flight, references the source buffer to read from. When completed, references the captured data in Array form.
Declaration
public object depthBuffer
Field Value
| Type | Description |
|---|---|
| Object |
depthFunctor
Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> depthFunctor
Field Value
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> |
depthTrigger
Action to populate the command buffer to readback a depth target.
Declaration
public Action<CommandBuffer, RenderTargetIdentifier> depthTrigger
Field Value
| Type | Description |
|---|---|
| Action<CommandBuffer, RenderTargetIdentifier> |
frame
The frame number this request was issued on.
Declaration
public int frame
Field Value
| Type | Description |
|---|---|
| Int32 |
motionBuffer
While in flight, references the source buffer to read from. When completed, references the captured data in Array form.
Declaration
public object motionBuffer
Field Value
| Type | Description |
|---|---|
| Object |
motionFunctor
Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> motionFunctor
Field Value
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> |
motionTrigger
Action to populate the command buffer to readback a motion target.
Declaration
public Action<CommandBuffer, RenderTargetIdentifier> motionTrigger
Field Value
| Type | Description |
|---|---|
| Action<CommandBuffer, RenderTargetIdentifier> |
normalBuffer
While in flight, references the source buffer to read from. When completed, references the captured data in Array form.
Declaration
public object normalBuffer
Field Value
| Type | Description |
|---|---|
| Object |
normalFunctor
Completion function for handling capture results. Invoked once the capture data is ready. The handler is responsible for persisting the data. Once invoked, the data is discarded.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> normalFunctor
Field Value
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> |
normalTrigger
Action to populate the command buffer to readback a normal target.
Declaration
public Action<CommandBuffer, RenderTargetIdentifier> normalTrigger
Field Value
| Type | Description |
|---|---|
| Action<CommandBuffer, RenderTargetIdentifier> |
Properties
completed
Property to determine if the capture request has completed.
Declaration
public readonly bool completed { get; }
Property Value
| Type | Description |
|---|---|
| Boolean | true if completed, false otherwise. |
Methods
GetFunctor(CaptureCamera.Channel)
Help method to get the completion functor for the specified channel.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> GetFunctor(CaptureCamera.Channel channel)
Parameters
| Type | Name | Description |
|---|---|---|
| CaptureCamera.Channel | channel | Enumeration value for which channel you are specifying. |
Returns
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> |
SetBuffer(CaptureCamera.Channel, Object)
Helper method to set the buffer for a specified channel.
Declaration
public void SetBuffer(CaptureCamera.Channel channel, object buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| CaptureCamera.Channel | channel | Enumeration value for which channel you are specifying. |
| Object | buffer | Object specifying the buffer you are setting for the specified channel. |
SetFunctor(CaptureCamera.Channel, Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result>)
Helper method to set the completion functor for a specified channel.
Declaration
public Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> SetFunctor(CaptureCamera.Channel channel, Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> functor)
Parameters
| Type | Name | Description |
|---|---|---|
| CaptureCamera.Channel | channel | Enumeration value for which channel you are specifying. |
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> | functor | Completion functor for handling the captured data when available. |
Returns
| Type | Description |
|---|---|
| Func<AsyncRequest<CaptureCamera.CaptureState>, AsyncRequest.Result> | The previous completion functor. |
SetTrigger(CaptureCamera.Channel, Action<CommandBuffer, RenderTargetIdentifier>)
Help method to set the command buffer to use, for the specified channel.
Declaration
public Action<CommandBuffer, RenderTargetIdentifier> SetTrigger(CaptureCamera.Channel channel, Action<CommandBuffer, RenderTargetIdentifier> action)
Parameters
| Type | Name | Description |
|---|---|---|
| CaptureCamera.Channel | channel | Enumeration value for which channel you are specifying. |
| Action<CommandBuffer, RenderTargetIdentifier> | action | Action to populate the command buffer. |
Returns
| Type | Description |
|---|---|
| Action<CommandBuffer, RenderTargetIdentifier> |